| 284 | } |
| 285 | |
| 286 | void CreateWalletActivity::create() |
| 287 | { |
| 288 | m_create_wallet_dialog = new CreateWalletDialog(m_parent_widget); |
| 289 | |
| 290 | std::vector<std::unique_ptr<interfaces::ExternalSigner>> signers; |
| 291 | try { |
| 292 | signers = node().listExternalSigners(); |
| 293 | } catch (const std::runtime_error& e) { |
| 294 | QMessageBox::critical(nullptr, tr("Can't list signers"), e.what()); |
| 295 | } |
| 296 | m_create_wallet_dialog->setSigners(signers); |
| 297 | |
| 298 | m_create_wallet_dialog->setWindowModality(Qt::ApplicationModal); |
| 299 | m_create_wallet_dialog->show(); |
| 300 | |
| 301 | connect(m_create_wallet_dialog, &QObject::destroyed, [this] { |
| 302 | m_create_wallet_dialog = nullptr; |
| 303 | }); |
| 304 | connect(m_create_wallet_dialog, &QDialog::rejected, [this] { |
| 305 | Q_EMIT finished(); |
| 306 | }); |
| 307 | connect(m_create_wallet_dialog, &QDialog::accepted, [this] { |
| 308 | if (m_create_wallet_dialog->isEncryptWalletChecked()) { |
| 309 | askPassphrase(); |
| 310 | } else { |
| 311 | createWallet(); |
| 312 | } |
| 313 | }); |
| 314 | } |
| 315 | |
| 316 | OpenWalletActivity::OpenWalletActivity(WalletController* wallet_controller, QWidget* parent_widget) |
| 317 | : WalletControllerActivity(wallet_controller, parent_widget) |
no test coverage detected