minor keypair fix.

This commit is contained in:
Christopher Jeffrey 2016-02-11 01:43:32 -08:00
parent 4a6c73fc8e
commit 173e133bf4
2 changed files with 3 additions and 3 deletions

View File

@ -37,8 +37,8 @@ function KeyPair(options) {
if (options.pub) if (options.pub)
options.publicKey = options.pub; options.publicKey = options.pub;
if (options.key instanceof KeyPair) if (options.pair instanceof KeyPair)
return options.key; return options.pair;
this.options = options; this.options = options;
this.pair = null; this.pair = null;

View File

@ -796,7 +796,7 @@ Wallet.prototype.toJSON = function toJSON(encrypt) {
keys: this.keys.map(function(key) { keys: this.keys.map(function(key) {
return key.xpubkey; return key.xpubkey;
}), }),
balance: utils.toBTC(this.getBalance()), balance: utils.btc(this.getBalance()),
tx: this.tx.toJSON() tx: this.tx.toJSON()
}; };
}; };