gui: Use wallet name for wallet migration rather than WalletModel

To prepare for migrating wallets that are not loaded, when migration
occurs in the GUI, it should not rely on a WalletModel existing.

Co-authored-by: furszy <matiasfurszyfer@protonmail.com>
This commit is contained in:
Ava Chow
2024-06-10 15:40:53 -04:00
parent c3918583dd
commit d56a450bf5
9 changed files with 51 additions and 18 deletions

View File

@@ -458,7 +458,7 @@ void BitcoinGUI::createActions()
connect(m_migrate_wallet_action, &QAction::triggered, [this] {
auto activity = new MigrateWalletActivity(m_wallet_controller, this);
connect(activity, &MigrateWalletActivity::migrated, this, &BitcoinGUI::setCurrentWallet);
activity->migrate(walletFrame->currentWalletModel());
activity->migrate(walletFrame->currentWalletModel()->wallet().getWalletName());
});
connect(m_mask_values_action, &QAction::toggled, this, &BitcoinGUI::setPrivacy);
connect(m_mask_values_action, &QAction::toggled, this, &BitcoinGUI::enableHistoryAction);