Skip to content

Commit 015c1d3

Browse files
committed
changeset
1 parent 96f4ea2 commit 015c1d3

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

.changeset/quick-foxes-raise.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Use decimal string for BuyWidget amount

apps/playground-web/src/components/pay/direct-payment.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
"use client";
2-
import { toUnits } from "thirdweb";
32
import { base } from "thirdweb/chains";
43
import { CheckoutWidget } from "thirdweb/react";
54
import { THIRDWEB_CLIENT } from "../../lib/client";
@@ -11,7 +10,7 @@ export function BuyMerchPreview() {
1110
client={THIRDWEB_CLIENT}
1211
theme="light"
1312
chain={base}
14-
amount={toUnits("2", 6)}
13+
amount={"2"}
1514
tokenAddress="0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
1615
seller="0xEb0effdFB4dC5b3d5d3aC6ce29F3ED213E95d675"
1716
feePayer="seller"

apps/playground-web/src/components/pay/transaction-button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export function PayTransactionPreview() {
4949
tokenId: 2n,
5050
to: account?.address || "",
5151
})}
52-
amount={100n}
52+
amount={"0.1"}
5353
title={nft?.metadata?.name}
5454
description={nft?.metadata?.description}
5555
image={nft?.metadata?.image}

apps/playground-web/src/components/universal-bridge/buy.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { THIRDWEB_CLIENT } from "@/lib/client";
44
import { useTheme } from "next-themes";
5-
import { NATIVE_TOKEN_ADDRESS, toWei } from "thirdweb";
5+
import { NATIVE_TOKEN_ADDRESS } from "thirdweb";
66
import { arbitrum } from "thirdweb/chains";
77
import { BuyWidget } from "thirdweb/react";
88

@@ -18,7 +18,7 @@ export function StyledBuyWidgetPreview() {
1818
title="Get Funds"
1919
tokenAddress={NATIVE_TOKEN_ADDRESS}
2020
chain={arbitrum}
21-
amount={toWei("0.002")}
21+
amount={"0.1"}
2222
/>
2323
</div>
2424
);

0 commit comments

Comments
 (0)