Changeset View
Changeset View
Standalone View
Standalone View
src/qt/bitcoin.cpp
Show First 20 Lines • Show All 358 Lines • ▼ Show 20 Lines | |||||
void BitcoinApplication::addWallet(WalletModel *walletModel) { | void BitcoinApplication::addWallet(WalletModel *walletModel) { | ||||
#ifdef ENABLE_WALLET | #ifdef ENABLE_WALLET | ||||
window->addWallet(walletModel); | window->addWallet(walletModel); | ||||
if (m_wallet_models.empty()) { | if (m_wallet_models.empty()) { | ||||
window->setCurrentWallet(walletModel->getWalletName()); | window->setCurrentWallet(walletModel->getWalletName()); | ||||
} | } | ||||
// This null check diverges from Core and is a temporary fix until PR15101 | |||||
// is backported. addWallet() is removed entirely in that backport, so no | |||||
// extra action will need to be taken. | |||||
if (paymentServer) { | |||||
connect(walletModel, &WalletModel::coinsSent, paymentServer, | connect(walletModel, &WalletModel::coinsSent, paymentServer, | ||||
&PaymentServer::fetchPaymentACK); | &PaymentServer::fetchPaymentACK); | ||||
} | |||||
connect(walletModel, &WalletModel::unload, this, | connect(walletModel, &WalletModel::unload, this, | ||||
&BitcoinApplication::removeWallet); | &BitcoinApplication::removeWallet); | ||||
m_wallet_models.push_back(walletModel); | m_wallet_models.push_back(walletModel); | ||||
#endif | #endif | ||||
} | } | ||||
void BitcoinApplication::removeWallet() { | void BitcoinApplication::removeWallet() { | ||||
▲ Show 20 Lines • Show All 408 Lines • Show Last 20 Lines |