Skip to content

Commit

Permalink
chore: Add Near Icon (#26459)
Browse files Browse the repository at this point in the history
## **Description**

Adds NEAR Icon for ChainId `397` and `398`. These chains are currently
new networks being integrated onto EVM. They are currently in
development, but it was requested from their team to preemptively add
these icons, before production RPC endpoints are available.

For context, here is their proposal:
near/NEPs#518

https://chainlist.org/chain/397
https://chainlist.org/chain/398

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/26459?quickstart=1)

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/MMASSETS-343

## **Manual testing steps**

Once production RPCs are available, these icons should appear when NEAR
RPC gets added in custom networks.

## **Screenshots/Recordings**

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.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
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.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.
  • Loading branch information
gambinish authored Aug 16, 2024
1 parent 0562f18 commit 3c066c5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/images/near.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions shared/constants/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ export const CHAIN_IDS = {
SEI: '0x531',
BERACHAIN: '0x138d5',
METACHAIN_ONE: '0x1b6e6',
NEAR: '0x18d',
NEAR_TESTNET: '0x18e',
} as const;

export const CHAINLIST_CHAIN_IDS_MAP = {
Expand Down Expand Up @@ -433,6 +435,7 @@ export const SCROLL_IMAGE_URL = './images/scroll.svg';
export const NUMBERS_MAINNET_IMAGE_URL = './images/numbers-mainnet.svg';
export const NUMBERS_TOKEN_IMAGE_URL = './images/numbers-token.png';
export const SEI_IMAGE_URL = './images/sei.svg';
export const NEAR_IMAGE_URL = './images/near.svg';

export const INFURA_PROVIDER_TYPES = [
NETWORK_TYPES.MAINNET,
Expand Down Expand Up @@ -709,6 +712,8 @@ export const CHAIN_ID_TO_NETWORK_IMAGE_URL_MAP = {
[CHAIN_IDS.PALM]: PALM_TOKEN_IMAGE_URL,
[CHAIN_IDS.CELO]: CELO_TOKEN_IMAGE_URL,
[CHAIN_IDS.GNOSIS]: GNOSIS_TOKEN_IMAGE_URL,
[CHAIN_IDS.NEAR]: NEAR_IMAGE_URL,
[CHAIN_IDS.NEAR_TESTNET]: NEAR_IMAGE_URL,
[CHAINLIST_CHAIN_IDS_MAP.ACALA_NETWORK]: ACALA_TOKEN_IMAGE_URL,
[CHAINLIST_CHAIN_IDS_MAP.ARBITRUM_NOVA]: ARBITRUM_NOVA_IMAGE_URL,
[CHAINLIST_CHAIN_IDS_MAP.ASTAR]: ASTAR_IMAGE_URL,
Expand Down Expand Up @@ -786,6 +791,8 @@ export const CHAIN_ID_TOKEN_IMAGE_MAP = {
[CHAIN_IDS.SCROLL_SEPOLIA]: SCROLL_IMAGE_URL,
[CHAIN_IDS.NUMBERS]: NUMBERS_TOKEN_IMAGE_URL,
[CHAIN_IDS.SEI]: SEI_IMAGE_URL,
[CHAIN_IDS.NEAR]: NEAR_IMAGE_URL,
[CHAIN_IDS.NEAR_TESTNET]: NEAR_IMAGE_URL,
} as const;

export const INFURA_BLOCKED_KEY = 'countryBlocked';
Expand Down

0 comments on commit 3c066c5

Please sign in to comment.