diff --git a/src/js/uint.js b/src/js/uint.js index c02d8b27..d95ccb51 100644 --- a/src/js/uint.js +++ b/src/js/uint.js @@ -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. diff --git a/src/js/uint160.js b/src/js/uint160.js index ee17524d..12c7ff04 100644 --- a/src/js/uint160.js +++ b/src/js/uint160.js @@ -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; };