| 471 | } |
| 472 | |
| 473 | void MigrateWalletActivity::migrate(const std::string& name) |
| 474 | { |
| 475 | // Warn the user about migration |
| 476 | QMessageBox box(m_parent_widget); |
| 477 | box.setWindowTitle(tr("Migrate wallet")); |
| 478 | box.setText(tr("Are you sure you wish to migrate the wallet <i>%1</i>?").arg(GUIUtil::HtmlEscape(GUIUtil::WalletDisplayName(name)))); |
| 479 | box.setInformativeText(tr("Migrating the wallet will convert this wallet to one or more descriptor wallets. A new wallet backup will need to be made.\n" |
| 480 | "If this wallet contains any watchonly scripts, a new wallet will be created which contains those watchonly scripts.\n" |
| 481 | "If this wallet contains any solvable but not watched scripts, a different and new wallet will be created which contains those scripts.\n\n" |
| 482 | "The migration process will create a backup of the wallet before migrating. This backup file will be named " |
| 483 | "<wallet name>-<timestamp>.legacy.bak and can be found in the directory for this wallet. In the event of " |
| 484 | "an incorrect migration, the backup can be restored with the \"Restore Wallet\" functionality.")); |
| 485 | box.setStandardButtons(QMessageBox::Yes|QMessageBox::Cancel); |
| 486 | box.setDefaultButton(QMessageBox::Yes); |
| 487 | if (box.exec() != QMessageBox::Yes) return; |
| 488 | |
| 489 | do_migrate(name); |
| 490 | } |
| 491 | |
| 492 | void MigrateWalletActivity::restore_and_migrate(const fs::path& path, const std::string& wallet_name) |
| 493 | { |
no test coverage detected