MCPcopy Create free account
hub / github.com/ElementsProject/elements / closeAllWallets

Method closeAllWallets

src/qt/walletcontroller.cpp:96–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96void WalletController::closeAllWallets(QWidget* parent)
97{
98 QMessageBox::StandardButton button = QMessageBox::question(parent, tr("Close all wallets"),
99 tr("Are you sure you wish to close all wallets?"),
100 QMessageBox::Yes|QMessageBox::Cancel,
101 QMessageBox::Yes);
102 if (button != QMessageBox::Yes) return;
103
104 QMutexLocker locker(&m_mutex);
105 for (WalletModel* wallet_model : m_wallets) {
106 wallet_model->wallet().remove();
107 Q_EMIT walletRemoved(wallet_model);
108 delete wallet_model;
109 }
110 m_wallets.clear();
111}
112
113WalletModel* WalletController::getOrCreateWallet(std::unique_ptr<interfaces::Wallet> wallet)
114{

Callers 1

createActionsMethod · 0.80

Calls 3

removeMethod · 0.45
walletMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected