@@ -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 ,
@@ -251,39 +250,34 @@ export const MismatchButton = forwardRef<
251250 >
252251 < DialogContent
253252 className = { cn (
254- "gap-0 p-0" ,
255- dialog === "no-funds" && "md:!max-w-[480px]" ,
256- dialog === "pay" && "md:!max-w-[360px] border-none bg-transparent" ,
253+ "gap-0 p-0 md:!max-w-[480px]" ,
254+ dialog === "pay" && "border-none bg-transparent" ,
257255 ) }
258256 dialogCloseClassName = "focus:ring-0"
259257 >
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- ) }
258+ { dialog === "no-funds" && (
259+ < NoFundsDialogContent
260+ chain = { txChain }
261+ client = { props . client }
262+ isLoggedIn = { props . isLoggedIn }
263+ onCloseModal = { ( ) => setDialog ( undefined ) }
264+ openPayModal = { ( ) => {
265+ setDialog ( "pay" ) ;
266+ } }
267+ />
268+ ) }
272269
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 >
270+ { dialog === "pay" && account && (
271+ < CheckoutWidget
272+ className = "!w-full"
273+ client = { props . client }
274+ chain = { txChain }
275+ amount = "0.01"
276+ name = "Buy Funds"
277+ seller = { account . address as `0x${string } `}
278+ theme = { getSDKTheme ( theme === "dark" ? "dark" : "light" ) }
279+ />
280+ ) }
287281 </ DialogContent >
288282 </ Dialog >
289283 </ >
@@ -362,11 +356,7 @@ function NoFundsDialogContent(props: {
362356 ( x ) => x . enabled && x . service === "pay" ,
363357 ) ? (
364358 // pay case
365- < Button
366- className = "w-full"
367- onClick = { props . openPayModal }
368- variant = "primary"
369- >
359+ < Button className = "w-full" onClick = { props . openPayModal } >
370360 Buy Funds
371361 </ Button >
372362 ) : // no funds options available
0 commit comments