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

Method closeWallet

src/qt/walletcontroller.cpp:80–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80void WalletController::closeWallet(WalletModel* wallet_model, QWidget* parent)
81{
82 QMessageBox box(parent);
83 box.setWindowTitle(tr("Close wallet"));
84 box.setText(tr("Are you sure you wish to close the wallet <i>%1</i>?").arg(GUIUtil::HtmlEscape(wallet_model->getDisplayName())));
85 box.setInformativeText(tr("Closing the wallet for too long can result in having to resync the entire chain if pruning is enabled."));
86 box.setStandardButtons(QMessageBox::Yes|QMessageBox::Cancel);
87 box.setDefaultButton(QMessageBox::Yes);
88 if (box.exec() != QMessageBox::Yes) return;
89
90 // First remove wallet from node.
91 wallet_model->wallet().remove();
92 // Now release the model.
93 removeAndDeleteWallet(wallet_model);
94}
95
96void WalletController::closeAllWallets(QWidget* parent)
97{

Callers 1

createActionsMethod · 0.80

Calls 6

HtmlEscapeFunction · 0.85
setTextMethod · 0.80
getDisplayNameMethod · 0.80
execMethod · 0.80
removeMethod · 0.45
walletMethod · 0.45

Tested by

no test coverage detected