Move gateways option to opts instead of config.

This commit is contained in:
Arthur Britto
2013-02-17 21:07:09 -08:00
committed by Stefan Thomas
parent c95a0bbdbe
commit 2d62b3ce98
2 changed files with 4 additions and 4 deletions

View File

@@ -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.

View File

@@ -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;
};