From dba1ff921c218e3ac6b98bcb53e7c9e0dd39b865 Mon Sep 17 00:00:00 2001 From: David May <85513542+davidleomay@users.noreply.github.com> Date: Tue, 9 Jun 2026 14:46:33 +0200 Subject: [PATCH] fix(notification): make security-critical mails non-suppressible (#3850) * chore: remove legacy Azure DEV workflow (DEV now runs on dfxdev) * fix(notification): make security-critical mails non-suppressible ACCOUNT_MERGE_REQUEST, CHANGED_MAIL, ADDED_ADDRESS and ACCOUNT_DEACTIVATION were mapped to MailContextType.INFO, causing them to be silently dropped for users whose wallet disables the Info mail type. These are mandatory account-blocking or security notifications and must always be delivered. Maps them to null (same as MONITORING/WEBHOOK/SEPA) so isDisabledMailWallet short-circuits and the mails bypass wallet mailConfig checks entirely. Closes #3842 --- src/subdomains/supporting/notification/enums/index.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/subdomains/supporting/notification/enums/index.ts b/src/subdomains/supporting/notification/enums/index.ts index dc0dfdc499..e5facffbd5 100644 --- a/src/subdomains/supporting/notification/enums/index.ts +++ b/src/subdomains/supporting/notification/enums/index.ts @@ -66,7 +66,7 @@ export enum MailContextType { } export const MailContextTypeMapper: { - [key in MailContext]: MailContextType; + [key in MailContext]: MailContextType | null; } = { [MailContext.BUY_CRYPTO]: MailContextType.BUY_CRYPTO, [MailContext.BUY_CRYPTO_PENDING]: MailContextType.BUY_CRYPTO, @@ -83,14 +83,14 @@ export const MailContextTypeMapper: { [MailContext.BUY_FIAT_RETURN]: MailContextType.BUY_FIAT, [MailContext.CRYPTO_INPUT_RETURN]: MailContextType.BUY_FIAT, [MailContext.BLACK_SQUAD]: MailContextType.INFO, - [MailContext.CHANGED_MAIL]: MailContextType.INFO, - [MailContext.ADDED_ADDRESS]: MailContextType.INFO, - [MailContext.ACCOUNT_MERGE_REQUEST]: MailContextType.INFO, + [MailContext.CHANGED_MAIL]: null, + [MailContext.ADDED_ADDRESS]: null, + [MailContext.ACCOUNT_MERGE_REQUEST]: null, [MailContext.LIMIT_REQUEST]: MailContextType.INFO, [MailContext.CUSTOM]: MailContextType.INFO, [MailContext.SUPPORT_MESSAGE]: MailContextType.INFO, [MailContext.UNASSIGNED_TX]: MailContextType.INFO, - [MailContext.ACCOUNT_DEACTIVATION]: MailContextType.INFO, + [MailContext.ACCOUNT_DEACTIVATION]: null, [MailContext.RECOMMENDATION_CONFIRMATION]: MailContextType.INFO, [MailContext.RECOMMENDATION_MAIL]: MailContextType.INFO, [MailContext.LOGIN]: MailContextType.AUTH,