mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Added set_issuer.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user