Skip to content
Draft
Changes from all commits
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 @@ -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);
Expand All @@ -107,7 +105,7 @@ export function Preview({
};

const handleConfirm = async () => {
if (!buildData) return;
if (!buildData || !account || !sourcePool || !targetPool) return;

const txData = {
from: account,
Expand Down Expand Up @@ -217,6 +215,8 @@ export function Preview({
);
}

if (route === null || !sourcePool || !targetPool || !account || !buildData) return null;

return (
<Dialog open={true} onOpenChange={onDismiss}>
<DialogPortal>
Expand Down
Loading