From 33fec880e9323d33280c94eb1688ef6ba8857725 Mon Sep 17 00:00:00 2001 From: tomiir Date: Thu, 28 Dec 2023 15:53:37 -0600 Subject: [PATCH] fix: resend otp copy --- .../src/views/w3m-email-verify-device-view/index.ts | 2 +- .../src/views/w3m-email-verify-otp-view/index.ts | 10 +++++----- .../w3m-update-email-wallet-waiting-view/index.ts | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/scaffold/src/views/w3m-email-verify-device-view/index.ts b/packages/scaffold/src/views/w3m-email-verify-device-view/index.ts index 4ae51e35f5..f98239228d 100644 --- a/packages/scaffold/src/views/w3m-email-verify-device-view/index.ts +++ b/packages/scaffold/src/views/w3m-email-verify-device-view/index.ts @@ -86,7 +86,7 @@ export class W3mEmailVerifyDeviceView extends LitElement { } this.loading = true await this.emailConnector.provider.connectEmail({ email: this.email }) - SnackController.showSuccess('New Email sent') + SnackController.showSuccess('Code email resent') } } catch (error) { SnackController.showError(error) diff --git a/packages/scaffold/src/views/w3m-email-verify-otp-view/index.ts b/packages/scaffold/src/views/w3m-email-verify-otp-view/index.ts index dcc2648018..ba8b304514 100644 --- a/packages/scaffold/src/views/w3m-email-verify-otp-view/index.ts +++ b/packages/scaffold/src/views/w3m-email-verify-otp-view/index.ts @@ -50,6 +50,8 @@ export class W3mEmailVerifyOtpView extends LitElement { throw new Error('w3m-email-verify-otp-view: No email provided') } + const isResendDisabled = Boolean(this.timeoutTimeLeft) + return html` Didn't receive it? - Resend ${this.timeoutTimeLeft > 0 ? `in ${this.timeoutTimeLeft}s` : 'Code'}Resend ${isResendDisabled ? `in ${this.timeoutTimeLeft}s` : 'Code'} @@ -116,7 +116,7 @@ export class W3mEmailVerifyOtpView extends LitElement { } this.loading = true await emailConnector.provider.connectEmail({ email: this.email }) - SnackController.showSuccess('New Email sent') + SnackController.showSuccess('Code email resent') } } catch (error) { SnackController.showError(error) diff --git a/packages/scaffold/src/views/w3m-update-email-wallet-waiting-view/index.ts b/packages/scaffold/src/views/w3m-update-email-wallet-waiting-view/index.ts index bdc82cee39..349d290716 100644 --- a/packages/scaffold/src/views/w3m-update-email-wallet-waiting-view/index.ts +++ b/packages/scaffold/src/views/w3m-update-email-wallet-waiting-view/index.ts @@ -88,7 +88,7 @@ export class W3mUpdateEmailWalletWaitingView extends LitElement { this.loading = true await this.emailConnector.provider.updateEmail({ email: this.email }) this.listenForEmailUpdateApproval() - SnackController.showSuccess('New Email sent') + SnackController.showSuccess('Code email resent') } } catch (error) { SnackController.showError(error)