Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export type UIOptions = Prettify<
)
>;

export interface BridgeOrchestratorProps {
interface BridgeOrchestratorProps {
/**
* UI configuration and mode
*/
Expand Down Expand Up @@ -288,7 +288,7 @@ export function BridgeOrchestrator({
client={client}
connectOptions={modifiedConnectOptions}
onContinue={handleRequirementsResolved}
sendEvent={send}
onExecuteTransaction={() => send({ type: "CONTINUE_TO_TRANSACTION" })}
showThirdwebBranding={showThirdwebBranding}
uiOptions={uiOptions}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import { useChainMetadata } from "../../../core/hooks/others/useChainQuery.js";
import { useTransactionDetails } from "../../../core/hooks/useTransactionDetails.js";
import { useActiveAccount } from "../../../core/hooks/wallets/useActiveAccount.js";
import { useActiveWallet } from "../../../core/hooks/wallets/useActiveWallet.js";
import type { PaymentMachineEvent } from "../../../core/machines/paymentMachine.js";
import { ConnectButton } from "../ConnectWallet/ConnectButton.js";
import { PoweredByThirdweb } from "../ConnectWallet/PoweredByTW.js";
import { Container, Line } from "../components/basic.js";
Expand Down Expand Up @@ -50,9 +49,9 @@ export interface TransactionPaymentProps {
onContinue: (amount: string, token: Token, receiverAddress: Address) => void;

/**
* Send arbitrary payment events for UI flow control
* Request to execute the transaction immediately (skips funding flow)
*/
sendEvent: (event: PaymentMachineEvent) => void;
onExecuteTransaction: () => void;

/**
* Connect options for wallet connection
Expand All @@ -70,7 +69,7 @@ export function TransactionPayment({
uiOptions,
client,
onContinue,
sendEvent,
onExecuteTransaction,
connectOptions,
showThirdwebBranding = true,
}: TransactionPaymentProps) {
Expand Down Expand Up @@ -391,9 +390,7 @@ export function TransactionPayment({
Number(userBalance) >=
Number(transactionDataQuery.data.totalCost)
) {
sendEvent({
type: "CONTINUE_TO_TRANSACTION",
});
onExecuteTransaction();
return;
}

Expand Down
Loading