From 9612775b502d94ac360704b24b96366b41fd8d14 Mon Sep 17 00:00:00 2001 From: Santhoshkumar Sellavel Date: Fri, 6 Aug 2021 22:08:23 +0530 Subject: [PATCH 1/2] Wallet balance translation fix in Payments Page --- src/components/CurrentWalletBalance.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/CurrentWalletBalance.js b/src/components/CurrentWalletBalance.js index b58fe6108dd1..f24b4cff8942 100644 --- a/src/components/CurrentWalletBalance.js +++ b/src/components/CurrentWalletBalance.js @@ -34,13 +34,15 @@ const CurrentWalletBalance = (props) => { ); } - const formattedBalance = Number(props.userWallet.availableBalance).toFixed(2); - + const formattedBalance = props.numberFormat( + props.userWallet.availableBalance, + {style: 'currency', currency: 'USD'}, + ); return ( - {`$${formattedBalance}`} + {`${formattedBalance}`} ); }; From c9adb5f0ee482b915134ce62c5ec85bad7f4f4ed Mon Sep 17 00:00:00 2001 From: Santhoshkumar Sellavel Date: Mon, 9 Aug 2021 22:10:41 +0530 Subject: [PATCH 2/2] es locale formatting for mobile added. --- src/libs/numberFormat/index.native.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/numberFormat/index.native.js b/src/libs/numberFormat/index.native.js index de5366f4faba..f18ac62148f7 100644 --- a/src/libs/numberFormat/index.native.js +++ b/src/libs/numberFormat/index.native.js @@ -4,8 +4,9 @@ import '@formatjs/intl-locale/polyfill'; import '@formatjs/intl-pluralrules/polyfill'; import '@formatjs/intl-numberformat/polyfill'; -// Load en Locale data +// Load en & es Locale data import '@formatjs/intl-numberformat/locale-data/en'; +import '@formatjs/intl-numberformat/locale-data/es'; function numberFormat(locale, number, options) { return new Intl.NumberFormat(locale, options).format(number);