From 309bcd4c0caf6a2c94c7653f828b5a3a6c1aba1f Mon Sep 17 00:00:00 2001 From: Gustavo Cortez Date: Tue, 4 Aug 2026 10:06:01 -0300 Subject: [PATCH] Transaction List: Fix - Fallback to 'en' for locales moment doesn't bundle --- src/store/wallet/effects/transactions/transactions.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/store/wallet/effects/transactions/transactions.ts b/src/store/wallet/effects/transactions/transactions.ts index 3a7e4fbe5e..bef8e7a911 100644 --- a/src/store/wallet/effects/transactions/transactions.ts +++ b/src/store/wallet/effects/transactions/transactions.ts @@ -590,12 +590,10 @@ const IsFirstInCoinbaseGroup = (index: number, history: any[]) => { const getMomentLocale = (language?: string): string => { const lang = (language || '').toLowerCase(); - - if (lang.startsWith('zh')) return 'zh-cn'; - - const base = lang.split('-')[0]; - - return base || 'en'; + const candidate = lang.startsWith('zh') + ? 'zh-cn' + : lang.split('-')[0] || 'en'; + return moment.locales().includes(candidate) ? candidate : 'en'; }; const getMonthName = (time: MomentInput): string => {