aboutsummaryrefslogtreecommitdiff
path: root/src/qt/test/wallettests.cpp
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2017-04-17 18:56:44 -0400
committerJohn Newbery <john@johnnewbery.com>2018-04-04 16:52:40 -0400
commita0704a8996bb950ae3c4d5b5a30e9dfe34cde1d3 (patch)
treed7dc5b382640f965bdff98baa1aa4e21a7af5d20 /src/qt/test/wallettests.cpp
parent90d4640b7eff3154a0750c5acb52d39bd41e0bbb (diff)
Remove most direct bitcoin calls from qt/walletmodel.cpp
Diffstat (limited to 'src/qt/test/wallettests.cpp')
-rw-r--r--src/qt/test/wallettests.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qt/test/wallettests.cpp b/src/qt/test/wallettests.cpp
index ebca4b6499..d28d4bd7e6 100644
--- a/src/qt/test/wallettests.cpp
+++ b/src/qt/test/wallettests.cpp
@@ -178,7 +178,9 @@ void TestGUI()
TransactionView transactionView(platformStyle.get());
auto node = interface::MakeNode();
OptionsModel optionsModel(*node);
- WalletModel walletModel(platformStyle.get(), &wallet, &optionsModel);
+ vpwallets.insert(vpwallets.begin(), &wallet);
+ WalletModel walletModel(std::move(node->getWallets()[0]), *node, platformStyle.get(), &wallet, &optionsModel);
+ vpwallets.erase(vpwallets.begin());
sendCoinsDialog.setModel(&walletModel);
transactionView.setModel(&walletModel);
@@ -203,7 +205,7 @@ void TestGUI()
QLabel* balanceLabel = overviewPage.findChild<QLabel*>("labelBalance");
QString balanceText = balanceLabel->text();
int unit = walletModel.getOptionsModel()->getDisplayUnit();
- CAmount balance = walletModel.getBalance();
+ CAmount balance = walletModel.wallet().getBalance();
QString balanceComparison = BitcoinUnits::formatWithUnit(unit, balance, false, BitcoinUnits::separatorAlways);
QCOMPARE(balanceText, balanceComparison);