diff --git a/lib/http/rpc.js b/lib/http/rpc.js index 8f969ca2..ac57e6c1 100644 --- a/lib/http/rpc.js +++ b/lib/http/rpc.js @@ -323,7 +323,7 @@ RPC.prototype.getinfo = co(function* getinfo(args) { version: constants.USER_VERSION, protocolversion: constants.VERSION, walletversion: 0, - balance: +utils.btc(balance.total), + balance: +utils.btc(balance.unconfirmed), blocks: this.chain.height, timeoffset: time.offset, connections: this.pool.peers.all.length, @@ -2913,7 +2913,7 @@ RPC.prototype.getbalance = co(function* getbalance(args) { if (minconf) value = balance.confirmed; else - value = balance.total; + value = balance.unconfirmed; return +utils.btc(value); }); @@ -3173,7 +3173,7 @@ RPC.prototype.getwalletinfo = co(function* getwalletinfo(args) { return { walletid: this.wallet.id, walletversion: 0, - balance: +utils.btc(balance.total), + balance: +utils.btc(balance.unconfirmed), unconfirmed_balance: +utils.btc(balance.unconfirmed), txcount: this.wallet.state.tx, keypoololdest: 0, @@ -3326,7 +3326,7 @@ RPC.prototype.listaccounts = co(function* listaccounts(args) { for (i = 0; i < accounts.length; i++) { account = accounts[i]; balance = yield this.wallet.getBalance(account); - map[account] = +utils.btc(balance.total); + map[account] = +utils.btc(balance.unconfirmed); } return map;