You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Polygon chain mappings updated to reference a new native token enum value. Added polygon-ecosystem-token member to the NativeTokens enum, then updated POLYGON_MAINNET and POLYGON_AMOY currency entries to use this new token reference instead of the previous mapping.
Added new enum member "polygon-ecosystem-token" to NativeTokens, positioned between "matic-network" and "binancecoin".
Polygon chain mappings src/enums/currency.ts
Updated POLYGON_MAINNET and POLYGON_AMOY currency entries to map to NativeTokens["polygon-ecosystem-token"] instead of NativeTokens["matic-network"].
Estimated code review effort
🎯 1 (Trivial) | ⏱️ ~3 minutes
Straightforward enum member addition with consistent reference updates across two identical chain mappings.
Poem
Polygons bloom in fresh new light,
A token reborn, ecosystem bright,
Where MAINNET and AMOY now convene,
Under one verdant banner supreme. 🟣✨
Pre-merge checks and finishing touches
❌ Failed checks (1 warning)
Check name
Status
Explanation
Resolution
Docstring Coverage
⚠️ Warning
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.
You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name
Status
Explanation
Description Check
✅ Passed
Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check
✅ Passed
The title "fix: update polygon native" is directly related to the actual changes in the pull request. The PR updates Polygon chain mappings to reference a new "polygon-ecosystem-token" enum member instead of "matic-network", and adds the corresponding new token enum. The title uses specific domain terms ("polygon" and "native") that accurately reference the core change. However, the title is incomplete and could better convey the scope—it doesn't specify that mappings are being updated or that a new token is being introduced.
✨ Finishing touches
📝 Generate docstrings
🧪 Generate unit tests (beta)
Create PR with unit tests
Post copyable unit tests in a comment
Commit unit tests in branch fix/polygon-native
📜 Recent review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between dac283c and d6ccaaa.
📒 Files selected for processing (2)
src/enums/currency.ts (2 hunks)
src/enums/native-tokens.ts (1 hunks)
🔇 Additional comments (2)
src/enums/currency.ts (1)
6-6: This is a real breaking change—verify downstream dependencies beyond the codebase.
Both Polygon entries (POLYGON_MAINNET at line 6, POLYGON_AMOY at line 19) have been updated to use "polygon-ecosystem-token" instead of "matic-network". The old enum value still exists in NativeTokens, but the getCurrency() function will now return the new token ID for these chains.
The codebase search found no internal usage patterns that depend on the old token ID, and the old enum value wasn't removed. However, this doesn't mean there's no risk—external systems like price feeds, logging, or API contracts that depend on receiving "matic-network" from getCurrency(ChainSlug.POLYGON_MAINNET) will break.
Coordinate this with any services that consume the Currency mapping and document the migration path.
src/enums/native-tokens.ts (1)
5-5: Verified: "polygon-ecosystem-token" is the correct CoinGecko token ID for Polygon POL.
CoinGecko's coin ID for Polygon (POL, formerly MATIC) is "polygon-ecosystem-token". The code is correct.
Comment @coderabbitai help to get the list of available commands and usage tips.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by CodeRabbit