File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
src/components/transactions/Swap Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -15,5 +15,9 @@ export const getParaswapSlippage = (
1515 return ( Number ( baseSlippage ) * 2 ) . toString ( ) ;
1616 }
1717
18+ if ( swapType === SwapType . RepayWithCollateral ) {
19+ return ( Number ( baseSlippage ) * 5 ) . toString ( ) ;
20+ }
21+
1822 return baseSlippage ;
1923} ;
Original file line number Diff line number Diff line change @@ -47,14 +47,16 @@ const getTokenSelectionForQuote = (
4747 const srcToken =
4848 state . useFlashloan == false &&
4949 state . provider === SwapProvider . PARASWAP &&
50- state . swapType !== SwapType . WithdrawAndSwap
50+ state . swapType !== SwapType . WithdrawAndSwap &&
51+ state . swapType !== SwapType . RepayWithCollateral
5152 ? srcTokenObj . addressToSwap
5253 : srcTokenObj . underlyingAddress ;
5354 const destTokenObj = invertedQuoteRoute ? state . sourceToken : state . destinationToken ;
5455 const destToken =
5556 state . useFlashloan == false &&
5657 state . provider === SwapProvider . PARASWAP &&
57- state . swapType !== SwapType . WithdrawAndSwap
58+ state . swapType !== SwapType . WithdrawAndSwap &&
59+ state . swapType !== SwapType . RepayWithCollateral
5860 ? destTokenObj . addressToSwap
5961 : destTokenObj . underlyingAddress ;
6062
You can’t perform that action at this time.
0 commit comments