Skip to content

Commit 2bdef96

Browse files
committed
fix: supply cap guard only in collateral swap
1 parent a93ff05 commit 2bdef96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/transactions/Swap/errors/shared/SupplyCapBlockingGuard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { isProtocolSwapState } from '../../types/state.types';
1313
import { SupplyCapBlockingError } from './SupplyCapBlockingError';
1414

1515
export const hasSupplyCapBlocking = (state: SwapState) => {
16-
if (!isProtocolSwapState(state) || state.swapType === SwapType.RepayWithCollateral) return false;
16+
if (!isProtocolSwapState(state) || state.swapType !== SwapType.CollateralSwap) return false;
1717
const reserve = state.isInvertedSwap
1818
? state.sourceReserve?.reserve
1919
: state.destinationReserve?.reserve;

0 commit comments

Comments
 (0)