diff --git a/packages/zap-migration-widgets/src/components/Preview/index.tsx b/packages/zap-migration-widgets/src/components/Preview/index.tsx index aff95343cc..32d3d144be 100644 --- a/packages/zap-migration-widgets/src/components/Preview/index.tsx +++ b/packages/zap-migration-widgets/src/components/Preview/index.tsx @@ -84,8 +84,6 @@ export function Preview({ // Call onSuccess when transaction is successful useOnSuccess({ txHash: txHash || '', txStatus }); - if (route === null || !sourcePool || !targetPool || !account || !buildData) return null; - const handleSlippage = () => { if (slippage !== suggestedSlippage) setSlippage(suggestedSlippage); setBuildData(undefined); @@ -107,7 +105,7 @@ export function Preview({ }; const handleConfirm = async () => { - if (!buildData) return; + if (!buildData || !account || !sourcePool || !targetPool) return; const txData = { from: account, @@ -217,6 +215,8 @@ export function Preview({ ); } + if (route === null || !sourcePool || !targetPool || !account || !buildData) return null; + return (