File tree Expand file tree Collapse file tree 7 files changed +88
-15
lines changed
react/web/ui/ConnectWallet/screens/Buy Expand file tree Collapse file tree 7 files changed +88
-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 @@ -16,6 +16,24 @@ export type CanClaimResult = {
1616 reason ?: string ;
1717} ;
1818
19+ /**
20+ * Check if a user can claim a drop.
21+ *
22+ * @param options - The options for the transaction.
23+ * @returns Whether the user can claim the drop.
24+ *
25+ * @example
26+ * ```ts
27+ * const claimResult = await canClaim({
28+ * contract: contract,
29+ * claimer: "0x1234567890123456789012345678901234567890",
30+ * quantity: "1",
31+ * tokenId: 0n,
32+ * });
33+ * ```
34+ *
35+ * @extension ERC1155
36+ */
1937export async function canClaim (
2038 options : BaseTransactionOptions < CanClaimParams > ,
2139) : Promise < CanClaimResult > {
Original file line number Diff line number Diff line change @@ -15,6 +15,23 @@ export type CanClaimResult = {
1515 reason ?: string ;
1616} ;
1717
18+ /**
19+ * Check if a user can claim a drop.
20+ *
21+ * @param options - The options for the transaction.
22+ * @returns Whether the user can claim the drop.
23+ *
24+ * @example
25+ * ```ts
26+ * const claimResult = await canClaim({
27+ * contract: contract,
28+ * claimer: "0x1234567890123456789012345678901234567890",
29+ * quantity: "1",
30+ * });
31+ * ```
32+ *
33+ * @extension ERC20
34+ */
1835export async function canClaim (
1936 options : BaseTransactionOptions < CanClaimParams > ,
2037) : Promise < CanClaimResult > {
Original file line number Diff line number Diff line change @@ -15,6 +15,23 @@ export type CanClaimResult = {
1515 reason ?: string ;
1616} ;
1717
18+ /**
19+ * Check if a user can claim a drop.
20+ *
21+ * @param options - The options for the transaction.
22+ * @returns Whether the user can claim the drop.
23+ *
24+ * @example
25+ * ```ts
26+ * const claimResult = await canClaim({
27+ * contract: contract,
28+ * claimer: "0x1234567890123456789012345678901234567890",
29+ * quantity: "1",
30+ * });
31+ * ```
32+ *
33+ * @extension ERC721
34+ */
1835export async function canClaim (
1936 options : BaseTransactionOptions < CanClaimParams > ,
2037) : Promise < CanClaimResult > {
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