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 11"use client" ;
2- import { toUnits } from "thirdweb" ;
32import { base } from "thirdweb/chains" ;
43import { CheckoutWidget } from "thirdweb/react" ;
54import { 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"
Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff line change 22
33import { THIRDWEB_CLIENT } from "@/lib/client" ;
44import { useTheme } from "next-themes" ;
5- import { NATIVE_TOKEN_ADDRESS , toWei } from "thirdweb" ;
5+ import { NATIVE_TOKEN_ADDRESS } from "thirdweb" ;
66import { arbitrum } from "thirdweb/chains" ;
77import { 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 ) ;
You can’t perform that action at this time.
0 commit comments