Skip to content

Commit 85502be

Browse files
NidhiKJhacursoragentarafetbenmakhlouf
authored
feat(networks): add Kinetiq Elysium network logo (#47715)
## **Description** Adds a logo for Kinetiq Elysium (chain 99901, `0x1863d`) to `CHAIN_ID_TO_NETWORK_IMAGE_URL_MAP`. **What is the reason for the change?** Kinetiq Elysium is in chainlist.org's data but is not yet in `chainid.network/chains.json`, which MM reads for the Chainlist list. Without a logo, the chain falls back to a letter avatar and sorts below logo chains in the Chainlist dropdown. Launch is 9 Nov. **What is the improvement/solution?** - Adds `app/images/elysium-network.png` (364×364 PNG supplied by the Kinetiq team). - Adds `ELYSIUM_NETWORK_IMAGE_URL` and maps `0x1863d` to it. - The key is a literal hex ID, not a `CHAIN_IDS` entry, because `CHAIN_IDS` is used to validate chain IDs in `ui/selectors/selectors.js` and `ui/pages/swaps/swaps.util.ts`. Adding it there would change behavior. - Adds a unit test for the mapping. The existing test already checks that every mapped image file exists. Note: the supplied asset is PNG, not SVG. ## **Changelog** CHANGELOG entry: null ## **Related issues** Fixes: ## **Manual testing steps** 1. Run the extension and unlock it. 2. Go to Settings > Networks > Add network > Add a network manually. 3. Enter network name `Elysium`, RPC URL `https://rpc.elysium.kinetiq.xyz`, chain ID `99901`, currency symbol `HYPE`, and save. 4. Verify the Elysium network row shows the Kinetiq Elysium logo. 5. Switch to Elysium and open the network selector. 6. Verify the logo appears there too. ## **Screenshots/Recordings** ### **Before** Letter avatar "E" for chain 99901. ### **After** Kinetiq Elysium logo. ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I've included tests if applicable - [ ] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Constants and asset mapping only; no auth, RPC, or chain-validation behavior changes. > > **Overview** > Adds a branded network icon for **Kinetiq Elysium** (chain `99901` / `0x1863d`) so it no longer falls back to a letter avatar in network and Chainlist UI. > > Introduces `ELYSIUM_NETWORK_IMAGE_URL` and wires `0x1863d` into `CHAIN_ID_TO_NETWORK_IMAGE_URL_MAP` using a literal hex key rather than `CHAIN_IDS`, avoiding validation side effects elsewhere. A focused unit test asserts the mapping path. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 91cce76. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Arafet (CN - Hong Kong) <52028926+arafetbenmakhlouf@users.noreply.github.com>
1 parent 854e9e7 commit 85502be

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

‎app/images/elysium-network.png‎

43.1 KB
Loading

‎shared/constants/network.test.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ describe('NetworkConstants', () => {
1414
);
1515
});
1616

17+
it('maps Kinetiq Elysium to its network logo', () => {
18+
expect(CHAIN_ID_TO_NETWORK_IMAGE_URL_MAP['0x1863d']).toBe(
19+
'./images/elysium-network.png',
20+
);
21+
});
22+
1723
it('returns network name for chain ids', () => {
1824
expect(NETWORK_TO_NAME_MAP[CHAIN_IDS.ARBITRUM]).toBe('Arbitrum');
1925
expect(NETWORK_TO_NAME_MAP[CHAIN_IDS.AVALANCHE]).toBe('Avalanche');

‎shared/constants/network.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,7 @@ export const ROBINHOOD_CHAIN_IMAGE_URL = './images/robinhood.svg';
646646
export const ROOTSTOCK_NATIVE_TOKEN_IMAGE_URL = './images/rootstock-native.svg';
647647
export const ZERO_G_IMAGE_URL = './images/0g.svg';
648648
export const ZERO_G_NATIVE_TOKEN_IMAGE_URL = './images/0g-native.svg';
649+
export const ELYSIUM_NETWORK_IMAGE_URL = './images/elysium-network.png';
649650
export const TEMPO_TESTNET_IMAGE_URL = './images/tempo.svg';
650651
export const TEMPO_MAINNET_IMAGE_URL = './images/tempo.svg';
651652
export const CHILIZ_IMAGE_URL = './images/chiliz.svg';
@@ -1223,6 +1224,8 @@ export const CHAIN_ID_TO_NETWORK_IMAGE_URL_MAP: Record<string, string> = {
12231224
[CHAIN_IDS.SOMNIA]: SOMNIA_IMAGE_URL,
12241225
[CHAIN_IDS.ROBINHOOD_CHAIN]: ROBINHOOD_CHAIN_IMAGE_URL,
12251226
[CHAIN_IDS.ZERO_G]: ZERO_G_IMAGE_URL,
1227+
// Kinetiq Elysium (chain 99901). Not in CHAIN_IDS, since that list is used for validation.
1228+
'0x1863d': ELYSIUM_NETWORK_IMAGE_URL,
12261229
} as const;
12271230

12281231
export const CHAIN_ID_TO_ETHERS_NETWORK_NAME_MAP = {

0 commit comments

Comments
 (0)