Skip to content

Commit 7b4f341

Browse files
authored
Merge branch 'main' into yash/handle-single-unnamed-param
2 parents 103a52a + 880148b commit 7b4f341

File tree

12 files changed

+101
-18
lines changed

12 files changed

+101
-18
lines changed

apps/login/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# thirdweb-login
22

3+
## 0.1.6
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`ee1bc3e`](https://github.com/thirdweb-dev/js/commit/ee1bc3eb076a189fa806dd6008bf2f97e0bd052f)]:
8+
9+
310
## 0.1.5
411

512
### Patch Changes

apps/login/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "thirdweb-login",
3-
"version": "0.1.5",
3+
"version": "0.1.6",
44
"private": true,
55
"scripts": {
66
"preinstall": "npx only-allow pnpm",

packages/thirdweb/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# thirdweb
22

3+
## 5.88.3
4+
5+
### Patch Changes
6+
7+
- [#6240](https://github.com/thirdweb-dev/js/pull/6240) [`ee1bc3e`](https://github.com/thirdweb-dev/js/commit/ee1bc3eb076a189fa806dd6008bf2f97e0bd052f) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Dont display dollar and token values for wallet balances
8+
39
## 5.88.2
410

511
### Patch Changes

packages/thirdweb/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "thirdweb",
3-
"version": "5.88.2",
3+
"version": "5.88.3",
44
"repository": {
55
"type": "git",
66
"url": "git+https://github.com/thirdweb-dev/js.git#main"

packages/thirdweb/src/extensions/erc1155/drops/read/canClaim.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff 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+
*/
1937
export async function canClaim(
2038
options: BaseTransactionOptions<CanClaimParams>,
2139
): Promise<CanClaimResult> {

packages/thirdweb/src/extensions/erc20/drops/read/canClaim.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff 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+
*/
1835
export async function canClaim(
1936
options: BaseTransactionOptions<CanClaimParams>,
2037
): Promise<CanClaimResult> {

packages/thirdweb/src/extensions/erc721/drops/read/canClaim.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff 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+
*/
1835
export async function canClaim(
1936
options: BaseTransactionOptions<CanClaimParams>,
2037
): Promise<CanClaimResult> {

packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/WalletSelectorButton.tsx

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import { Container } from "../../../components/basic.js";
2323
import { Button } from "../../../components/buttons.js";
2424
import { Text } from "../../../components/text.js";
2525
import { Blobbie } from "../../Blobbie.js";
26+
import { formatTokenBalance } from "../formatTokenBalance.js";
2627
import { FiatValue } from "./swap/FiatValue.js";
2728
import 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>

packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/BuyTokenInput.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff 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}

packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/FiatValue.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)