feat(metrom-adapter): integrate hold fungible asset campaign types#2813
feat(metrom-adapter): integrate hold fungible asset campaign types#2813luzzif wants to merge 1 commit into
Conversation
📝 WalkthroughWalkthroughMetrom adaptor typing and campaign processing now support the ChangesMetrom fungible asset targets
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The metrom adapter exports pools: Test Suites: 1 passed, 1 total |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/adaptors/metrom/index.ts (1)
341-362: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueLGTM on the processing logic.
The LP vs protocol/undefined branching is correct: TypeScript narrowing after the early
returnensures the fallback safely handles bothProtocolTokenDetailsandundefineddetails. ThehumanizeTargetProtocol('Hold', ...)call gracefully degrades to just'Hold'when no slug is available.One minor style note: the
ifat line 344 omits braces, while every othercaseblock and conditional in this file uses curly braces. Consider adding them for consistency.🎨 Optional style alignment
- if (asset.details?.type === 'lp') + if (asset.details?.type === 'lp') { return { symbol: `${asset.details.baseTokenSymbol} - ${asset.details.quoteTokenSymbol}`, underlyingTokens: [ asset.details.baseTokenAddress, asset.details.quoteTokenAddress, ], poolMeta: humanizeTargetProtocol('Pool on', asset.details.dex), }; + }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/adaptors/metrom/index.ts` around lines 341 - 362, Add braces around the LP-details conditional in the hold-fungible-asset case, keeping its existing early-return behavior unchanged and matching the surrounding style.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/adaptors/metrom/index.ts`:
- Around line 341-362: Add braces around the LP-details conditional in the
hold-fungible-asset case, keeping its existing early-return behavior unchanged
and matching the surrounding style.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d6386376-a8a4-478b-b01f-ba1f8c66d4bc
📒 Files selected for processing (1)
src/adaptors/metrom/index.ts
|
hi @luzzif, thanks for the PR - moving forwards we are not supporting hold campaigns, feel free to remove the hold campaign changes and keep the LP changes |
Summary by CodeRabbit