File tree Expand file tree Collapse file tree 4 files changed +9
-5
lines changed
apps/playground-web/src/components Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " thirdweb " : patch
3
+ ---
4
+
5
+ Use decimal string for BuyWidget amount
Original file line number Diff line number Diff line change 1
1
"use client" ;
2
- import { toUnits } from "thirdweb" ;
3
2
import { base } from "thirdweb/chains" ;
4
3
import { CheckoutWidget } from "thirdweb/react" ;
5
4
import { THIRDWEB_CLIENT } from "../../lib/client" ;
@@ -11,7 +10,7 @@ export function BuyMerchPreview() {
11
10
client = { THIRDWEB_CLIENT }
12
11
theme = "light"
13
12
chain = { base }
14
- amount = { toUnits ( "2" , 6 ) }
13
+ amount = { "2" }
15
14
tokenAddress = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
16
15
seller = "0xEb0effdFB4dC5b3d5d3aC6ce29F3ED213E95d675"
17
16
feePayer = "seller"
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ export function PayTransactionPreview() {
49
49
tokenId : 2n ,
50
50
to : account ?. address || "" ,
51
51
} ) }
52
- amount = { 100n }
52
+ amount = { "0.1" }
53
53
title = { nft ?. metadata ?. name }
54
54
description = { nft ?. metadata ?. description }
55
55
image = { nft ?. metadata ?. image }
Original file line number Diff line number Diff line change 2
2
3
3
import { THIRDWEB_CLIENT } from "@/lib/client" ;
4
4
import { useTheme } from "next-themes" ;
5
- import { NATIVE_TOKEN_ADDRESS , toWei } from "thirdweb" ;
5
+ import { NATIVE_TOKEN_ADDRESS } from "thirdweb" ;
6
6
import { arbitrum } from "thirdweb/chains" ;
7
7
import { BuyWidget } from "thirdweb/react" ;
8
8
@@ -18,7 +18,7 @@ export function StyledBuyWidgetPreview() {
18
18
title = "Get Funds"
19
19
tokenAddress = { NATIVE_TOKEN_ADDRESS }
20
20
chain = { arbitrum }
21
- amount = { toWei ( "0.002" ) }
21
+ amount = { "0.1" }
22
22
/>
23
23
</ div >
24
24
) ;
You can’t perform that action at this time.
0 commit comments