diff --git a/src/domain/session/settings/KeyBackupViewModel.ts b/src/domain/session/settings/KeyBackupViewModel.ts index 7648e4de..dc1a15d9 100644 --- a/src/domain/session/settings/KeyBackupViewModel.ts +++ b/src/domain/session/settings/KeyBackupViewModel.ts @@ -151,7 +151,7 @@ export class KeyBackupViewModel extends ViewModel { return !!this._crossSigning; } - async signOwnDevice(): Promise { + private async _signOwnDevice(): Promise { const crossSigning = this._crossSigning; if (crossSigning) { await this.logger.run("KeyBackupViewModel.signOwnDevice", async log => { @@ -208,6 +208,7 @@ export class KeyBackupViewModel extends ViewModel { if (setupDehydratedDevice) { this._dehydratedDeviceId = await this._session.setupDehydratedDevice(key); } + await this._signOwnDevice(); } catch (err) { console.error(err); this._error = err; diff --git a/src/platform/web/ui/session/settings/KeyBackupSettingsView.ts b/src/platform/web/ui/session/settings/KeyBackupSettingsView.ts index 7c3d6491..4b60bfc6 100644 --- a/src/platform/web/ui/session/settings/KeyBackupSettingsView.ts +++ b/src/platform/web/ui/session/settings/KeyBackupSettingsView.ts @@ -63,14 +63,6 @@ export class KeyBackupSettingsView extends TemplateView { }), t.if(vm => vm.canSignOwnDevice, t => { return t.div([ - t.button( - { - onClick: disableTargetCallback(async (evt) => { - await vm.signOwnDevice(); - }), - }, - "Sign own device" - ), t.button( { onClick: disableTargetCallback(async () => {