mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 11:39:22 +00:00
Cw-410 Null Issue With 2FA (#960)
* chore: Setup * hotfix: null check operator used when totp arguments are null causing issues * hotfix: null check operator used when totp arguments are null causing issues * hotfix: null check operator used when totp arguments are null causing issues * hotfix: null check operator used when totp arguments are null causing issues * fix: Review changes --------- Co-authored-by: David Adegoke <blazebrain@Davids-MacBook-Pro.local>
This commit is contained in:
parent
8747d2fe59
commit
3b073d9751
5 changed files with 18 additions and 22 deletions
|
@ -1,10 +1,9 @@
|
|||
import 'dart:async';
|
||||
|
||||
import 'package:connectivity_plus/connectivity_plus.dart';
|
||||
import 'package:cw_core/wallet_base.dart';
|
||||
import 'package:cw_core/sync_status.dart';
|
||||
import 'package:cake_wallet/store/settings_store.dart';
|
||||
import 'package:connectivity/connectivity.dart';
|
||||
|
||||
Timer? _checkConnectionTimer;
|
||||
|
||||
void startCheckConnectionReaction(
|
||||
|
|
|
@ -43,26 +43,24 @@ class TotpAuthCodePageState extends State<TotpAuthCodePage> {
|
|||
|
||||
@override
|
||||
void initState() {
|
||||
if(widget.totpArguments.onTotpAuthenticationFinished != null) {
|
||||
_reaction ??= reaction((_) => widget.setup2FAViewModel.state, (ExecutionState state) {
|
||||
if (state is ExecutedSuccessfullyState) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
if (state is ExecutedSuccessfullyState) {
|
||||
widget.totpArguments.onTotpAuthenticationFinished!(true, this);
|
||||
});
|
||||
}
|
||||
|
||||
if (state is FailureState) {
|
||||
print(state.error);
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
widget.totpArguments.onTotpAuthenticationFinished!(false, this);
|
||||
});
|
||||
}
|
||||
|
||||
if (state is AuthenticationBanned) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
widget.totpArguments.onTotpAuthenticationFinished!(false, this);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
super.initState();
|
||||
}
|
||||
|
|
|
@ -580,7 +580,6 @@ abstract class SettingsStoreBase with Store {
|
|||
if (Platform.isAndroid) {
|
||||
final androidInfo = await deviceInfoPlugin.androidInfo;
|
||||
deviceName = '${androidInfo.brand}%20${androidInfo.manufacturer}%20${androidInfo.model}';
|
||||
print(deviceName);
|
||||
} else if (Platform.isIOS) {
|
||||
final iosInfo = await deviceInfoPlugin.iosInfo;
|
||||
deviceName = iosInfo.model;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
import FlutterMacOS
|
||||
import Foundation
|
||||
|
||||
import connectivity_macos
|
||||
import connectivity_plus_macos
|
||||
import cw_monero
|
||||
import device_info_plus
|
||||
import devicelocale
|
||||
|
|
|
@ -56,8 +56,8 @@ dependencies:
|
|||
# password: ^1.0.0
|
||||
basic_utils: ^4.3.0
|
||||
get_it: ^7.2.0
|
||||
connectivity: ^3.0.3
|
||||
# connectivity_plus: ^2.3.5
|
||||
# connectivity: ^3.0.3
|
||||
connectivity_plus: ^2.3.5
|
||||
keyboard_actions: ^4.0.1
|
||||
another_flushbar: ^1.12.29
|
||||
archive: ^3.3.0
|
||||
|
|
Loading…
Reference in a new issue