You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge bitcoin-core/gui#877: Add a menu action to restore then migrate a legacy wallet
14371fd gui: Add a menu item to restore then migrate a wallet file (Ava Chow)
f11a7d2 gui: Add restore_and_migrate function to restore then migrate a wallet (Ava Chow)
16ab6df gui: Move actual migration part of migrate() to its own function (Ava Chow)
4ec2d18 wallet, interfaces, gui: Expose load_after_restore parameter (Ava Chow)
Pull request description:
Some users will have a backup of their legacy wallet. These cannot be restored since the "Restore Wallet" action expects to be able to load the wallet after restoring, and this fails for legacy wallets now that they are deleted. Furthermore, the "Migrate Wallet" action only allows users to migrate wallets that are in the wallets directory, so such backups cannot be migrated from the GUI.
This PR resolves this issue by adding a menu item in the "Migrate Wallet" menu which allows users to select their backup file so that it will first be restored but not loaded, and then migrated.
Depends on bitcoin#32620
ACKs for top commit:
hebasto:
ACK 14371fd.
Tree-SHA512: 2b09c012f4c70d0cb283305bf3d1a18ae5a2bfb80977c91544ac1fbc29d6360df49438cfdc8f66661ddb42ddab728c8ef1f9e0d7031877fbd846f9cea957398e
box.setText(tr("Are you sure you wish to migrate the wallet <i>%1</i>?").arg(GUIUtil::HtmlEscape(GUIUtil::WalletDisplayName(name))));
448
-
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"
449
-
"If this wallet contains any watchonly scripts, a new wallet will be created which contains those watchonly scripts.\n"
450
-
"If this wallet contains any solvable but not watched scripts, a different and new wallet will be created which contains those scripts.\n\n"
451
-
"The migration process will create a backup of the wallet before migrating. This backup file will be named "
452
-
"<wallet name>-<timestamp>.legacy.bak and can be found in the directory for this wallet. In the event of "
453
-
"an incorrect migration, the backup can be restored with the \"Restore Wallet\" functionality."));
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."));
box.setWindowTitle(tr("Restore and Migrate wallet"));
497
+
box.setText(tr("Are you sure you wish to restore the wallet file <i>%1</i> to <i>%2</i> and migrate it?").arg(GUIUtil::HtmlEscape(fs::PathToString(path)), GUIUtil::HtmlEscape(GUIUtil::WalletDisplayName(wallet_name))));
498
+
box.setInformativeText(tr("Restoring the wallet will copy the backup file to the wallets directory and place it in the standard "
499
+
"wallet directory layout. The original file will not be modified.\n\n"
500
+
"Migrating the wallet will convert the restored wallet to one or more descriptor wallets. A new wallet backup will need to be made.\n"
501
+
"If this wallet contains any watchonly scripts, a new wallet will be created which contains those watchonly scripts.\n"
502
+
"If this wallet contains any solvable but not watched scripts, a different and new wallet will be created which contains those scripts.\n\n"
503
+
"The migration process will create a backup of the wallet before migrating. This backup file will be named "
504
+
"<wallet name>-<timestamp>.legacy.bak and can be found in the directory for this wallet. In the event of "
505
+
"an incorrect migration, the backup can be restored with the \"Restore Wallet\" functionality."));
0 commit comments