Skip to content

Commit

Permalink
feat: Remove restore option for talao #2988
Browse files Browse the repository at this point in the history
  • Loading branch information
bibash28 committed Oct 23, 2024
1 parent 0d6333c commit cf68593
Showing 1 changed file with 37 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,43 +117,44 @@ class WalletSecurityView extends StatelessWidget {
);
},
),
DrawerItem(
title: l10n.restore,
onTap: () async {
final confirm = await showDialog<bool>(
context: context,
builder: (context) => ConfirmDialog(
title: l10n.warningDialogTitle,
subtitle:
l10n.restorationCredentialWarningDialogSubtitle,
yes: l10n.showDialogYes,
no: l10n.showDialogNo,
),
) ??
false;

if (confirm) {
await securityCheck(
context: context,
localAuthApi: LocalAuthApi(),
onSuccess: () {
Navigator.of(context).push<void>(
RestoreCredentialMnemonicPage.route(
title: l10n.restoreCredential,
isValidCallback: () {
Navigator.of(context).push<void>(
RestoreCredentialPage.route(
fromOnBoarding: false,
),
);
},
if (Parameters.importAtOnboarding)
DrawerItem(
title: l10n.restore,
onTap: () async {
final confirm = await showDialog<bool>(
context: context,
builder: (context) => ConfirmDialog(
title: l10n.warningDialogTitle,
subtitle:
l10n.restorationCredentialWarningDialogSubtitle,
yes: l10n.showDialogYes,
no: l10n.showDialogNo,
),
);
},
);
}
},
),
) ??
false;

if (confirm) {
await securityCheck(
context: context,
localAuthApi: LocalAuthApi(),
onSuccess: () {
Navigator.of(context).push<void>(
RestoreCredentialMnemonicPage.route(
title: l10n.restoreCredential,
isValidCallback: () {
Navigator.of(context).push<void>(
RestoreCredentialPage.route(
fromOnBoarding: false,
),
);
},
),
);
},
);
}
},
),
],
),
);
Expand Down

0 comments on commit cf68593

Please sign in to comment.