mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 20:39:51 +00:00
Fixes for gray screen bug.
This commit is contained in:
parent
606f4e59c5
commit
2eb229b91e
5 changed files with 36 additions and 7 deletions
23
lib/di.dart
23
lib/di.dart
|
@ -61,6 +61,7 @@ import 'package:cake_wallet/view_model/exchange/exchange_view_model.dart';
|
|||
import 'package:flutter/widgets.dart';
|
||||
import 'package:get_it/get_it.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
import 'package:mobx/mobx.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
||||
import 'package:cake_wallet/view_model/wallet_restoration_from_seed_vm.dart';
|
||||
|
@ -177,11 +178,25 @@ Future setup(
|
|||
BiometricAuth()));
|
||||
|
||||
getIt.registerFactory<AuthPage>(
|
||||
() => AuthPage(getIt.get<AuthViewModel>(),
|
||||
onAuthenticationFinished: (isAuthenticated, __) {
|
||||
if (isAuthenticated) {
|
||||
getIt.get<AuthenticationStore>().allowed();
|
||||
() => AuthPage(getIt.get<AuthViewModel>(), onAuthenticationFinished:
|
||||
(isAuthenticated, AuthPageState authPageState) {
|
||||
if (!isAuthenticated) {
|
||||
return;
|
||||
}
|
||||
final authStore = getIt.get<AuthenticationStore>();
|
||||
final appStore = getIt.get<AppStore>();
|
||||
|
||||
if (appStore.wallet != null) {
|
||||
authStore.allowed();
|
||||
return;
|
||||
}
|
||||
|
||||
authPageState.changeProcessText('Loading the wallet');
|
||||
ReactionDisposer _reaction;
|
||||
_reaction = reaction((_) => appStore.wallet, (Object _) {
|
||||
_reaction?.reaction?.dispose();
|
||||
authStore.allowed();
|
||||
});
|
||||
}, closable: false),
|
||||
instanceName: 'login');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue