aboutsummaryrefslogtreecommitdiff
path: root/src/qt/walletframe.h
diff options
context:
space:
mode:
authorJoão Barbosa <joao.paulo.barbosa@gmail.com>2019-09-26 21:43:44 +0100
committerJoão Barbosa <joao.paulo.barbosa@gmail.com>2019-10-26 14:55:31 +0100
commit6d6a7a8403ae923f189812edebdd95761de0e7f2 (patch)
tree0740bbb136767b7ca8896900bd13abcd4fb1e29c /src/qt/walletframe.h
parent81ea66c30e2953dee24d5b127c28daa0d9452a28 (diff)
downloadbitcoin-6d6a7a8403ae923f189812edebdd95761de0e7f2.tar.xz
gui: Fix duplicate wallet showing up
The slot BitcoinGUI::addWallet can be invoked twice for the same WalletModel due to a concurrent wallet being loaded after the first `connect()`: ```cpp connect(wallet_controller, &WalletController::walletAdded, this, &BitcoinGUI::addWallet); connect(wallet_controller, &WalletController::walletRemoved, this, &BitcoinGUI::removeWallet); for (WalletModel* wallet_model : m_wallet_controller->getOpenWallets()) { addWallet(wallet_model); ```
Diffstat (limited to 'src/qt/walletframe.h')
-rw-r--r--src/qt/walletframe.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qt/walletframe.h b/src/qt/walletframe.h
index 156653f47d..20fad08b0e 100644
--- a/src/qt/walletframe.h
+++ b/src/qt/walletframe.h
@@ -36,7 +36,7 @@ public:
void setClientModel(ClientModel *clientModel);
- void addWallet(WalletModel *walletModel);
+ bool addWallet(WalletModel *walletModel);
void setCurrentWallet(WalletModel* wallet_model);
void removeWallet(WalletModel* wallet_model);
void removeAllWallets();