File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/components/transactions/Swap/errors/shared Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,9 @@ import { isProtocolSwapState } from '../../types/state.types';
1515import { InsufficientLiquidityBlockingError } from './InsufficientLiquidityBlockingError' ;
1616
1717export const hasInsufficientLiquidity = ( state : SwapState ) => {
18- if ( ! isProtocolSwapState ( state ) || state . swapType === SwapType . RepayWithCollateral ) return false ;
18+ // Only relevant for Debt Swaps where target asset availability and borrow cap matter.
19+ // Collateral-related flows are handled via SupplyCapBlockingGuard and should not use borrow caps here.
20+ if ( ! isProtocolSwapState ( state ) || state . swapType !== SwapType . DebtSwap ) return false ;
1921 const reserve = state . isInvertedSwap
2022 ? state . sourceReserve ?. reserve
2123 : state . destinationReserve ?. reserve ;
You can’t perform that action at this time.
0 commit comments