Merge branch 'soru/cache-ssss-keys-in-bootstrap-dialog' into 'main'

fix: Cache ssss keys if using an existing ssss in bootstrapping

Closes fluffychat#274

See merge request famedly/famedlysdk!636
This commit is contained in:
Krille Fear 2021-02-03 14:54:12 +00:00
commit 9274c85bef
1 changed files with 2 additions and 1 deletions

View File

@ -308,13 +308,14 @@ class Bootstrap {
checkCrossSigning(); checkCrossSigning();
} }
void openExistingSsss() { Future<void> openExistingSsss() async {
if (state != BootstrapState.openExistingSsss) { if (state != BootstrapState.openExistingSsss) {
throw BootstrapBadStateException(); throw BootstrapBadStateException();
} }
if (!newSsssKey.isUnlocked) { if (!newSsssKey.isUnlocked) {
throw BootstrapBadStateException('Key not unlocked'); throw BootstrapBadStateException('Key not unlocked');
} }
await newSsssKey.maybeCacheAll();
checkCrossSigning(); checkCrossSigning();
} }