Changeset View
Changeset View
Standalone View
Standalone View
src/qt/test/wallettests.cpp
Show First 20 Lines • Show All 138 Lines • ▼ Show 20 Lines | #endif | ||||
// Create widgets for sending coins and listing transactions. | // Create widgets for sending coins and listing transactions. | ||||
std::unique_ptr<const PlatformStyle> platformStyle( | std::unique_ptr<const PlatformStyle> platformStyle( | ||||
PlatformStyle::instantiate("other")); | PlatformStyle::instantiate("other")); | ||||
SendCoinsDialog sendCoinsDialog(platformStyle.get()); | SendCoinsDialog sendCoinsDialog(platformStyle.get()); | ||||
auto node = interfaces::MakeNode(); | auto node = interfaces::MakeNode(); | ||||
OptionsModel optionsModel(*node); | OptionsModel optionsModel(*node); | ||||
vpwallets.insert(vpwallets.begin(), &wallet); | vpwallets.insert(vpwallets.begin(), &wallet); | ||||
WalletModel walletModel(std::move(node->getWallets()[0]), *node, | WalletModel walletModel(std::move(node->getWallets()[0]), *node, | ||||
platformStyle.get(), &wallet, &optionsModel); | platformStyle.get(), &optionsModel); | ||||
vpwallets.erase(vpwallets.begin()); | vpwallets.erase(vpwallets.begin()); | ||||
sendCoinsDialog.setModel(&walletModel); | sendCoinsDialog.setModel(&walletModel); | ||||
// Send two transactions, and verify they are added to transaction list. | // Send two transactions, and verify they are added to transaction list. | ||||
TransactionTableModel *transactionTableModel = | TransactionTableModel *transactionTableModel = | ||||
walletModel.getTransactionTableModel(); | walletModel.getTransactionTableModel(); | ||||
QCOMPARE(transactionTableModel->rowCount({}), 105); | QCOMPARE(transactionTableModel->rowCount({}), 105); | ||||
uint256 txid1 = | uint256 txid1 = | ||||
▲ Show 20 Lines • Show All 93 Lines • Show Last 20 Lines |