|
1 | 1 | import { atom } from 'jotai' |
2 | 2 |
|
3 | 3 | import { STABLECOINS } from '@cowprotocol/common-const' |
4 | | -import { getCurrencyAddress } from '@cowprotocol/common-utils' |
5 | | -import { OrderKind, SupportedChainId } from '@cowprotocol/cow-sdk' |
| 4 | +import { getCurrencyAddress, isInjectedWidget } from '@cowprotocol/common-utils' |
| 5 | +import { OrderKind } from '@cowprotocol/cow-sdk' |
6 | 6 | import { walletDetailsAtom, walletInfoAtom } from '@cowprotocol/wallet' |
7 | 7 |
|
8 | | -import { featureFlagsAtom } from '../../../common/state/featureFlagsState' |
9 | | -import { derivedTradeStateAtom } from '../../trade' |
| 8 | +import { derivedTradeStateAtom } from 'modules/trade' |
| 9 | + |
| 10 | +import { featureFlagsAtom } from 'common/state/featureFlagsState' |
| 11 | + |
10 | 12 | import { VolumeFee } from '../types' |
11 | 13 |
|
12 | 14 | const SAFE_FEE_RECIPIENT = '0x63695Eee2c3141BDE314C5a6f89B98E62808d716' |
@@ -39,9 +41,8 @@ export const safeAppFeeAtom = atom<VolumeFee | null>((get) => { |
39 | 41 | const { isSafeAppFeeEnabled } = get(featureFlagsAtom) |
40 | 42 | const { inputCurrency, outputCurrency, inputCurrencyFiatAmount, outputCurrencyFiatAmount, orderKind } = |
41 | 43 | get(derivedTradeStateAtom) || {} |
42 | | - const isBaseNetwork = chainId === SupportedChainId.BASE |
43 | 44 |
|
44 | | - if (!isSafeApp || !isSafeAppFeeEnabled || isBaseNetwork) return null |
| 45 | + if (!isSafeApp || !isSafeAppFeeEnabled || isInjectedWidget()) return null |
45 | 46 |
|
46 | 47 | const fiatCurrencyValue = orderKind === OrderKind.SELL ? inputCurrencyFiatAmount : outputCurrencyFiatAmount |
47 | 48 | const fiatAmount = fiatCurrencyValue ? +fiatCurrencyValue.toExact() : null |
|
0 commit comments