fix input and output json.
This commit is contained in:
parent
a8cf57ab7d
commit
61782a70ba
@ -88,6 +88,9 @@ HTTPServer.prototype._init = function _init() {
|
|||||||
bcoin.debug('Params:');
|
bcoin.debug('Params:');
|
||||||
bcoin.debug(params);
|
bcoin.debug(params);
|
||||||
|
|
||||||
|
if (params.subtractFee)
|
||||||
|
options.subtractFee = params.subtractFee;
|
||||||
|
|
||||||
if (params.id) {
|
if (params.id) {
|
||||||
assert(params.id !== '!all');
|
assert(params.id !== '!all');
|
||||||
options.id = params.id;
|
options.id = params.id;
|
||||||
|
|||||||
@ -478,7 +478,7 @@ Input.prototype.toJSON = function toJSON() {
|
|||||||
script: this.script.toJSON(),
|
script: this.script.toJSON(),
|
||||||
witness: this.witness.toJSON(),
|
witness: this.witness.toJSON(),
|
||||||
sequence: this.sequence,
|
sequence: this.sequence,
|
||||||
address: this.getAddress()
|
address: this.getAddress().toBase58()
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -167,7 +167,7 @@ Output.prototype.toJSON = function toJSON() {
|
|||||||
return {
|
return {
|
||||||
value: utils.btc(this.value),
|
value: utils.btc(this.value),
|
||||||
script: this.script.toJSON(),
|
script: this.script.toJSON(),
|
||||||
address: this.getAddress()
|
address: this.getAddress().toBase58()
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user