Skip to content

Commit 7530e19

Browse files
sktbrdclaude
andcommitted
feat(stake): real Morpho/Morpheus logos in orbit; drop experimental card; drpc-first getLogs
- Orbit backer nodes now carry the real protocol logo — the Morpho mark for vault backers, the Morpheus mark for MOR backers — plus the legend. Added public/logos/{morpho,morpheus}.webp (official marks). - Removed the purple "MOR · experimental" MorpheusPanel from /stake (staking is an opportunity in the dialog; claim/split is the lootbox). NOTE: this also drops the Morpheus principal-withdraw UI — to be re-added minimally if needed (moot until the 7-day lock lifts). - getLogs RPC: drpc first (no range cap, serves the referrer-filtered query in ~0.2s). Alchemy's FREE tier caps eth_getLogs to a 10-block range, so it can't drive the scan; kept as a paid-tier fallback, public nodes last. tsc + next build clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 716201c commit 7530e19

7 files changed

Lines changed: 33 additions & 180 deletions

File tree

public/logos/morpheus.webp

5.02 KB
Loading

public/logos/morpho.webp

2.14 KB
Loading

src/app/[locale]/stake/[rider]/page.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { getTranslations, setRequestLocale } from "next-intl/server";
44
import { CharacterSelector } from "@/components/stake/CharacterSelector";
55
import { StakeAdminPanel } from "@/components/stake/StakeAdminPanel";
66
import { StakeOrbit } from "@/components/stake/StakeOrbit";
7-
import { MorpheusPanel } from "@/components/stake/MorpheusPanel";
87
import { MorLootbox } from "@/components/stake/MorLootbox";
98
import { RIDER_LIST, getRider } from "@/lib/gnars-vaults";
109
import { STAKE_MINIAPP_EMBED_CONFIG } from "@/lib/miniapp-config";
@@ -89,7 +88,6 @@ export default async function StakeRiderPage({
8988

9089
<CharacterSelector initialRider={rider} />
9190
<StakeOrbit />
92-
<MorpheusPanel />
9391
<StakeAdminPanel />
9492
</div>
9593
<MorLootbox />

src/app/[locale]/stake/page.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { getTranslations, setRequestLocale } from "next-intl/server";
33
import { CharacterSelector } from "@/components/stake/CharacterSelector";
44
import { StakeAdminPanel } from "@/components/stake/StakeAdminPanel";
55
import { StakeOrbit } from "@/components/stake/StakeOrbit";
6-
import { MorpheusPanel } from "@/components/stake/MorpheusPanel";
76
import { MorLootbox } from "@/components/stake/MorLootbox";
87
import { STAKE_MINIAPP_EMBED_CONFIG } from "@/lib/miniapp-config";
98

@@ -65,7 +64,6 @@ export default async function StakePage({ params }: { params: Promise<{ locale:
6564

6665
<CharacterSelector />
6766
<StakeOrbit />
68-
<MorpheusPanel />
6967
<StakeAdminPanel />
7068
</div>
7169
<MorLootbox />

src/components/stake/MorpheusPanel.tsx

Lines changed: 0 additions & 152 deletions
This file was deleted.

src/components/stake/StakeOrbit.tsx

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ const GOLD = "#f7c948";
3535
// Morpheus green — MOR stakes get their own colored stream, distinct from the
3636
// rider-tinted Morpho vault flows, so a wallet that backs both shows two lines.
3737
const MOR_GREEN = "#2be58b";
38+
// Real protocol logos, marking each backer node by where they staked.
39+
const MORPHO_LOGO = "/logos/morpho.webp";
40+
const MORPHEUS_LOGO = "/logos/morpheus.webp";
3841

3942
const W = 760;
4043
const C = W / 2;
@@ -138,16 +141,13 @@ export function StakeOrbit() {
138141

139142
<div className="mb-3 flex flex-wrap items-center gap-4 text-[11px] text-white/50">
140143
<span className="flex items-center gap-1.5">
141-
<span className="h-2 w-2 rounded-full bg-white/60" />
144+
{/* eslint-disable-next-line @next/next/no-img-element */}
145+
<img src={MORPHO_LOGO} alt="" className="h-4 w-4 rounded-full" />
142146
{t("orbit.legendVault")}
143147
</span>
144148
<span className="flex items-center gap-1.5">
145-
<span
146-
className="flex h-3.5 w-3.5 items-center justify-center rounded-full text-[8px] font-black text-[#04140d]"
147-
style={{ background: MOR_GREEN }}
148-
>
149-
M
150-
</span>
149+
{/* eslint-disable-next-line @next/next/no-img-element */}
150+
<img src={MORPHEUS_LOGO} alt="" className="h-4 w-4 rounded-full" />
151151
{t("orbit.legendMor")}
152152
</span>
153153
</div>
@@ -204,18 +204,25 @@ export function StakeOrbit() {
204204
<text x={mid.x} y={mid.y - 4} textAnchor="middle" fontSize="11" fontWeight="700" fill="#fff" style={{ paintOrder: "stroke", stroke: "#0c0a08", strokeWidth: 3 }}>
205205
{usd(b.amount)}
206206
</text>
207-
{/* backer node — MOR stakes carry the green Morpheus "M" mark */}
208-
<circle
209-
cx={bp.x} cy={bp.y} r={isYou ? 9 : 7}
210-
fill={isMor ? col : isYou ? GOLD : "#0c0a08"}
211-
stroke={isYou ? GOLD : col}
212-
strokeWidth={2}
213-
/>
214-
{isMor && (
215-
<text x={bp.x} y={bp.y + 3} textAnchor="middle" fontSize="9" fontWeight="900" fill="#04140d">
216-
M
217-
</text>
218-
)}
207+
{/* backer node — the real protocol logo (Morpho or Morpheus) */}
208+
{(() => {
209+
const r = isYou ? 12 : 10;
210+
return (
211+
<>
212+
<foreignObject x={bp.x - r} y={bp.y - r} width={r * 2} height={r * 2}>
213+
<div
214+
style={{
215+
width: "100%", height: "100%", borderRadius: "50%",
216+
backgroundColor: "#0c0a08",
217+
backgroundImage: `url(${isMor ? MORPHEUS_LOGO : MORPHO_LOGO})`,
218+
backgroundSize: "cover", backgroundPosition: "center",
219+
}}
220+
/>
221+
</foreignObject>
222+
<circle cx={bp.x} cy={bp.y} r={r} fill="none" stroke={isYou ? GOLD : col} strokeWidth={2} />
223+
</>
224+
);
225+
})()}
219226
<text x={bp.x} y={bp.y + (bp.y < C ? -14 : 20)} textAnchor="middle" fontSize="9.5" fill={isYou ? GOLD : "rgba(255,255,255,.55)"} fontFamily="monospace" fontWeight={isYou ? 700 : 400}>
220227
{isYou ? t("orbit.you") : nameOrShort(b.address, ensNames)}
221228
</text>

src/services/stake-graph.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,15 @@ import { MORPHEUS_POOLS, MOR_REWARD_POOL_INDEX, depositPoolAbi } from "@/lib/mor
1919
// the public RPCs frequently fail/timeout on the MOR log scan — and a swallowed
2020
// failure there means a staker silently vanishes from the orbit.
2121
const ALCHEMY = process.env.ALCHEMY_API_KEY;
22-
// eth.drpc.org is the reliable getLogs fallback — the other free mainnet RPCs
23-
// (publicnode/llama/ankr) reject or rate-limit eth_getLogs, which silently
24-
// emptied the MOR log scan and dropped stakers from the orbit. Verified: drpc
25-
// serves the exact referrer-filtered query in ~0.2s.
22+
// eth.drpc.org leads for the mainnet reads: it serves the referrer-filtered
23+
// eth_getLogs query reliably in ~0.2s with NO block-range cap. Alchemy's FREE
24+
// tier limits eth_getLogs to a 10-block range (useless for our scan), and the
25+
// other free RPCs (publicnode/llama) reject or rate-limit getLogs — a swallowed
26+
// failure there silently emptied the MOR scan and dropped stakers from the
27+
// orbit. Alchemy is kept as a (paid-tier) fallback; public nodes last.
2628
const ethRpcs = [
27-
...(ALCHEMY ? [`https://eth-mainnet.g.alchemy.com/v2/${ALCHEMY}`] : []),
2829
"https://eth.drpc.org",
30+
...(ALCHEMY ? [`https://eth-mainnet.g.alchemy.com/v2/${ALCHEMY}`] : []),
2931
"https://ethereum.publicnode.com",
3032
"https://eth.llamarpc.com",
3133
];

0 commit comments

Comments
 (0)