From fce027ddea07b1b0f69e7cebb14f1910323523a7 Mon Sep 17 00:00:00 2001 From: Paul Cramer Date: Wed, 4 Sep 2024 12:57:42 -0700 Subject: [PATCH] fix --- src/swap/components/SwapProvider.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/swap/components/SwapProvider.tsx b/src/swap/components/SwapProvider.tsx index e9765a6c0f..f844abcdb3 100644 --- a/src/swap/components/SwapProvider.tsx +++ b/src/swap/components/SwapProvider.tsx @@ -46,7 +46,9 @@ export function SwapProvider({ const { address } = useAccount(); // Feature flags const { useAggregator } = experimental; - const [maxSlippage, setMaxSlippage] = useState(experimental.maxSlippage || 3); + const [maxSlippage, _setMaxSlippage] = useState( + experimental.maxSlippage || 3, + ); // Core Hooks const config = useConfig(); const [loading, setLoading] = useState(false); @@ -193,7 +195,7 @@ export function SwapProvider({ amountReference: 'from', from: source.token, to: destination.token, - maxSlippage: experimental.maxSlippage?.toString(), + maxSlippage: maxSlippage.toString(), useAggregator, }); // If request resolves to error response set the quoteError @@ -263,7 +265,7 @@ export function SwapProvider({ from: from.token, to: to.token, useAggregator, - maxSlippage: experimental.maxSlippage?.toString(), + maxSlippage: maxSlippage.toString(), }); if (isSwapError(response)) { setLifeCycleStatus({