mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-06 17:27:59 +00:00
[FIX] get interest for currency without interest
- `get_interest_at` for a currency without interest would not hit the intended check since the function was used as variable instead of calling the method
This commit is contained in:
@@ -270,7 +270,7 @@ Currency.prototype.has_interest = function() {
|
|||||||
* @returns {number} - interest for provided interval, can be negative for demurred currencies
|
* @returns {number} - interest for provided interval, can be negative for demurred currencies
|
||||||
*/
|
*/
|
||||||
Currency.prototype.get_interest_at = function(referenceDate, decimals) {
|
Currency.prototype.get_interest_at = function(referenceDate, decimals) {
|
||||||
if (!this.has_interest) {
|
if (!this.has_interest()) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user