mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 19:49:22 +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(
|
||||
secureStorage: secureStorage,
|
||||
sharedPreferences: sharedPreferences,
|
||||
key: SecureKey.useTOTP2FA,
|
||||
key: SecureKey.totpSecretKey,
|
||||
) ??
|
||||
'';
|
||||
|
||||
|
@ -1243,7 +1243,7 @@ abstract class SettingsStoreBase with Store {
|
|||
totpSecretKey = await SecureKey.getString(
|
||||
secureStorage: _secureStorage,
|
||||
sharedPreferences: sharedPreferences,
|
||||
key: SecureKey.useTOTP2FA,
|
||||
key: SecureKey.totpSecretKey,
|
||||
) ??
|
||||
totpSecretKey;
|
||||
|
||||
|
|
|
@ -27,7 +27,9 @@ abstract class Setup2FAViewModelBase with Store {
|
|||
unhighlightTabs = false,
|
||||
selected2FASettings = ObservableList<VerboseControlSettings>(),
|
||||
state = InitialExecutionState() {
|
||||
selectCakePreset(selectedCake2FAPreset);
|
||||
if (selectedCake2FAPreset != Cake2FAPresetsOptions.none) {
|
||||
selectCakePreset(selectedCake2FAPreset);
|
||||
}
|
||||
reaction((_) => state, _saveLastAuthTime);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue