Remove most direct bitcoin calls from qt/walletmodel.cpp

This commit is contained in:
Russell Yanofsky authored and John Newbery committed 2018-04-04 16:52:40 -04:00
1 parent 90d4640b7e
commit a0704a8996
18 files changed
+588 -330

No files matched your search

+5 -3
View File
@@ -231,13 +231,15 @@ void OverviewPage::setWalletModel(WalletModel *model)
ui->listTransactions->setModelColumn(TransactionTableModel::ToAddress);
// Keep up to date with wallet
setBalance(model->getBalance(), model->getUnconfirmedBalance(), model->getImmatureBalance(),
model->getWatchBalance(), model->getWatchUnconfirmedBalance(), model->getWatchImmatureBalance());
interface::Wallet& wallet = model->wallet();
interface::WalletBalances balances = wallet.getBalances();
setBalance(balances.balance, balances.unconfirmed_balance, balances.immature_balance,
balances.watch_only_balance, balances.unconfirmed_watch_only_balance, balances.immature_watch_only_balance);
connect(model, SIGNAL(balanceChanged(CAmount,CAmount,CAmount,CAmount,CAmount,CAmount)), this, SLOT(setBalance(CAmount,CAmount,CAmount,CAmount,CAmount,CAmount)));
connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));
updateWatchOnlyLabels(model->haveWatchOnly());
updateWatchOnlyLabels(wallet.haveWatchOnly());
connect(model, SIGNAL(notifyWatchonlyChanged(bool)), this, SLOT(updateWatchOnlyLabels(bool)));
}