diff --git a/src/swap/components/SwapProvider.tsx b/src/swap/components/SwapProvider.tsx index be11c5aa77..b27dfe4689 100644 --- a/src/swap/components/SwapProvider.tsx +++ b/src/swap/components/SwapProvider.tsx @@ -129,12 +129,12 @@ export function SwapProvider({ } }, [hasHandledSuccess, lifeCycleStatus.statusName, maxSlippage]); - let maxSlippage: string; + let maxSlippage2: string; if ( lifeCycleStatus.statusData && 'maxSlippage' in lifeCycleStatus.statusData ) { - maxSlippage = String(lifeCycleStatus.statusData.maxSlippage); + maxSlippage2 = String(lifeCycleStatus.statusData.maxSlippage); } const handleToggle = useCallback(() => { @@ -203,7 +203,7 @@ export function SwapProvider({ amountReference: 'from', from: source.token, to: destination.token, - maxSlippage, + maxSlippage: maxSlippage2.toString(), useAggregator, }); // If request resolves to error response set the quoteError @@ -273,7 +273,7 @@ export function SwapProvider({ from: from.token, to: to.token, useAggregator, - maxSlippage, + maxSlippage: maxSlippage2.toString(), }); if (isSwapError(response)) { setLifeCycleStatus({