-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathconstants.tsx
More file actions
146 lines (136 loc) · 4.75 KB
/
constants.tsx
File metadata and controls
146 lines (136 loc) · 4.75 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
import { SafeLink } from "@morpho-org/uikit/components/safe-link";
import { type Deployments } from "@morpho-org/uikit/lib/deployments";
import { ReactNode } from "react";
import { celo, type Chain, hemi, lisk, optimism, plumeMainnet, polygon, soneium, worldchain } from "wagmi/chains";
/**
* App-wide deprecation banner configuration.
* Set to undefined to disable the banner.
*/
export const APP_DEPRECATION_BANNER: { color: string; text: ReactNode } | undefined = {
color: "bg-amber-600",
text: (
<span className="grow py-2 text-center">
Morpho Lite will be gradually phased out in the coming months; learn more{" "}
<SafeLink
href="https://help.morpho.org/en/articles/13560956-morpho-lite-app-deprecation"
target="_blank"
className="underline"
>
here
</SafeLink>
.
</span>
),
};
/**
* Chain-specific deprecation modal configuration.
* Only chains listed here will show the deprecation modal.
*/
export const CHAIN_DEPRECATION_INFO: Partial<
Record<keyof Deployments, { chain: Chain; cutoffDate: string; ecosystemBuilder: string; ecosystemBuilderUrl: string }>
> = {
// [worldchain.id]: {
// chain: worldchain,
// cutoffDate: "February 14, 2026",
// ecosystemBuilder: "Oku",
// ecosystemBuilderUrl: "https://oku.trade/morpho/vaults?inputChain=worldchain",
// },
[soneium.id]: {
chain: soneium,
cutoffDate: "March 16, 2026",
ecosystemBuilder: "Feather",
ecosystemBuilderUrl: "https://app.feather.zone/portfolio",
},
[lisk.id]: {
chain: lisk,
cutoffDate: "March 16, 2026",
ecosystemBuilder: "Feather",
ecosystemBuilderUrl: "https://app.feather.zone/portfolio",
},
[celo.id]: {
chain: celo,
cutoffDate: "March 16, 2026",
ecosystemBuilder: "Feather",
ecosystemBuilderUrl: "https://app.feather.zone/portfolio",
},
};
export function isReduceOnly(chainId: number | undefined) {
return chainId !== undefined && (CHAIN_DEPRECATION_INFO[chainId] !== undefined || chainId === worldchain.id);
}
export const APP_DETAILS = {
// NOTE: Should always match the title in `index.html` (won't break anything, but should be correct)
name: import.meta.env.VITE_APP_TITLE,
description: "A minimal and open-source version of the main Morpho App",
url: "https://lite.morpho.org",
icon: "/favicon.svg",
};
export const WORDMARK = ""; // Replace with "/your-wordmark.svg" to customize interface
export const MIN_TIMELOCK = 3 * 24 * 60 * 60; // For filtering vaults
export const DEFAULT_CHAIN = worldchain;
export const TRANSACTION_DATA_SUFFIX = "0x117E"; // (L I T E)
export const TERMS_OF_USE = "https://cdn.morpho.org/documents/Morpho_Terms_of_Use.pdf";
export const RISKS_DOCUMENTATION = "https://docs.morpho.org/learn/resources/risks/";
export const ADDRESSES_DOCUMENTATION = "https://docs.morpho.org/getting-started/resources/addresses/";
export const SHARED_LIQUIDITY_DOCUMENTATION = "https://docs.morpho.org/build/borrow/concepts/public-allocator";
export const BANNERS: Record<keyof Deployments, { color: string; text: ReactNode }> = {
[hemi.id]: {
color: "bg-[rgb(238,117,53)]",
text: (
<span className="grow py-2 text-center text-black">
Access additional features and explore incentives via the interface offered by{" "}
<SafeLink className="underline" href="https://morpho.solera.market/earn?chains=Hemi">
Solera
</SafeLink>
.
</span>
),
},
[plumeMainnet.id]: {
color: "bg-[rgb(255,61,0)]",
text: (
<span className="grow py-2 text-center">
Access additional features and explore incentives via the interface offered by{" "}
<SafeLink className="underline" href="https://app.mysticfinance.xyz">
Mystic
</SafeLink>
.
</span>
),
},
[polygon.id]: {
color: "bg-purple-500",
text: (
<span className="grow py-2 text-center">
Claim rewards and access enhanced features on the external{" "}
<SafeLink className="underline" href="https://compound.blue">
Compound Blue
</SafeLink>{" "}
interface.
</span>
),
},
[optimism.id]: {
color: "bg-red-500",
text: (
<span className="grow py-2 text-center">
The most popular OP Mainnet markets are also accessible on{" "}
<SafeLink className="underline" href="https://moonwell.fi">
Moonwell
</SafeLink>
.
</span>
),
},
[worldchain.id]: {
color: "bg-black",
text: (
<span className="grow py-2 text-center">
Claim rewards and access enhanced features on the external{" "}
<SafeLink className="underline" href="https://oku.trade/morpho/vaults?inputChain=worldchain">
Oku
</SafeLink>{" "}
interface.
</span>
),
},
};