Skip to content
This repository was archived by the owner on May 6, 2026. It is now read-only.

Commit c364c1c

Browse files
chore(lite): remove sei, add deprecation notice for tac and hemi (#123)
1 parent 415f69e commit c364c1c

7 files changed

Lines changed: 75 additions & 91 deletions

File tree

apps/lite/src/app/dashboard/borrow-subpage.tsx

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import * as Merkl from "@/hooks/use-merkl-campaigns";
2222
import { useMerklOpportunities } from "@/hooks/use-merkl-opportunities";
2323
import { useTopNCurators } from "@/hooks/use-top-n-curators";
2424
import { type DisplayableCurators, getDisplayableCurators } from "@/lib/curators";
25-
import { CREATE_METAMORPHO_EVENT_OVERRIDES, getDeploylessMode, getShouldEnforceDeadDeposit } from "@/lib/overrides";
25+
import { getDeploylessMode, getShouldEnforceDeadDeposit } from "@/lib/overrides";
2626
import { getTokenURI } from "@/lib/tokens";
2727

2828
const STALE_TIME = 5 * 60 * 1000;
@@ -37,7 +37,6 @@ export function BorrowSubPage() {
3737
const { chain } = useOutletContext() as { chain?: Chain };
3838
const chainId = chain?.id;
3939

40-
const shouldOverrideCreateMetaMorphoEvents = chainId !== undefined && chainId in CREATE_METAMORPHO_EVENT_OVERRIDES;
4140
const shouldUseDeploylessReads = getDeploylessMode(chainId) === "deployless";
4241
const shouldEnforceDeadDeposit = getShouldEnforceDeadDeposit(chainId);
4342

@@ -66,14 +65,11 @@ export function BorrowSubPage() {
6665
reverseChronologicalOrder: true,
6766
eventName: "CreateMetaMorpho",
6867
strict: true,
69-
query: { enabled: chainId !== undefined && !shouldOverrideCreateMetaMorphoEvents && fromBlock !== undefined },
68+
query: { enabled: chainId !== undefined && fromBlock !== undefined },
7069
});
7170
const vaultAddresses = useMemo(
72-
() =>
73-
shouldOverrideCreateMetaMorphoEvents
74-
? CREATE_METAMORPHO_EVENT_OVERRIDES[chainId]
75-
: createMetaMorphoEvents.map((ev) => ev.args.metaMorpho),
76-
[chainId, shouldOverrideCreateMetaMorphoEvents, createMetaMorphoEvents],
71+
() => createMetaMorphoEvents.map((ev) => ev.args.metaMorpho),
72+
[chainId, createMetaMorphoEvents],
7773
);
7874

7975
// MARK: Fetch additional data for whitelisted vaults
@@ -93,8 +89,7 @@ export function BorrowSubPage() {
9389
),
9490
stateOverride: shouldUseDeploylessReads ? undefined : [readAccrualVaultsStateOverride()],
9591
query: {
96-
enabled:
97-
chainId !== undefined && (fractionFetched > 0.99 || shouldOverrideCreateMetaMorphoEvents) && !!morpho?.address,
92+
enabled: chainId !== undefined && fractionFetched > 0.99 && !!morpho?.address,
9893
staleTime: STALE_TIME,
9994
gcTime: Infinity,
10095
notifyOnChangeProps: ["data"],

apps/lite/src/app/dashboard/earn-subpage.tsx

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import * as Merkl from "@/hooks/use-merkl-campaigns";
3030
import { useMerklOpportunities } from "@/hooks/use-merkl-opportunities";
3131
import { useTopNCurators } from "@/hooks/use-top-n-curators";
3232
import { getDisplayableCurators } from "@/lib/curators";
33-
import { CREATE_METAMORPHO_EVENT_OVERRIDES, getDeploylessMode, getShouldEnforceDeadDeposit } from "@/lib/overrides";
33+
import { getDeploylessMode, getShouldEnforceDeadDeposit } from "@/lib/overrides";
3434
import { getTokenURI } from "@/lib/tokens";
3535

3636
const STALE_TIME = 5 * 60 * 1000;
@@ -40,7 +40,6 @@ export function EarnSubPage() {
4040
const { chain } = useOutletContext() as { chain?: Chain };
4141
const chainId = chain?.id;
4242

43-
const shouldOverrideCreateMetaMorphoEvents = chainId !== undefined && chainId in CREATE_METAMORPHO_EVENT_OVERRIDES;
4443
const shouldUseDeploylessReads = getDeploylessMode(chainId) === "deployless";
4544
const shouldEnforceDeadDeposit = getShouldEnforceDeadDeposit(chainId);
4645

@@ -69,14 +68,11 @@ export function EarnSubPage() {
6968
reverseChronologicalOrder: true,
7069
eventName: "CreateMetaMorpho",
7170
strict: true,
72-
query: { enabled: chainId !== undefined && !shouldOverrideCreateMetaMorphoEvents && fromBlock !== undefined },
71+
query: { enabled: chainId !== undefined && fromBlock !== undefined },
7372
});
7473
const vaultAddresses = useMemo(
75-
() =>
76-
shouldOverrideCreateMetaMorphoEvents
77-
? CREATE_METAMORPHO_EVENT_OVERRIDES[chainId]
78-
: createMetaMorphoEvents.map((ev) => ev.args.metaMorpho),
79-
[chainId, shouldOverrideCreateMetaMorphoEvents, createMetaMorphoEvents],
74+
() => createMetaMorphoEvents.map((ev) => ev.args.metaMorpho),
75+
[createMetaMorphoEvents],
8076
);
8177

8278
// MARK: Fetch additional data for whitelisted vaults
@@ -96,8 +92,7 @@ export function EarnSubPage() {
9692
),
9793
stateOverride: shouldUseDeploylessReads ? undefined : [readAccrualVaultsStateOverride()],
9894
query: {
99-
enabled:
100-
chainId !== undefined && (fractionFetched > 0.99 || shouldOverrideCreateMetaMorphoEvents) && !!morpho?.address,
95+
enabled: chainId !== undefined && fractionFetched > 0.99 && !!morpho?.address,
10196
staleTime: STALE_TIME,
10297
gcTime: Infinity,
10398
notifyOnChangeProps: ["data"],

apps/lite/src/components/deprecation-modal.tsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,19 @@ export function DeprecationModal({ chainId }: { chainId: number | undefined }) {
3333
<AlertDialogDescription asChild>
3434
<div className="bg-secondary text-secondary-foreground rounded-lg p-4 font-light">
3535
<p>
36-
Lite is being deprecated across all ecosystems, including {deprecationInfo.chain.name}, and is now in reduce-only mode.
37-
Your positions are safe, Morpho vaults and markets are not going away - all positions remain fully accessible from {" "}
38-
<SafeLink className="underline" href={deprecationInfo.ecosystemBuilderUrl}>
39-
{deprecationInfo.ecosystemBuilder}
40-
</SafeLink>{" "}.
41-
</p>
36+
Lite is being deprecated across all ecosystems, including {deprecationInfo.chain.name}, and is now in
37+
reduce-only mode. Your positions are safe, Morpho vaults and markets are not going away - all positions
38+
remain fully accessible from{" "}
39+
<SafeLink className="underline" href={deprecationInfo.ecosystemBuilderUrl}>
40+
{deprecationInfo.ecosystemBuilder}
41+
</SafeLink>
42+
.
43+
</p>
4244

4345
<p className="mt-4">
4446
<strong className="font-medium">
45-
You can still use the Lite app on {deprecationInfo.chain.name} until {deprecationInfo.cutoffDate} to repay, withdraw and close positions, but you can&apos;t open new ones.
47+
You can still use the Lite app on {deprecationInfo.chain.name} until {deprecationInfo.cutoffDate} to
48+
repay, withdraw and close positions, but you can&apos;t open new ones.
4649
</strong>{" "}
4750
</p>
4851
<p className="mt-4 font-medium">What to do next:</p>

apps/lite/src/graphql/graphql-env.d.ts

Lines changed: 35 additions & 26 deletions
Large diffs are not rendered by default.

apps/lite/src/lib/constants.tsx

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { SafeLink } from "@morpho-org/uikit/components/safe-link";
2+
import { tac } from "@morpho-org/uikit/lib/chains/tac";
23
import { type Deployments } from "@morpho-org/uikit/lib/deployments";
34
import { ReactNode } from "react";
4-
import { type Chain, hemi, optimism, plumeMainnet, polygon, sei, worldchain } from "wagmi/chains";
5+
import { type Chain, hemi, optimism, plumeMainnet, polygon, worldchain } from "wagmi/chains";
56

67
/**
78
* App-wide deprecation banner configuration.
@@ -31,28 +32,34 @@ export const APP_DEPRECATION_BANNER: { color: string; text: ReactNode } | undefi
3132
export const CHAIN_DEPRECATION_INFO: Partial<
3233
Record<keyof Deployments, { chain: Chain; cutoffDate: string; ecosystemBuilder: string; ecosystemBuilderUrl: string }>
3334
> = {
34-
[worldchain.id]: {
35-
chain: worldchain,
36-
cutoffDate: "February 14, 2026",
37-
ecosystemBuilder: "Oku",
38-
ecosystemBuilderUrl: "https://oku.trade/morpho/vaults?inputChain=worldchain",
39-
},
35+
// [worldchain.id]: {
36+
// chain: worldchain,
37+
// cutoffDate: "February 14, 2026",
38+
// ecosystemBuilder: "Oku",
39+
// ecosystemBuilderUrl: "https://oku.trade/morpho/vaults?inputChain=worldchain",
40+
// },
4041
[plumeMainnet.id]: {
4142
chain: plumeMainnet,
42-
cutoffDate: "March 1, 2026",
43+
cutoffDate: "March 2, 2026",
4344
ecosystemBuilder: "Mystic",
4445
ecosystemBuilderUrl: "https://app.mysticfinance.xyz",
4546
},
46-
[sei.id]: {
47-
chain: sei,
48-
cutoffDate: "February 14, 2026",
47+
[hemi.id]: {
48+
chain: hemi,
49+
cutoffDate: "March 2, 2026",
50+
ecosystemBuilder: "Feather",
51+
ecosystemBuilderUrl: "https://app.feather.zone/portfolio",
52+
},
53+
[tac.id]: {
54+
chain: tac,
55+
cutoffDate: "March 2, 2026",
4956
ecosystemBuilder: "Feather",
5057
ecosystemBuilderUrl: "https://app.feather.zone/portfolio",
5158
},
5259
};
5360

5461
export function isReduceOnly(chainId: number | undefined) {
55-
return chainId !== undefined && CHAIN_DEPRECATION_INFO[chainId] !== undefined;
62+
return chainId !== undefined && (CHAIN_DEPRECATION_INFO[chainId] !== undefined || chainId === worldchain.id);
5663
}
5764

5865
export const APP_DETAILS = {
@@ -113,18 +120,6 @@ export const BANNERS: Record<keyof Deployments, { color: string; text: ReactNode
113120
</span>
114121
),
115122
},
116-
[sei.id]: {
117-
color: "bg-[rgb(145,44,34)]",
118-
text: (
119-
<span className="grow py-2 text-center">
120-
Claim rewards and access enhanced features on the external{" "}
121-
<SafeLink className="underline" href="https://app.feather.zone/portfolio">
122-
Feather
123-
</SafeLink>{" "}
124-
interface.
125-
</span>
126-
),
127-
},
128123
[optimism.id]: {
129124
color: "bg-red-500",
130125
text: (

apps/lite/src/lib/overrides.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
import { tac } from "@morpho-org/uikit/lib/chains/tac";
22
import { CORE_DEPLOYMENTS } from "@morpho-org/uikit/lib/deployments";
3-
import { type Address } from "viem";
4-
import { celo, sei } from "viem/chains";
5-
6-
export const CREATE_METAMORPHO_EVENT_OVERRIDES: Record<number, Address[]> = {
7-
[sei.id]: ["0x015F10a56e97e02437D294815D8e079e1903E41C", "0x948FcC6b7f68f4830Cd69dB1481a9e1A142A4923"],
8-
};
3+
import { celo } from "viem/chains";
94

105
// TODO: For now, we use bytecode deployless reads on TAC, since the RPC doesn't support `stateOverride`.
116
// This means we're forfeiting multicall in this special case, but at least it works. Once we have

apps/lite/src/lib/wagmi-config.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import {
1818
plumeMainnet,
1919
polygon,
2020
scroll as scrollMainnet,
21-
sei,
2221
soneium,
2322
sonic,
2423
unichain,
@@ -82,7 +81,6 @@ const chains = [
8281
optimism,
8382
plumeMainnet,
8483
// scrollMainnet,
85-
sei,
8684
soneium,
8785
// sonic,
8886
customChains.tac,
@@ -184,12 +182,6 @@ const transports: { [K in (typeof chains)[number]["id"]]: Transport } & { [k: nu
184182
{ url: "https://scroll-mainnet.gateway.tenderly.co", batch: { batchSize: 10 } },
185183
{ url: "https://scroll.drpc.org", batch: false },
186184
]),
187-
[sei.id]: createFallbackTransport([
188-
...createPrivateProxyHttp(sei.id),
189-
{ url: "https://sei-public.nodies.app", batch: false, key: "sei-nodies-maxNum-2000" },
190-
{ url: "https://sei.therpc.io", batch: false, key: "sei-therpc-maxNum-2000" },
191-
{ url: "https://sei.drpc.org", batch: false, key: "sei-drpc-maxNum-2000" },
192-
]),
193185
[soneium.id]: createFallbackTransport([
194186
...createPrivateProxyHttp(soneium.id),
195187
{ url: "https://soneium.gateway.tenderly.co", batch: { batchSize: 10 } },

0 commit comments

Comments
 (0)