Merge pull request #6 from oipwg/fix-testnet-addresses

Pass network to Address.toString()
This commit is contained in:
Sky Young 2019-08-16 10:19:38 -06:00 committed by GitHub
commit cbec5630d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 7 deletions

View File

@ -1 +0,0 @@
mtLDA41NWe9rLm7nuMvAnTs2SbP49cz1ZR

View File

@ -630,7 +630,7 @@ AddressService.prototype._removeInput = function(input, tx, block, index, callba
}
address.network = self._network;
address = address.toString();
address = address.toString(self._network);
assert(block && block.__ts && block.__height, 'Missing block or block values.');
@ -674,7 +674,7 @@ AddressService.prototype._removeOutput = function(output, tx, block, index, call
}
address.network = self._network;
address = address.toString();
address = address.toString(self._network);
assert(block && block.__ts && block.__height, 'Missing block or block values.');
@ -743,7 +743,7 @@ AddressService.prototype._processInput = function(tx, input, index, opts) {
}
address.network = this._network;
address = address.toString();
address = address.toString(this._network);
var txid = tx.txid();
var timestamp = this._timestamp.getTimestampSync(opts.block.rhash());
@ -781,7 +781,7 @@ AddressService.prototype._processOutput = function(tx, output, index, opts) {
}
address.network = this._network;
address = address.toString();
address = address.toString(this._network);
var txid = tx.txid();
var timestamp = this._timestamp.getTimestampSync(opts.block.rhash());

View File

@ -175,7 +175,7 @@ utils.getAddress = function(item, network) {
return;
}
address.network = network;
return address.toString();
return address.toString(network);
};
module.exports = utils;

View File

@ -5,7 +5,7 @@
"node": ">=8.0.0"
},
"author": "BitPay <dev@bitpay.com>",
"version": "5.0.3",
"version": "5.0.4",
"main": "./index.js",
"repository": "git://github.com/oipwg/flocore-node.git",
"homepage": "https://github.com/oipwg/flocore-node",