Skip to content

Commit 4b84a4e

Browse files
sktbrdclaude
andauthored
fix(stake): deposit-first yield source tiles, drop the real-gas line (#277)
* fix(stake): deposit-first yield source tiles, drop the real-gas line Community feedback (willywonka): users deposit regular USDC/stETH — Morpho/Morpheus is only the yield source. Tile title becomes the deposit ("Deposit USDC"), the protocol moves to the source line ("yield via Morpheus · in MOR"). Also removes the "Ethereum mainnet — real gas" sentence from the amber note, keeping the 7-day lock fact. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(stake): swap handoff link under the amount input "Need {unit}? Get it on Swap" follows the selected pool's asset and opens /swap in a new tab, so the dialog and the typed amount survive the detour. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 648f763 commit 4b84a4e

3 files changed

Lines changed: 30 additions & 18 deletions

File tree

messages/en/stake.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,12 @@
112112
},
113113
"opp": {
114114
"choose": "What does {name} offer?",
115-
"stableTag": "Stable",
116-
"morTag": "MOR · variable",
117-
"vaultUsdc": "Morpho USDC",
118-
"morSteth": "Morpheus stETH",
119-
"morUsdc": "Morpheus USDC",
115+
"depositTitle": "Deposit {unit}",
116+
"needAsset": "Need {unit}? Get it on Swap ↗",
117+
"viaMorpho": "yield via Morpho · stable",
118+
"viaMorpheus": "yield via Morpheus · in MOR",
120119
"estNote": "≈{rate}% APR estimate — swings with the MOR price and pool size.",
121-
"mainnetWarn": "Ethereum mainnet — real gas. Principal unlocks after a 7-day lock.",
120+
"mainnetWarn": "Principal unlocks after a 7-day lock.",
122121
"estYearLabel": "Estimated value / year",
123122
"estYearNote": "Paid in MOR on Arbitrum — a live estimate, not a guarantee.",
124123
"approving": "approving…",

messages/pt-br/stake.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,12 @@
112112
},
113113
"opp": {
114114
"choose": "O que {name} oferece?",
115-
"stableTag": "Estável",
116-
"morTag": "MOR · variável",
117-
"vaultUsdc": "Morpho USDC",
118-
"morSteth": "Morpheus stETH",
119-
"morUsdc": "Morpheus USDC",
115+
"depositTitle": "Depositar {unit}",
116+
"needAsset": "Precisa de {unit}? Consiga no Swap ↗",
117+
"viaMorpho": "rendimento via Morpho · estável",
118+
"viaMorpheus": "rendimento via Morpheus · em MOR",
120119
"estNote": "≈{rate}% APR estimado — varia com o preço do MOR e o tamanho do pool.",
121-
"mainnetWarn": "Ethereum mainnet — gas real. O principal destrava após um lock de 7 dias.",
120+
"mainnetWarn": "O principal destrava após um lock de 7 dias.",
122121
"estYearLabel": "Valor estimado / ano",
123122
"estYearNote": "Pago em MOR na Arbitrum — estimativa ao vivo, não é garantia.",
124123
"approving": "aprovando…",

src/components/stake/StakeDialog.tsx

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { useEthPrice } from "@/hooks/use-eth-price";
1111
import { useMorpheusStake } from "@/hooks/use-morpheus-stake";
1212
import { useStakeDeposit } from "@/hooks/use-stake-deposit";
1313
import { useVaultEarned, useVaultPosition } from "@/hooks/use-vault-total";
14+
import { Link } from "@/i18n/navigation";
1415
import { getRider } from "@/lib/gnars-vaults";
1516
import { claimLockEndFor, LOCK_OPTIONS, multiplierForYears } from "@/lib/lock-multiplier";
1617
import { riderCustomLine } from "@/lib/rider-lines";
@@ -34,7 +35,6 @@ interface Opp {
3435
kind: "vault" | "mor";
3536
asset: "usdc" | "steth";
3637
unit: string;
37-
labelKey: string;
3838
venue: string;
3939
logo: string;
4040
presets: number[];
@@ -46,7 +46,6 @@ const OPPS: Opp[] = [
4646
kind: "vault",
4747
asset: "usdc",
4848
unit: "USDC",
49-
labelKey: "opp.vaultUsdc",
5049
venue: "Morpho",
5150
logo: MORPHO_LOGO,
5251
presets: [100, 500, 1000, 5000],
@@ -57,7 +56,6 @@ const OPPS: Opp[] = [
5756
kind: "mor",
5857
asset: "steth",
5958
unit: "stETH",
60-
labelKey: "opp.morSteth",
6159
venue: "Morpheus",
6260
logo: MORPHEUS_LOGO,
6361
presets: [0.011, 0.1, 0.5, 1],
@@ -68,7 +66,6 @@ const OPPS: Opp[] = [
6866
kind: "mor",
6967
asset: "usdc",
7068
unit: "USDC",
71-
labelKey: "opp.morUsdc",
7269
venue: "Morpheus",
7370
logo: MORPHEUS_LOGO,
7471
presets: [100, 500, 1000, 5000],
@@ -432,12 +429,17 @@ export function StakeDialog({
432429
{/* eslint-disable-next-line @next/next/no-img-element */}
433430
<img src={o.logo} alt="" className="h-6 w-6 flex-none rounded-full" />
434431
<div className="min-w-0 flex-1">
435-
<div className="text-sm font-bold">{t(o.labelKey)}</div>
432+
{/* Deposit asset first, protocol second: users deposit
433+
regular USDC/stETH — Morpho/Morpheus is only the
434+
yield source (community feedback). */}
435+
<div className="text-sm font-bold">
436+
{t("opp.depositTitle", { unit: o.unit })}
437+
</div>
436438
<div
437439
className="mt-0.5 text-[11.5px] font-semibold"
438440
style={{ color: muted }}
439441
>
440-
{o.kind === "vault" ? t("opp.stableTag") : t("opp.morTag")} · {o.unit}
442+
{o.kind === "vault" ? t("opp.viaMorpho") : t("opp.viaMorpheus")}
441443
</div>
442444
</div>
443445
<div className="flex-none text-[17px] font-black" style={{ color: GREEN }}>
@@ -493,6 +495,18 @@ export function StakeDialog({
493495
);
494496
})}
495497
</div>
498+
{/* No {unit} yet? Hand off to /swap in a new tab so the dialog
499+
(and the typed amount) survive the detour. */}
500+
<div className="mt-2 text-[12px] font-semibold">
501+
<Link
502+
href="/swap"
503+
target="_blank"
504+
className="underline underline-offset-4 transition-colors hover:text-white"
505+
style={{ color: muted }}
506+
>
507+
{t("opp.needAsset", { unit: opp.unit })}
508+
</Link>
509+
</div>
496510
{rate > 0 && (
497511
<div className="mt-3 text-[12.5px] font-semibold" style={{ color: muted }}>
498512
{t("aprNote", { rate: rate.toFixed(2), rateType: rateKind, source: opp.venue })}

0 commit comments

Comments
 (0)