Hack for display login issue

This commit is contained in:
M 2020-11-12 22:02:37 +02:00
parent 52c5d11787
commit 4e4cd08135
3 changed files with 22 additions and 9 deletions

View file

@ -7,13 +7,19 @@ import 'package:cake_wallet/store/authentication_store.dart';
ReactionDisposer _onAuthenticationStateChange;
dynamic loginError;
void startAuthenticationStateChange(AuthenticationStore authenticationStore,
@required GlobalKey<NavigatorState> navigatorKey) {
_onAuthenticationStateChange ??= autorun((_) async {
final state = authenticationStore.state;
if (state == AuthenticationState.installed) {
await loadCurrentWallet();
try {
await loadCurrentWallet();
} catch(e) {
loginError = e;
}
return;
}