We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd88b41 commit fc77098Copy full SHA for fc77098
src/components/transactions/Swap/errors/shared/FlashLoanDisabledBlockingGuard.tsx
@@ -10,11 +10,11 @@ export const hasFlashLoanDisabled = (state: SwapState): boolean => {
10
return false;
11
}
12
13
- if (
14
- state.useFlashloan === true &&
15
- state.sourceReserve?.reserve &&
16
- !state.sourceReserve.reserve.flashLoanEnabled
17
- ) {
+ const reserve = !state.isInvertedSwap
+ ? state.sourceReserve?.reserve
+ : state.destinationReserve?.reserve;
+
+ if (state.useFlashloan === true && reserve && !reserve.flashLoanEnabled) {
18
return true;
19
20
0 commit comments