mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-23 03:59:23 +00:00
CW-566-Cake2FA-Bypass-Bug (#1275)
* fix: TOTP 2FA Bug * fix: key switch error * Fix 2fa preset issue --------- Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
This commit is contained in:
parent
fc352a6da3
commit
f68987bfb9
2 changed files with 5 additions and 3 deletions
|
@ -997,7 +997,7 @@ abstract class SettingsStoreBase with Store {
|
||||||
final totpSecretKey = await SecureKey.getString(
|
final totpSecretKey = await SecureKey.getString(
|
||||||
secureStorage: secureStorage,
|
secureStorage: secureStorage,
|
||||||
sharedPreferences: sharedPreferences,
|
sharedPreferences: sharedPreferences,
|
||||||
key: SecureKey.useTOTP2FA,
|
key: SecureKey.totpSecretKey,
|
||||||
) ??
|
) ??
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -1243,7 +1243,7 @@ abstract class SettingsStoreBase with Store {
|
||||||
totpSecretKey = await SecureKey.getString(
|
totpSecretKey = await SecureKey.getString(
|
||||||
secureStorage: _secureStorage,
|
secureStorage: _secureStorage,
|
||||||
sharedPreferences: sharedPreferences,
|
sharedPreferences: sharedPreferences,
|
||||||
key: SecureKey.useTOTP2FA,
|
key: SecureKey.totpSecretKey,
|
||||||
) ??
|
) ??
|
||||||
totpSecretKey;
|
totpSecretKey;
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,9 @@ abstract class Setup2FAViewModelBase with Store {
|
||||||
unhighlightTabs = false,
|
unhighlightTabs = false,
|
||||||
selected2FASettings = ObservableList<VerboseControlSettings>(),
|
selected2FASettings = ObservableList<VerboseControlSettings>(),
|
||||||
state = InitialExecutionState() {
|
state = InitialExecutionState() {
|
||||||
selectCakePreset(selectedCake2FAPreset);
|
if (selectedCake2FAPreset != Cake2FAPresetsOptions.none) {
|
||||||
|
selectCakePreset(selectedCake2FAPreset);
|
||||||
|
}
|
||||||
reaction((_) => state, _saveLastAuthTime);
|
reaction((_) => state, _saveLastAuthTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue