-
Notifications
You must be signed in to change notification settings - Fork 479
Expand file tree
/
Copy pathshared.constants.ts
More file actions
32 lines (26 loc) · 1.11 KB
/
shared.constants.ts
File metadata and controls
32 lines (26 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { CustomMarket } from 'src/ui-config/marketsConfig';
import { SwapType } from '../types';
export const SAFETY_MODULE_TOKENS = [
'stkgho',
'stkaave',
'stkaavewstethbptv2',
'stkbptv2',
'stkbpt',
'stkabpt',
];
export const LIQUIDATION_SAFETY_THRESHOLD = 1.05;
export const LIQUIDATION_DANGER_THRESHOLD = 1.01;
export const SESSION_STORAGE_EXPIRY_MS = 15 * 60 * 1000;
// TODO: Do we want one per swap type to analyze analytics?
export const APP_CODE_PER_SWAP_TYPE: Record<SwapType, string> = {
[SwapType.Swap]: 'aave-v3-interface-widget',
[SwapType.CollateralSwap]: 'aave-v3-interface-collateral-swap',
[SwapType.DebtSwap]: 'aave-v3-interface-debt-swap',
[SwapType.RepayWithCollateral]: 'aave-v3-interface-repay-with-collateral',
[SwapType.WithdrawAndSwap]: 'aave-v3-interface-withdraw-and-swap',
};
export const APP_CODE_VALUES = Object.values(APP_CODE_PER_SWAP_TYPE);
export const isHorizonMarket = (currentMarket: string) =>
currentMarket === CustomMarket.proto_horizon_v3 ||
currentMarket === CustomMarket.proto_sepolia_horizon_v3 ||
currentMarket === ('fork_proto_horizon_v3' as CustomMarket);