feat: add Injective Mainnet to Price API supported chains#8487
Open
jeremy-consensys wants to merge 1 commit intomainfrom
Open
feat: add Injective Mainnet to Price API supported chains#8487jeremy-consensys wants to merge 1 commit intomainfrom
jeremy-consensys wants to merge 1 commit intomainfrom
Conversation
5ac89ad to
dffc07d
Compare
Add chain 1776 (Injective Mainnet, native symbol INJ, slip44:22000119) to SPOT_PRICES_SUPPORT_INFO so clients request spot prices for Injective tokens from the Price API.
dffc07d to
b4801ee
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Explanation
Injective Mainnet (chain
0x6f0/ 1776) is missing fromSPOT_PRICES_SUPPORT_INFOinassets-controllers.validateChainIdSupported('0x6f0')therefore returnsfalse, so Extension and Mobile never call the Price API for any Injective token (native or ERC20). The wallet UI shows "no conversion rate available" for INJ and every Injective ERC20 (USDT, wETH, USDC, ATOM, TIA, stINJ).This PR adds
'0x6f0': 'eip155:1776/slip44:22000119'toSPOT_PRICES_SUPPORT_INFO— INJ's CAIP-19 asset identifier already exists inva-mmcx-price-api's slip44 map. Same one-line pattern as #7939 (Chiliz, Plasma).The
it.each(SUPPORTED_CHAIN_IDS)test atsrc/token-prices-service/codefi-v2.test.ts:1762automatically covers the new entry.The Injective EVM ERC20 contracts must also be wired up server-side in the Price API — that work lives in the companion PR (link below). Without it, this change unblocks native INJ but ERC20 prices still come back empty.
References
Checklist
Note
Low Risk
Low risk: a single new entry in the
SPOT_PRICES_SUPPORT_INFOmapping plus a changelog note; impact is limited to enabling price lookups/validation for the new chain ID.Overview
Enables Price API support for Injective Mainnet by adding chain
0x6f0→eip155:1776/slip44:22000119toSPOT_PRICES_SUPPORT_INFO(used for supported-network validation and native-asset CAIP-19 resolution).Updates the
assets-controllerschangelog to document the new supported chain.Reviewed by Cursor Bugbot for commit b4801ee. Bugbot is set up for automated code reviews on this repo. Configure here.