fix: switch "seed" to "recovery phrase" in more places and handle edgecases for seed verification reminders

This commit is contained in:
Blazebrain
2026-09-09 08:58:09 +01:00
parent 239bbc4900
commit 6bb52fd746
39 changed files with 448 additions and 445 deletions
+6 -2
View File
@@ -43,19 +43,21 @@ class NewHomePage extends StatefulWidget {
class _NewHomePageState extends State<NewHomePage> with RouteAware {
MoneroAccountListViewModel? accountListViewModel;
bool _lightningMode = false;
late final ReactionDisposer _walletReaction;
late final ReactionDisposer _migrationReaction;
@override
void initState() {
super.initState();
_setAccountViewModel();
reaction((_) => widget.dashboardViewModel.wallet, (_) {
_walletReaction = reaction((_) => widget.dashboardViewModel.wallet, (_) {
_setAccountViewModel();
setState(() {
_lightningMode = false;
});
});
reaction((_) => widget.dashboardViewModel.isMigratingToIronwood, (val) {
_migrationReaction = reaction((_) => widget.dashboardViewModel.isMigratingToIronwood, (val) {
if (val && !widget.dashboardViewModel.settingsStore.zcashMigrationModalViewed) {
if (!context.mounted) {
return;
@@ -82,6 +84,8 @@ class _NewHomePageState extends State<NewHomePage> with RouteAware {
@override
void dispose() {
_walletReaction();
_migrationReaction();
routeObserver.unsubscribe(this);
super.dispose();
}
@@ -4,7 +4,11 @@ import "package:flutter/widgets.dart";
void openWalletAfterSeedFlow(BuildContext context, WalletType walletType) {
if (walletType == WalletType.bitcoin) {
Navigator.of(context).pushNamed(Routes.lightningUsernamePage, arguments: true);
Navigator.of(context).pushNamedAndRemoveUntil(
Routes.lightningUsernamePage,
(route) => route.isFirst,
arguments: true,
);
return;
}
+3 -11
View File
@@ -103,18 +103,10 @@ class _PreSeedPageState extends State<PreSeedPage> {
void _confirmSkip() {
Navigator.of(context).push(
CupertinoPageRoute<void>(
builder: (_) => SkipSeedVerificationPage(onConfirm: _skipVerification),
builder: (_) => SkipSeedVerificationPage(
onConfirm: () => openWalletAfterSeedFlow(context, widget.wallet.type),
),
),
);
}
Future<void> _skipVerification() async {
await widget.wallet.walletInfo.updateShowSeedBackupReminder(true);
if (!mounted) {
return;
}
openWalletAfterSeedFlow(context, widget.wallet.type);
}
}
@@ -334,8 +334,8 @@ class WalletRestoreFromSeedFormState extends State<WalletRestoreFromSeedForm> {
});
}
void _setLanguageLabel(String language) =>
languageController.text = '${language.replaceAll("POLYSEED_", "")} (Seed language)';
void _setLanguageLabel(String language) => languageController.text =
"${language.replaceAll("POLYSEED_", "")} (${S.current.seed_language})";
void _changeSeedType(MoneroSeedType item) {
widget.seedSettingsViewModel.setMoneroSeedType(item);
@@ -1148,7 +1148,7 @@ abstract class DashboardViewModelBase with Store {
@action
Future<void> dismissSeedBackupReminder() async {
showSeedBackupReminder = false;
await wallet.walletInfo.updateShowSeedBackupReminder(false);
await wallet.walletInfo.clearSeedBackupReminder();
}
@action
+1
View File
@@ -164,6 +164,7 @@ abstract class WalletNewVMBase extends WalletCreationVM with Store {
@override
Future<WalletBase> process(WalletCredentials credentials) async {
walletCreationService.changeWalletType(type: type);
credentials.walletInfo!.showSeedBackupReminder = newWalletArguments!.mnemonic == null;
return walletCreationService.create(credentials, isTestnet: useTestnet);
}
}
+1 -1
View File
@@ -153,6 +153,6 @@ abstract class WalletSeedViewModelBase with Store {
return;
}
await _walletInfo.updateShowSeedBackupReminder(false);
await _walletInfo.clearSeedBackupReminder();
}
}