Skip to content

add correct symbol for edge cases in hold tokens#2460

Merged
0xkr3p merged 1 commit intoDefiLlama:masterfrom
0xkr3p:fix/merkl-symbol-hold-tokens
Mar 6, 2026
Merged

add correct symbol for edge cases in hold tokens#2460
0xkr3p merged 1 commit intoDefiLlama:masterfrom
0xkr3p:fix/merkl-symbol-hold-tokens

Conversation

@0xkr3p
Copy link
Contributor

@0xkr3p 0xkr3p commented Mar 6, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Fixed symbol resolution for HOLD pools by fetching on-chain vault symbol data when vault addresses are not included in token address lists, ensuring consistent and accurate symbol display across all pool types.

@coderabbitai
Copy link

coderabbitai bot commented Mar 6, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3f1f6f7c-d0fa-4f09-80b6-644e896d27b0

📥 Commits

Reviewing files that changed from the base of the PR and between dcc4cac and 318358a.

📒 Files selected for processing (1)
  • src/adaptors/merkl/index.js

📝 Walkthrough

Walkthrough

Adds logic to resolve on-chain vault symbols for HOLD pools when the vault address is not listed among the pool's token addresses. The change fetches the vault's ERC20 symbol via on-chain call and substitutes it for the pool symbol if available, with error handling wrapping the logic.

Changes

Cohort / File(s) Summary
Vault Symbol Resolution for HOLD Pools
src/adaptors/merkl/index.js
Added logic to detect HOLD pools where the vault address is absent from token addresses, compute token address set, fetch vault's ERC20 symbol via on-chain call, and substitute it for pool symbol with try/catch error handling.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A vault's true name was hiding deep,
In HOLD pools where symbols leap,
Now on-chain calls bring forth the sign,
With catches set—all will be fine!
✨ The symbol quest is now complete!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding logic to resolve correct symbols for edge cases in HOLD tokens/pools where the vault address differs from token addresses.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@llamatester
Copy link

The merkl adapter exports pools:

Test Suites: 1 passed, 1 total
Tests: 5940 passed, 5940 total
Snapshots: 0 total
Time: 1.27 s
Ran all test suites.

@0xkr3p 0xkr3p merged commit e2baaf0 into DefiLlama:master Mar 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants