Watchonly balances are shown separately in gui.
This commit is contained in:
@@ -79,6 +79,21 @@ qint64 WalletModel::getImmatureBalance() const
|
||||
return wallet->GetImmatureBalance();
|
||||
}
|
||||
|
||||
qint64 WalletModel::getWatchBalance() const
|
||||
{
|
||||
return wallet->GetWatchOnlyBalance();
|
||||
}
|
||||
|
||||
qint64 WalletModel::getWatchUnconfirmedBalance() const
|
||||
{
|
||||
return wallet->GetUnconfirmedWatchOnlyBalance();
|
||||
}
|
||||
|
||||
qint64 WalletModel::getWatchImmatureBalance() const
|
||||
{
|
||||
return wallet->GetImmatureWatchOnlyBalance();
|
||||
}
|
||||
|
||||
int WalletModel::getNumTransactions() const
|
||||
{
|
||||
int numTransactions = 0;
|
||||
@@ -127,13 +142,21 @@ void WalletModel::checkBalanceChanged()
|
||||
qint64 newBalance = getBalance();
|
||||
qint64 newUnconfirmedBalance = getUnconfirmedBalance();
|
||||
qint64 newImmatureBalance = getImmatureBalance();
|
||||
qint64 newWatchOnlyBalance = getWatchBalance();
|
||||
qint64 newWatchUnconfBalance = getWatchUnconfirmedBalance();
|
||||
qint64 newWatchImmatureBalance = getWatchImmatureBalance();
|
||||
|
||||
if(cachedBalance != newBalance || cachedUnconfirmedBalance != newUnconfirmedBalance || cachedImmatureBalance != newImmatureBalance)
|
||||
if(cachedBalance != newBalance || cachedUnconfirmedBalance != newUnconfirmedBalance || cachedImmatureBalance != newImmatureBalance ||
|
||||
cachedWatchOnlyBalance != newWatchOnlyBalance || cachedWatchUnconfBalance != newWatchUnconfBalance || cachedWatchImmatureBalance != newWatchImmatureBalance)
|
||||
{
|
||||
cachedBalance = newBalance;
|
||||
cachedUnconfirmedBalance = newUnconfirmedBalance;
|
||||
cachedImmatureBalance = newImmatureBalance;
|
||||
emit balanceChanged(newBalance, newUnconfirmedBalance, newImmatureBalance);
|
||||
cachedWatchOnlyBalance = newWatchOnlyBalance;
|
||||
cachedWatchUnconfBalance = newWatchUnconfBalance;
|
||||
cachedWatchImmatureBalance = newWatchImmatureBalance;
|
||||
emit balanceChanged(newBalance, newUnconfirmedBalance, newImmatureBalance,
|
||||
newWatchOnlyBalance, newWatchUnconfBalance, newWatchImmatureBalance);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user