fix: decode flow cap activity details - #801
Conversation
|
🚅 Deployed to the euler-lite-pr-801 environment in euler-lite(dev,PR previews)
|
📝 WalkthroughWalkthroughFlow-cap configurations are parsed and formatted as strategy entries. Strategy addresses are included in vault resolution. Activity rows render optional metadata beside address links. ChangesFlow-cap activity display
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant set_flow_caps
participant activity_display
participant ActivityEventRow
set_flow_caps->>activity_display: provide serialized configuration
activity_display->>activity_display: validate and format strategy entries
activity_display->>ActivityEventRow: provide address links and addressDetails
ActivityEventRow->>ActivityEventRow: render wrapped address rows
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Review summary
No high-severity issues found. This is a display-only change that decodes Earn set_flow_caps configs into strategy rows with max-in/max-out amounts; parsing fails closed to the raw config string, amounts stay in bigint via formatUnits, and units correctly come from the Earn vault underlying asset (matching PublicAllocator semantics).
Reviewed: utils/activity-display.ts, components/entities/activity/ActivityEventRow.vue, tests/utils/activity-display.test.ts · Traced beyond the diff: resolveChangeAddresses / vault metadata lookup, formatActivityTokenAmount, getActivityResolvableVaultAddresses → ActivityEventRow hydration, Earn PublicAllocator FlowCaps / MAX_SETTABLE_FLOW_CAP · Protocol skills consulted: euler-earn
Not flagged
- No
Unlimitedmapping for flow caps: unlike Earn allocation caps (UINT136_MAX), PublicAllocator has no unlimited sentinel (MAX_SETTABLE_FLOW_CAP = type(uint128).max / 2); treating that as Unlimited would be inventing protocol meaning. - String-only
maxIn/maxOutvalidation is intentional given nested JSON and uint128 range; author verified against a live Monad Earn vault. - XSS surface is text interpolation only (
{{ detail.addressDetails[...] }}); nov-html.
Sent by Cursor Automation: Lite PR Reviewer


Summary
Changes
Preview
Screenshots
Collapsed
Expanded
Test plan
Summary by CodeRabbit
New Features
Bug Fixes