Skip to content

Commit e3e226b

Browse files
authored
fix: use flashloan guard for any swap provider (#2793)
1 parent 2e36e3d commit e3e226b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { SxProps } from '@mui/material';
22
import { Dispatch, useEffect } from 'react';
33

4-
import { ActionsBlockedReason, SwapError, SwapProvider, SwapState } from '../../types';
4+
import { ActionsBlockedReason, SwapError, SwapState } from '../../types';
55
import { isProtocolSwapState, ProtocolSwapState } from '../../types/state.types';
66
import { FlashLoanDisabledBlockingError } from './FlashLoanDisabledBlockingError';
77

@@ -10,9 +10,7 @@ export const hasFlashLoanDisabled = (state: SwapState): boolean => {
1010
return false;
1111
}
1212

13-
// Check if provider is Paraswap, using flashloan, and sourceReserve exists
1413
if (
15-
state.provider === SwapProvider.PARASWAP &&
1614
state.useFlashloan === true &&
1715
state.sourceReserve?.reserve &&
1816
!state.sourceReserve.reserve.flashLoanEnabled

0 commit comments

Comments
 (0)