mirror of
https://github.com/zapstore/zapstore.git
synced 2026-10-05 20:48:24 +00:00
Improve sign in method checks
This commit is contained in:
@@ -54,7 +54,7 @@ class SettingsScreen extends HookConsumerWidget {
|
||||
),
|
||||
Gap(20),
|
||||
if (signedInUser == null ||
|
||||
signedInUser.settings.value!.signInMethod != SignInMethod.nip55)
|
||||
signedInUser.settings.value?.signInMethod != SignInMethod.nip55)
|
||||
Column(
|
||||
children: [
|
||||
Text(
|
||||
|
||||
@@ -29,7 +29,7 @@ class SignInButton extends ConsumerWidget {
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
var user = ref.watch(signedInUserProvider);
|
||||
final signedInWithPubkey =
|
||||
user != null && user.settings.value!.signInMethod != SignInMethod.nip55;
|
||||
user?.settings.value?.signInMethod == SignInMethod.pubkey;
|
||||
if (requireNip55 && signedInWithPubkey) {
|
||||
user = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user