File tree Expand file tree Collapse file tree 2 files changed +11
-13
lines changed
packages/thirdweb/src/react/web/ui/Bridge/payment-selection Expand file tree Collapse file tree 2 files changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import {
1212 spacing ,
1313} from "../../../../core/design-system/index.js" ;
1414import { useBuyWithFiatQuotesForProviders } from "../../../../core/hooks/pay/useBuyWithFiatQuotesForProviders.js" ;
15+ import { formatCurrencyAmount } from "../../ConnectWallet/screens/formatTokenBalance.js" ;
1516import { Container } from "../../components/basic.js" ;
1617import { Button } from "../../components/buttons.js" ;
1718import { Img } from "../../components/Img.js" ;
@@ -164,12 +165,10 @@ export function FiatProviderSelection({
164165 size = "sm"
165166 style = { { fontWeight : 500 } }
166167 >
167- { new Intl . NumberFormat ( navigator . language , {
168- style : "currency" ,
169- currency : currency ,
170- minimumFractionDigits : 2 ,
171- maximumFractionDigits : 2 ,
172- } ) . format ( quote . currencyAmount ) }
168+ { formatCurrencyAmount (
169+ currency || "US" ,
170+ quote . currencyAmount ,
171+ ) }
173172 </ Text >
174173 < Text color = "secondaryText" size = "xs" >
175174 { formatNumber (
Original file line number Diff line number Diff line change @@ -5,7 +5,10 @@ import type { SupportedFiatCurrency } from "../../../../../pay/convert/type.js";
55import { useCustomTheme } from "../../../../core/design-system/CustomThemeProvider.js" ;
66import { radius , spacing } from "../../../../core/design-system/index.js" ;
77import type { PaymentMethod } from "../../../../core/machines/paymentMachine.js" ;
8- import { formatTokenAmount } from "../../ConnectWallet/screens/formatTokenBalance.js" ;
8+ import {
9+ formatCurrencyAmount ,
10+ formatTokenAmount ,
11+ } from "../../ConnectWallet/screens/formatTokenBalance.js" ;
912import { Container } from "../../components/basic.js" ;
1013import { Button } from "../../components/buttons.js" ;
1114import { Skeleton } from "../../components/Skeleton.js" ;
@@ -90,12 +93,8 @@ function PaymentMethodTokenRow({
9093 size = "sm"
9194 style = { { fontWeight : 600 , textWrap : "nowrap" } }
9295 >
93- { new Intl . NumberFormat ( navigator . language , {
94- style : "currency" ,
95- currency : currency ,
96- minimumFractionDigits : 2 ,
97- maximumFractionDigits : 2 ,
98- } ) . format (
96+ { formatCurrencyAmount (
97+ currency || "USD" ,
9998 Number (
10099 formatTokenAmount (
101100 paymentMethod . balance ,
You can’t perform that action at this time.
0 commit comments