Require pin code on backup and seed/view page (#844)

* Require pin code on backup and seedview page

* Require pin code on backup and seedview page
This commit is contained in:
Godwin Asuquo 2023-03-23 18:18:02 +02:00 committed by GitHub
parent ab4d020560
commit 893a267de6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,26 +27,22 @@ class SecurityBackupPage extends BasePage {
child: Column(mainAxisSize: MainAxisSize.min, children: [ child: Column(mainAxisSize: MainAxisSize.min, children: [
SettingsCellWithArrow( SettingsCellWithArrow(
title: S.current.show_keys, title: S.current.show_keys,
handler: (_) => _securitySettingsViewModel.checkPinCodeRiquired() handler: (_) => Navigator.of(context).pushNamed(Routes.auth,
? Navigator.of(context).pushNamed(Routes.auth, arguments: (bool isAuthenticatedSuccessfully, AuthPageState auth) {
arguments: (bool isAuthenticatedSuccessfully, AuthPageState auth) { if (isAuthenticatedSuccessfully) {
if (isAuthenticatedSuccessfully) { auth.close(route: Routes.showKeys);
auth.close(route: Routes.showKeys); }
} }),
})
: Navigator.of(context).pushNamed(Routes.showKeys),
), ),
StandardListSeparator(padding: EdgeInsets.symmetric(horizontal: 24)), StandardListSeparator(padding: EdgeInsets.symmetric(horizontal: 24)),
SettingsCellWithArrow( SettingsCellWithArrow(
title: S.current.create_backup, title: S.current.create_backup,
handler: (_) => _securitySettingsViewModel.checkPinCodeRiquired() handler: (_) => Navigator.of(context).pushNamed(Routes.auth,
? Navigator.of(context).pushNamed(Routes.auth, arguments: (bool isAuthenticatedSuccessfully, AuthPageState auth) {
arguments: (bool isAuthenticatedSuccessfully, AuthPageState auth) { if (isAuthenticatedSuccessfully) {
if (isAuthenticatedSuccessfully) { auth.close(route: Routes.backup);
auth.close(route: Routes.backup); }
} }),
})
: Navigator.of(context).pushNamed(Routes.backup),
), ),
StandardListSeparator(padding: EdgeInsets.symmetric(horizontal: 24)), StandardListSeparator(padding: EdgeInsets.symmetric(horizontal: 24)),
SettingsCellWithArrow( SettingsCellWithArrow(