• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

safe-global / safe-client-gateway / 7100044696

05 Dec 2023 11:25AM UTC coverage: 89.251% (-0.5%) from 89.703%
7100044696

push

github

web-flow
Add functionality to resend email verification (#897)

- The `IEmailRepository` was extended to have a function for resending email verifications.
- The email verification can be resent if enough time has passed since this action was last triggered successfully. This timeframe is configurable with `EMAIL_VERIFICATION_CODE_RESEND_LOCK_WINDOW_MS` (default is 30 seconds).
- When resending the verification code, if the current code is still valid, then it is re-sent. If it expired, then a new one is generated, stored and re-sent to the same email address. The expiration time of the code can be set via `EMAIL_VERIFICATION_CODE_TTL_MS`.
- If this action is triggered for verified owners, an `EmailAlreadyVerifiedError` is thrown.
- If this action is triggered within `EMAIL_VERIFICATION_CODE_RESEND_LOCK_WINDOW_MS` from the last successful one, a `ResendVerificationTimespanError` is thrown.
- Else, it attempts to set a new code and send it. If the new code was not set, an `InvalidVerificationCodeError` is thrown.

1410 of 1722 branches covered (0.0%)

Branch coverage included in aggregate %.

15 of 32 new or added lines in 4 files covered. (46.88%)

3 existing lines in 2 files now uncovered.

5249 of 5739 relevant lines covered (91.46%)

151.8 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

50.0
/src/domain/email/errors/invalid-verification-code.error.ts
1
export class InvalidVerificationCodeError extends Error {
62✔
2
  constructor(args: { chainId: string; safeAddress: string; signer: string }) {
NEW
3
    super(
×
4
      `The verification code is invalid. chainId=${args.chainId}, safeAddress=${args.safeAddress}, signer=${args.signer} `,
5
    );
6
  }
7
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc