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
parent 851407037e
commit 68543dcb91
No known key found for this signature in database
GPG key ID: 3E5F77D92CF891FF

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)
}
}