From 1424f5fd866f61affddd96addc7501850adcee49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren?= Date: Sun, 1 Dec 2024 14:01:15 +0100 Subject: [PATCH] Remove broken skip functionality in LoginSuccess When skipping, no data was actually stored anywhere, so when being forwarded to the wallet, the user was sent right back to onboarding. --- src/views/LoginSuccess.vue | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/src/views/LoginSuccess.vue b/src/views/LoginSuccess.vue index 623b7091..6fb8b68d 100644 --- a/src/views/LoginSuccess.vue +++ b/src/views/LoginSuccess.vue @@ -8,12 +8,7 @@ :lightBlue="true" :mainAction="action" @main-action="resolve" - :alternativeAction="$t('Continue to Wallet')" - @alternative-action="skip" :message="message" /> -
- -
@@ -52,7 +47,6 @@ export default class LoginSuccess extends Vue { private action: string = ''; private receiptsError: Error | null = null; private result: Account[] | null = null; - private canSkip = true; private resolve = (...args: any[]) => {}; // tslint:disable-line:no-empty @@ -134,7 +128,6 @@ export default class LoginSuccess extends Vue { }), ); } catch (e) { - this.canSkip = false; this.state = StatusScreen.State.ERROR; this.title = this.$t('Fetching Addresses Failed') as string; this.message = this.$t('Syncing with the network failed: {error}', { error: e.message || e }) as string; @@ -194,7 +187,6 @@ export default class LoginSuccess extends Vue { private onUpdate(walletInfo: WalletInfo, currentlyCheckedAccounts: BasicAccountInfo[]) { const count = !walletInfo ? 0 : walletInfo.accounts.size; - this.canSkip = count > 0; if (count <= 1) return; this.status = this.$tc('Imported {count} address so far... | Imported {count} addresses so far...', count); } @@ -202,8 +194,6 @@ export default class LoginSuccess extends Vue { private async done() { if (!this.walletInfos.length) throw new Error('WalletInfo not ready.'); - this.canSkip = false; - // Add wallets to vuex for (const walletInfo of this.walletInfos) { this.$addWalletAndSetActive(walletInfo); @@ -235,33 +225,5 @@ export default class LoginSuccess extends Vue { this.state = StatusScreen.State.SUCCESS; setTimeout(() => { this.$rpc.resolve(result); }, StatusScreen.SUCCESS_REDIRECT_DELAY); } - - private async skip() { - this.canSkip = false; - this.title = this.$t('Welcome back!') as string; - this.state = StatusScreen.State.SUCCESS; - const result: Account[] = await Promise.all( - this.walletInfos.map((walletInfo) => walletInfo.toAccountType(RequestType.LOGIN)), - ); - setTimeout(() => { this.$rpc.resolve(result); }, StatusScreen.SUCCESS_REDIRECT_DELAY); - } } - -