File tree Expand file tree Collapse file tree 4 files changed +36
-15
lines changed
packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy Expand file tree Collapse file tree 4 files changed +36
-15
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " thirdweb " : patch
3+ ---
4+
5+ Dont display dollar and token values for wallet balances
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import { Container } from "../../../components/basic.js";
2323import { Button } from "../../../components/buttons.js" ;
2424import { Text } from "../../../components/text.js" ;
2525import { Blobbie } from "../../Blobbie.js" ;
26+ import { formatTokenBalance } from "../formatTokenBalance.js" ;
2627import { FiatValue } from "./swap/FiatValue.js" ;
2728import type { TokenBalance } from "./swap/PaymentSelectionScreen.js" ;
2829
@@ -116,13 +117,26 @@ function TokenBalanceRow(props: {
116117 </ Container >
117118 </ Container >
118119 < Container flex = "row" center = "y" gap = "3xs" color = "secondaryText" >
119- < FiatValue
120- tokenAmount = { tokenBalance . balance . displayValue }
121- token = { tokenBalance . token }
122- chain = { tokenBalance . chain }
123- client = { client }
124- size = "xs"
125- />
120+ < Container
121+ flex = "column"
122+ color = "secondaryText"
123+ gap = "3xs"
124+ style = { {
125+ justifyContent : "flex-end" ,
126+ alignItems : "flex-end" ,
127+ } }
128+ >
129+ < Text size = "xs" color = "primaryText" >
130+ { formatTokenBalance ( tokenBalance . balance , true , 2 ) }
131+ </ Text >
132+ < FiatValue
133+ tokenAmount = { tokenBalance . balance . displayValue }
134+ token = { tokenBalance . token }
135+ chain = { tokenBalance . chain }
136+ client = { client }
137+ size = "xs"
138+ />
139+ </ Container >
126140 < ChevronRightIcon width = { iconSize . md } height = { iconSize . md } />
127141 </ Container >
128142 </ StyledButton >
Original file line number Diff line number Diff line change @@ -122,7 +122,13 @@ export function BuyTokenInput(props: {
122122 </ Container >
123123 </ div >
124124
125- < Container flex = "row" center = "both" >
125+ < Container
126+ flex = "row"
127+ center = "both"
128+ style = { {
129+ height : fontSize . xl ,
130+ } }
131+ >
126132 < FiatValue
127133 tokenAmount = { props . value }
128134 token = { props . token }
Original file line number Diff line number Diff line change @@ -41,11 +41,7 @@ export function FiatValue(
4141 return < Skeleton width = { "50px" } height = { fontSize . lg } /> ;
4242 }
4343
44- return (
45- < Text { ...props } >
46- { cryptoToFiatQuery . data ?. result
47- ? `$${ formatNumber ( cryptoToFiatQuery . data . result , 2 ) } `
48- : "-" }
49- </ Text >
50- ) ;
44+ return cryptoToFiatQuery . data ?. result ? (
45+ < Text { ...props } > ${ formatNumber ( cryptoToFiatQuery . data . result , 2 ) } </ Text >
46+ ) : null ;
5147}
You can’t perform that action at this time.
0 commit comments