fix(widget): correct yield-bearing reward token labels#536
Conversation
Label reward tokens as yield-bearing only when a distinct output token has a valid price-per-share state. This avoids treating automatic reward claiming as a token mechanic and removes the PPS-bearing UI copy.
|
📝 WalkthroughWalkthroughAdds a domain helper ChangesYield-bearing reward token label
Sequence Diagram(s)sequenceDiagram
participant Model as Dashboard Model
participant Formatter as formatRewardTokenLabel
participant Helper as hasYieldBearingOutputToken
participant i18n as TFunction
Model->>Formatter: (yieldDto, t)
Formatter->>Helper: hasYieldBearingOutputToken(yieldDto)
Helper-->>Formatter: boolean
alt true
Formatter->>i18n: t("yield_bearing_reward_token", {symbol: outputToken.symbol})
i18n-->>Formatter: "TOKEN (yield-bearing)"
else false
Formatter-->>Model: outputToken.symbol or token.symbol
end
Formatter-->>Model: reward token label
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
Summary by CodeRabbit