Skip to content

Commit

Permalink
Don't auth on desktop
Browse files Browse the repository at this point in the history
  • Loading branch information
hhanh00 committed Sep 7, 2022
1 parent 9f33562 commit 25462bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -272,14 +272,14 @@ class HomeInnerState extends State<HomeInnerPage> with SingleTickerProviderState
}

_backup() async {
final didAuthenticate = !isMobile() || await authenticate(context, S.of(context).pleaseAuthenticateToShowAccountSeed);
final didAuthenticate = await authenticate(context, S.of(context).pleaseAuthenticateToShowAccountSeed);
if (didAuthenticate) {
Navigator.of(context).pushNamed('/backup');
}
}

_keyTool() async {
final didAuthenticate = !isMobile() || await authenticate(context, S.of(context).pleaseAuthenticateToShowAccountSeed);
final didAuthenticate = await authenticate(context, S.of(context).pleaseAuthenticateToShowAccountSeed);
if (didAuthenticate) {
Navigator.of(context).pushNamed('/keytool');
}
Expand Down
1 change: 1 addition & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ DecodedPaymentURI decodeAddress(BuildContext context, String? v) {
}

Future<bool> authenticate(BuildContext context, String reason) async {
if (!isMobile()) return true;
final localAuth = LocalAuthentication();
try {
final bool didAuthenticate;
Expand Down

0 comments on commit 25462bb

Please sign in to comment.