Print available balance in Wallet.toString(), rather than the redundant number of Satoshis.

This commit is contained in:
Andreas Schildbach 2014-02-28 13:47:40 +01:00 committed by Mike Hearn
parent 8fdfb04e43
commit 71ee048d1e

View File

@ -2326,9 +2326,10 @@ public class Wallet implements Serializable, BlockChainListener, PeerFilterProvi
lock.lock();
try {
StringBuilder builder = new StringBuilder();
BigInteger balance = getBalance(BalanceType.ESTIMATED);
builder.append(String.format("Wallet containing %s BTC (%d satoshis) in:%n",
bitcoinValueToPlainString(balance), balance.longValue()));
BigInteger estimatedBalance = getBalance(BalanceType.ESTIMATED);
BigInteger availableBalance = getBalance(BalanceType.AVAILABLE);
builder.append(String.format("Wallet containing %s BTC (available: %s BTC) in:%n",
bitcoinValueToPlainString(estimatedBalance), bitcoinValueToPlainString(availableBalance)));
builder.append(String.format(" %d pending transactions%n", pending.size()));
builder.append(String.format(" %d unspent transactions%n", unspent.size()));
builder.append(String.format(" %d spent transactions%n", spent.size()));