Skip to content

Commit 1ec1f46

Browse files
committed
limit order pre warn only with cow
1 parent 4f900b5 commit 1ec1f46

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/transactions/Swap/warnings/preInputs/NativeLimitOrderInfo.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ import { Trans } from '@lingui/macro';
22
import { Typography } from '@mui/material';
33
import { Warning } from 'src/components/primitives/Warning';
44

5-
import { SwapParams, SwapState, SwapType, TokenType } from '../../types';
5+
import { SwapParams, SwapProvider, SwapState, SwapType, TokenType } from '../../types';
66

77
export function NativeLimitOrderInfo({ state, params }: { state: SwapState; params: SwapParams }) {
88
// Classic swaps only; show when input token is native
99
const isClassicSwap = params.swapType === SwapType.Swap;
1010
const isNativeInput = state.sourceToken?.tokenType === TokenType.NATIVE;
11+
const isCoWProtocol = state.provider === SwapProvider.COW_PROTOCOL;
1112

12-
if (!isClassicSwap || !isNativeInput) return null;
13+
if (!isClassicSwap || !isNativeInput || !isCoWProtocol) return null;
1314

1415
return (
1516
<Warning severity="info" icon={false} sx={{ mt: 2, mb: 2 }}>

0 commit comments

Comments
 (0)