diff --git a/packages/thirdweb/src/react/web/ui/Bridge/BridgeOrchestrator.tsx b/packages/thirdweb/src/react/web/ui/Bridge/BridgeOrchestrator.tsx index f146a0d0eba..f1d5bf9622e 100644 --- a/packages/thirdweb/src/react/web/ui/Bridge/BridgeOrchestrator.tsx +++ b/packages/thirdweb/src/react/web/ui/Bridge/BridgeOrchestrator.tsx @@ -189,13 +189,9 @@ export function BridgeOrchestrator({ }, [send, uiOptions.mode]); // Handle post-buy transaction completion - const handlePostBuyTransactionComplete = useCallback( - (quote: BridgePrepareResult) => { - onComplete?.(quote); - send({ type: "RESET" }); - }, - [onComplete, send], - ); + const handlePostBuyTransactionComplete = useCallback(() => { + send({ type: "RESET" }); + }, [send]); // Handle errors const handleError = useCallback( @@ -416,9 +412,9 @@ export function BridgeOrchestrator({ quote && uiOptions.transaction && ( handlePostBuyTransactionComplete(quote)} + closeModal={handlePostBuyTransactionComplete} onTxSent={() => { - // Do nothing + onComplete?.(quote); }} tx={uiOptions.transaction} windowAdapter={webWindowAdapter}