Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcramer committed Sep 4, 2024
1 parent 7fbe2ec commit fce027d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/swap/components/SwapProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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({
Expand Down

0 comments on commit fce027d

Please sign in to comment.