Use network for address
This commit is contained in:
parent
1169352233
commit
c1ad375aa7
@ -135,8 +135,7 @@ TxController.prototype.transformInput = function(options, input, index) {
|
|||||||
var address = input.getAddress();
|
var address = input.getAddress();
|
||||||
if (address) {
|
if (address) {
|
||||||
address.network = this._network;
|
address.network = this._network;
|
||||||
transformed.addr = this.common.translateOutputAddress(address.toString());
|
transformed.addr = address.toString(this._network);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
transformed.addr = null;
|
transformed.addr = null;
|
||||||
}
|
}
|
||||||
@ -172,8 +171,7 @@ TxController.prototype.transformOutput = function(options, output, index) {
|
|||||||
var address = output.getAddress();
|
var address = output.getAddress();
|
||||||
if (address) {
|
if (address) {
|
||||||
address.network = this._network;
|
address.network = this._network;
|
||||||
transformed.scriptPubKey.addresses = [this.common.translateOutputAddress(address.toString())];
|
transformed.scriptPubKey.addresses = [address.toString(this._network)];
|
||||||
|
|
||||||
transformed.scriptPubKey.type = address.getType();
|
transformed.scriptPubKey.type = address.getType();
|
||||||
}
|
}
|
||||||
return transformed;
|
return transformed;
|
||||||
@ -195,7 +193,7 @@ TxController.prototype.transformInvTransaction = function(transaction) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
address.network = this._network;
|
address.network = this._network;
|
||||||
address = self.common.translateOutputAddress(address.toString());
|
address = address.toString(this._network);
|
||||||
|
|
||||||
var obj = {};
|
var obj = {};
|
||||||
obj[address] = output.value;
|
obj[address] = output.value;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "flosight-api",
|
"name": "flosight-api",
|
||||||
"description": "A Florincoin blockchain REST and web socket API service for Flocore Node.",
|
"description": "A Florincoin blockchain REST and web socket API service for Flocore Node.",
|
||||||
"version": "5.0.0-beta.73",
|
"version": "5.0.0-beta.74",
|
||||||
"repository": "git://github.com/bitpay/flosight-api.git",
|
"repository": "git://github.com/bitpay/flosight-api.git",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/bitpay/flosight-api/issues"
|
"url": "https://github.com/bitpay/flosight-api/issues"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user