File tree Expand file tree Collapse file tree 4 files changed +17
-8
lines changed
ConnectWallet/screens/Buy/swap Expand file tree Collapse file tree 4 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,10 @@ export function TokenBalanceRow({
8282 whiteSpace : "nowrap" ,
8383 } }
8484 >
85- { `${ amount } ${ token . symbol } ` }
85+ { `${ Number ( amount ) . toLocaleString ( undefined , {
86+ maximumFractionDigits : 6 ,
87+ minimumFractionDigits : 0 ,
88+ } ) } ${ token . symbol } `}
8689 </ Text >
8790 </ Container >
8891 </ Container >
Original file line number Diff line number Diff line change @@ -43,7 +43,13 @@ export function FiatValue(
4343
4444 return cryptoToFiatQuery . data ?. result ? (
4545 < Text { ...props } >
46- ${ formatNumber ( cryptoToFiatQuery . data . result , 2 ) . toFixed ( 2 ) }
46+ $
47+ { Number (
48+ formatNumber ( cryptoToFiatQuery . data . result , 2 ) . toFixed ( 2 ) ,
49+ ) . toLocaleString ( undefined , {
50+ minimumFractionDigits : 2 ,
51+ maximumFractionDigits : 2 ,
52+ } ) }
4753 </ Text >
4854 ) : null ;
4955}
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import {
1010 STORY_MOCK_WALLET ,
1111 buyWithApprovalQuote ,
1212 complexBuyQuote ,
13- longTokenNameBuyQuote ,
13+ longTextBuyQuote ,
1414 onrampWithSwapsQuote ,
1515 simpleBuyQuote ,
1616 simpleOnrampQuote ,
@@ -220,10 +220,10 @@ export const BuySimpleLight: Story = {
220220 } ,
221221} ;
222222
223- export const BuyWithLongTokenName : Story = {
223+ export const BuyWithLongText : Story = {
224224 args : {
225225 theme : "dark" ,
226- preparedQuote : longTokenNameBuyQuote ,
226+ preparedQuote : longTextBuyQuote ,
227227 paymentMethod : ethCryptoPaymentMethod ,
228228 client : storyClient ,
229229 } ,
Original file line number Diff line number Diff line change @@ -273,11 +273,11 @@ export const simpleBuyQuote: BridgePrepareResult = JSON.parse(
273273 } ) ,
274274) ;
275275
276- export const longTokenNameBuyQuote : BridgePrepareResult = JSON . parse (
276+ export const longTextBuyQuote : BridgePrepareResult = JSON . parse (
277277 stringify ( {
278278 type : "buy" ,
279279 originAmount : 1000000000000000000n , // 1 ETH
280- destinationAmount : 100000000n , // 100 USDC
280+ destinationAmount : 1000394284092830482309n ,
281281 timestamp : Date . now ( ) ,
282282 estimatedExecutionTimeMs : 60000 ,
283283 steps : [
@@ -303,7 +303,7 @@ export const longTokenNameBuyQuote: BridgePrepareResult = JSON.parse(
303303 "https://assets.coingecko.com/coins/images/6319/large/USD_Coin_icon.png" ,
304304 } ,
305305 originAmount : 1000000000000000000n ,
306- destinationAmount : 100000000n ,
306+ destinationAmount : 1000394284092830482309n ,
307307 estimatedExecutionTimeMs : 60000 ,
308308 transactions : [
309309 {
You can’t perform that action at this time.
0 commit comments