@@ -20,7 +20,6 @@ import { useChainMetadata } from "../../../core/hooks/others/useChainQuery.js";
2020import { useTransactionDetails } from "../../../core/hooks/useTransactionDetails.js" ;
2121import { useActiveAccount } from "../../../core/hooks/wallets/useActiveAccount.js" ;
2222import { useActiveWallet } from "../../../core/hooks/wallets/useActiveWallet.js" ;
23- import type { PaymentMachineEvent } from "../../../core/machines/paymentMachine.js" ;
2423import { ConnectButton } from "../ConnectWallet/ConnectButton.js" ;
2524import { PoweredByThirdweb } from "../ConnectWallet/PoweredByTW.js" ;
2625import { Container , Line } from "../components/basic.js" ;
@@ -50,9 +49,9 @@ export interface TransactionPaymentProps {
5049 onContinue : ( amount : string , token : Token , receiverAddress : Address ) => void ;
5150
5251 /**
53- * Send arbitrary payment events for UI flow control
52+ * Request to execute the transaction immediately (skips funding flow)
5453 */
55- sendEvent : ( event : PaymentMachineEvent ) => void ;
54+ onExecuteTransaction : ( ) => void ;
5655
5756 /**
5857 * Connect options for wallet connection
@@ -70,7 +69,7 @@ export function TransactionPayment({
7069 uiOptions,
7170 client,
7271 onContinue,
73- sendEvent ,
72+ onExecuteTransaction ,
7473 connectOptions,
7574 showThirdwebBranding = true ,
7675} : TransactionPaymentProps ) {
@@ -391,9 +390,7 @@ export function TransactionPayment({
391390 Number ( userBalance ) >=
392391 Number ( transactionDataQuery . data . totalCost )
393392 ) {
394- sendEvent ( {
395- type : "CONTINUE_TO_TRANSACTION" ,
396- } ) ;
393+ onExecuteTransaction ( ) ;
397394 return ;
398395 }
399396
0 commit comments