Show backup import UI on Link-and-Sync

This commit is contained in:
Fedor Indutny 2024-11-04 15:04:11 -08:00 committed by GitHub
parent 936d21d749
commit 0c038f2971
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 1 deletions

View file

@ -227,6 +227,20 @@ export class Provisioner {
};
}
public isLinkAndSync(): boolean {
strictAssert(
this.state.step === Step.ReadyToLink,
`Invalid state for prepareLinkData: ${this.state.step}`
);
const { envelope } = this.state;
return (
isLinkAndSyncEnabled(this.appVersion) &&
Bytes.isNotEmpty(envelope.ephemeralBackupKey)
);
}
private handleRequest(request: IncomingWebSocketRequest): void {
const pubKey = this.cipher.getPublicKey();