Changeset View
Changeset View
Standalone View
Standalone View
src/qt/test/wallettests.cpp
Show First 20 Lines • Show All 142 Lines • ▼ Show 20 Lines | #endif | ||||
wallet.SetBroadcastTransactions(true); | wallet.SetBroadcastTransactions(true); | ||||
// 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); | AddWallet(&wallet); | ||||
WalletModel walletModel(std::move(node->getWallets()[0]), *node, | WalletModel walletModel(std::move(node->getWallets().back()), *node, | ||||
platformStyle.get(), &optionsModel); | platformStyle.get(), &optionsModel); | ||||
vpwallets.erase(vpwallets.begin()); | RemoveWallet(&wallet); | ||||
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 = | ||||
SendCoins(wallet, sendCoinsDialog, CTxDestination(CKeyID()), 5 * COIN); | SendCoins(wallet, sendCoinsDialog, CTxDestination(CKeyID()), 5 * COIN); | ||||
▲ Show 20 Lines • Show All 89 Lines • Show Last 20 Lines |