diff --git a/src/js/amount.js b/src/js/amount.js index 5bda5ddae..2426338a9 100644 --- a/src/js/amount.js +++ b/src/js/amount.js @@ -404,6 +404,16 @@ Amount.prototype.set_currency = function(c) { return this; }; +Amount.prototype.set_issuer = function (issuer) { + if (issuer instanceof UInt160) { + issuer.copyTo(this._issuer); + } else { + this._issuer.parse_json(issuer); + } + + return this; +}; + // Only checks the value. Not the currency and issuer. Amount.prototype.is_valid = function() { return !isNaN(this._value);