diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2017-04-17 18:56:44 -0400 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2018-04-04 16:52:40 -0400 |
commit | a0704a8996bb950ae3c4d5b5a30e9dfe34cde1d3 (patch) | |
tree | d7dc5b382640f965bdff98baa1aa4e21a7af5d20 /src/qt/overviewpage.cpp | |
parent | 90d4640b7eff3154a0750c5acb52d39bd41e0bbb (diff) |
Remove most direct bitcoin calls from qt/walletmodel.cpp
Diffstat (limited to 'src/qt/overviewpage.cpp')
-rw-r--r-- | src/qt/overviewpage.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp index d1c9f17961..aaea650141 100644 --- a/src/qt/overviewpage.cpp +++ b/src/qt/overviewpage.cpp @@ -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))); } |