mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-30 09:05:50 +00:00
Move gateways option to opts instead of config.
This commit is contained in:
committed by
Stefan Thomas
parent
c95a0bbdbe
commit
2d62b3ce98
@@ -20,8 +20,8 @@ var UInt = function () {
|
||||
this._value = NaN;
|
||||
};
|
||||
|
||||
UInt.json_rewrite = function (j) {
|
||||
return this.from_json(j).to_json();
|
||||
UInt.json_rewrite = function (j, opts) {
|
||||
return this.from_json(j).to_json(opts);
|
||||
};
|
||||
|
||||
// Return a new UInt from j.
|
||||
|
||||
@@ -59,8 +59,8 @@ UInt160.prototype.to_json = function (opts) {
|
||||
|
||||
var output = Base.encode_check(Base.VER_ACCOUNT_ID, this.to_bytes());
|
||||
|
||||
if (config.gateways && output in config.gateways && !opts.no_gateway)
|
||||
output = config.gateways[output];
|
||||
if (opts.gateways && output in opts.gateways)
|
||||
output = opts.gateways[output];
|
||||
|
||||
return output;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user