fix input and output json.

This commit is contained in:
Christopher Jeffrey 2016-06-21 14:16:23 -07:00
parent a8cf57ab7d
commit 61782a70ba
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
3 changed files with 5 additions and 2 deletions

View File

@ -88,6 +88,9 @@ HTTPServer.prototype._init = function _init() {
bcoin.debug('Params:');
bcoin.debug(params);
if (params.subtractFee)
options.subtractFee = params.subtractFee;
if (params.id) {
assert(params.id !== '!all');
options.id = params.id;

View File

@ -478,7 +478,7 @@ Input.prototype.toJSON = function toJSON() {
script: this.script.toJSON(),
witness: this.witness.toJSON(),
sequence: this.sequence,
address: this.getAddress()
address: this.getAddress().toBase58()
};
};

View File

@ -167,7 +167,7 @@ Output.prototype.toJSON = function toJSON() {
return {
value: utils.btc(this.value),
script: this.script.toJSON(),
address: this.getAddress()
address: this.getAddress().toBase58()
};
};