@@ -18,7 +18,7 @@ import {
1818} from "thirdweb" ;
1919import { type Chain , type ChainMetadata , localhost } from "thirdweb/chains" ;
2020import {
21- PayEmbed ,
21+ CheckoutWidget ,
2222 useActiveAccount ,
2323 useActiveWallet ,
2424 useActiveWalletChain ,
@@ -29,7 +29,6 @@ import {
2929import { privateKeyToAccount , type Wallet } from "thirdweb/wallets" ;
3030import { apiServerProxy } from "@/actions/proxies" ;
3131import { Button } from "@/components/ui/button" ;
32- import { DynamicHeight } from "@/components/ui/DynamicHeight" ;
3332import {
3433 Dialog ,
3534 DialogContent ,
@@ -253,37 +252,33 @@ export const MismatchButton = forwardRef<
253252 className = { cn (
254253 "gap-0 p-0" ,
255254 dialog === "no-funds" && "md:!max-w-[480px]" ,
256- dialog === "pay" && "md:!max-w-[360px ] border-none bg-transparent" ,
255+ dialog === "pay" && "md:!max-w-[480px ] border-none bg-transparent" ,
257256 ) }
258257 dialogCloseClassName = "focus:ring-0"
259258 >
260- < DynamicHeight >
261- { dialog === "no-funds" && (
262- < NoFundsDialogContent
263- chain = { txChain }
264- client = { props . client }
265- isLoggedIn = { props . isLoggedIn }
266- onCloseModal = { ( ) => setDialog ( undefined ) }
267- openPayModal = { ( ) => {
268- setDialog ( "pay" ) ;
269- } }
270- />
271- ) }
259+ { dialog === "no-funds" && (
260+ < NoFundsDialogContent
261+ chain = { txChain }
262+ client = { props . client }
263+ isLoggedIn = { props . isLoggedIn }
264+ onCloseModal = { ( ) => setDialog ( undefined ) }
265+ openPayModal = { ( ) => {
266+ setDialog ( "pay" ) ;
267+ } }
268+ />
269+ ) }
272270
273- { dialog === "pay" && (
274- < PayEmbed
275- className = "!w-auto"
276- client = { props . client }
277- payOptions = { {
278- prefillBuy : {
279- amount : "0.01" ,
280- chain : txChain ,
281- } ,
282- } }
283- theme = { getSDKTheme ( theme === "dark" ? "dark" : "light" ) }
284- />
285- ) }
286- </ DynamicHeight >
271+ { dialog === "pay" && account && (
272+ < CheckoutWidget
273+ className = "!w-full"
274+ client = { props . client }
275+ chain = { txChain }
276+ amount = "0.01"
277+ name = "Buy Funds"
278+ seller = { account . address as `0x${string } `}
279+ theme = { getSDKTheme ( theme === "dark" ? "dark" : "light" ) }
280+ />
281+ ) }
287282 </ DialogContent >
288283 </ Dialog >
289284 </ >
0 commit comments