| 78 | } |
| 79 | |
| 80 | void 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 | |
| 96 | void WalletController::closeAllWallets(QWidget* parent) |
| 97 | { |
no test coverage detected