Store main key also when verifying recovery code

in case it wasn't stored before
This commit is contained in:
Torsten Grote 2021-02-15 11:13:12 -03:00 committed by Chirayu Desai
parent c8a7e763d6
commit 100a99484a

View file

@ -73,7 +73,9 @@ class RecoveryCodeViewModel(
keyManager.storeMainKey(seed)
mRecoveryCodeSaved.setEvent(true)
} else {
mExistingCodeChecked.setEvent(crypto.verifyBackupKey(seed))
val verified = crypto.verifyBackupKey(seed)
if (verified && !keyManager.hasMainKey()) keyManager.storeMainKey(seed)
mExistingCodeChecked.setEvent(verified)
}
}