Changeset View
Changeset View
Standalone View
Standalone View
src/qt/test/wallettests.cpp
#include <qt/test/util.h> | #include <qt/test/util.h> | ||||
#include <qt/test/wallettests.h> | #include <qt/test/wallettests.h> | ||||
#include <cashaddrenc.h> | #include <cashaddrenc.h> | ||||
#include <chain.h> | #include <chain.h> | ||||
#include <chainparams.h> | #include <chainparams.h> | ||||
#include <interfaces/chain.h> | #include <interfaces/chain.h> | ||||
#include <interfaces/node.h> | #include <interfaces/node.h> | ||||
#include <key_io.h> | #include <key_io.h> | ||||
#include <network.h> | #include <network.h> | ||||
#include <qt/bitcoinamountfield.h> | #include <qt/bitcoinamountfield.h> | ||||
#include <qt/clientmodel.h> | |||||
#include <qt/optionsmodel.h> | #include <qt/optionsmodel.h> | ||||
#include <qt/overviewpage.h> | #include <qt/overviewpage.h> | ||||
#include <qt/platformstyle.h> | #include <qt/platformstyle.h> | ||||
#include <qt/qvalidatedlineedit.h> | #include <qt/qvalidatedlineedit.h> | ||||
#include <qt/receivecoinsdialog.h> | #include <qt/receivecoinsdialog.h> | ||||
#include <qt/receiverequestdialog.h> | #include <qt/receiverequestdialog.h> | ||||
#include <qt/recentrequeststablemodel.h> | #include <qt/recentrequeststablemodel.h> | ||||
#include <qt/sendcoinsdialog.h> | #include <qt/sendcoinsdialog.h> | ||||
▲ Show 20 Lines • Show All 123 Lines • ▼ Show 20 Lines | wallet->LoadWallet(firstRun); | ||||
QVERIFY(result.last_failed_block.IsNull()); | QVERIFY(result.last_failed_block.IsNull()); | ||||
} | } | ||||
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")); | ||||
OptionsModel optionsModel; | OptionsModel optionsModel; | ||||
ClientModel clientModel(node, &optionsModel); | |||||
AddWallet(wallet); | AddWallet(wallet); | ||||
WalletModel walletModel(interfaces::MakeWallet(wallet), node, | WalletModel walletModel(interfaces::MakeWallet(wallet), clientModel, | ||||
platformStyle.get(), &optionsModel); | platformStyle.get()); | ||||
RemoveWallet(wallet); | RemoveWallet(wallet); | ||||
SendCoinsDialog sendCoinsDialog(platformStyle.get(), &walletModel); | SendCoinsDialog sendCoinsDialog(platformStyle.get(), &walletModel); | ||||
{ | { | ||||
// Check balance in send dialog | // Check balance in send dialog | ||||
QLabel *balanceLabel = | QLabel *balanceLabel = | ||||
sendCoinsDialog.findChild<QLabel *>("labelBalance"); | sendCoinsDialog.findChild<QLabel *>("labelBalance"); | ||||
QString balanceText = balanceLabel->text(); | QString balanceText = balanceLabel->text(); | ||||
▲ Show 20 Lines • Show All 114 Lines • Show Last 20 Lines |