Skip to content

Commit

Permalink
feat: add ape token mainnet (#27974)
Browse files Browse the repository at this point in the history
## **Description**

PR to add Ape token icon and display ape icon for mainnet

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

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->
<img width="1726" alt="Screenshot 2024-10-19 at 23 01 54"
src="https://github.com/user-attachments/assets/57e66bce-db21-40d7-92de-00baaeb17187">

### **After**

<!-- [screenshots/recordings] -->


https://github.com/user-attachments/assets/f8da7264-709b-4da2-85bd-b9dae6b1d724


## **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/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] 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/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
sahar-fehri committed Oct 22, 2024
1 parent 30d7f1c commit 20513b8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/images/ape-token.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 9 additions & 2 deletions shared/constants/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ export const CHAIN_IDS = {
NUMBERS: '0x290b',
SEI: '0x531',
APE_TESTNET: '0x8157',
APE_MAINNET: '0x8173',
BERACHAIN: '0x138d5',
METACHAIN_ONE: '0x1b6e6',
ARBITRUM_SEPOLIA: '0x66eee',
Expand Down Expand Up @@ -207,6 +208,7 @@ export const CHAINLIST_CHAIN_IDS_MAP = {
ZORA_MAINNET: '0x76adf1',
FILECOIN: '0x13a',
NUMBERS: '0x290b',
APE: '0x8173',
} as const;

// To add a deprecation warning to a network, add it to the array
Expand Down Expand Up @@ -371,6 +373,7 @@ const CHAINLIST_CURRENCY_SYMBOLS_MAP = {
HUOBI_ECO_CHAIN_MAINNET: 'HT',
ACALA_NETWORK: 'ACA',
IOTEX_MAINNET: 'IOTX',
APE: 'APE',
} as const;

export const CHAINLIST_CURRENCY_SYMBOLS_MAP_NETWORK_COLLISION = {
Expand Down Expand Up @@ -416,6 +419,7 @@ export const FUSE_GOLD_MAINNET_IMAGE_URL = './images/fuse-mainnet.jpg';
export const HAQQ_NETWORK_IMAGE_URL = './images/haqq.svg';
export const IOTEX_MAINNET_IMAGE_URL = './images/iotex.svg';
export const IOTEX_TOKEN_IMAGE_URL = './images/iotex-token.svg';
export const APE_TOKEN_IMAGE_URL = './images/ape-token.svg';
export const KCC_MAINNET_IMAGE_URL = './images/kcc-mainnet.svg';
export const KLAYTN_MAINNET_IMAGE_URL = './images/klaytn.svg';
export const KROMA_MAINNET_IMAGE_URL = './images/kroma.svg';
Expand Down Expand Up @@ -449,7 +453,7 @@ 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 APE_TESTNET_IMAGE_URL = './images/ape.svg';
export const APE_IMAGE_URL = './images/ape.svg';

export const INFURA_PROVIDER_TYPES = [
NETWORK_TYPES.MAINNET,
Expand Down Expand Up @@ -564,6 +568,7 @@ export const NETWORK_TO_NAME_MAP = {

export const CHAIN_ID_TO_CURRENCY_SYMBOL_MAP = {
[CHAINLIST_CHAIN_IDS_MAP.AVALANCHE]: CHAINLIST_CURRENCY_SYMBOLS_MAP.AVALANCHE,
[CHAINLIST_CHAIN_IDS_MAP.APE]: CHAINLIST_CURRENCY_SYMBOLS_MAP.APE,
[CHAINLIST_CHAIN_IDS_MAP.BSC]: CHAINLIST_CURRENCY_SYMBOLS_MAP.BNB,
[CHAINLIST_CHAIN_IDS_MAP.BASE]: CHAINLIST_CURRENCY_SYMBOLS_MAP.BASE,
[CHAINLIST_CHAIN_IDS_MAP.ARBITRUM]: CHAINLIST_CURRENCY_SYMBOLS_MAP.ARBITRUM,
Expand Down Expand Up @@ -782,7 +787,8 @@ export const CHAIN_ID_TO_NETWORK_IMAGE_URL_MAP = {
[CHAINLIST_CHAIN_IDS_MAP.ZKATANA]: ZKATANA_MAINNET_IMAGE_URL,
[CHAINLIST_CHAIN_IDS_MAP.ZORA_MAINNET]: ZORA_MAINNET_IMAGE_URL,
[CHAINLIST_CHAIN_IDS_MAP.FILECOIN]: FILECOIN_MAINNET_IMAGE_URL,
[CHAINLIST_CHAIN_IDS_MAP.APE_TESTNET]: APE_TESTNET_IMAGE_URL,
[CHAINLIST_CHAIN_IDS_MAP.APE_TESTNET]: APE_IMAGE_URL,
[CHAINLIST_CHAIN_IDS_MAP.APE_MAINNET]: APE_IMAGE_URL,
[CHAINLIST_CHAIN_IDS_MAP.BASE]: BASE_TOKEN_IMAGE_URL,
[CHAINLIST_CHAIN_IDS_MAP.NUMBERS]: NUMBERS_MAINNET_IMAGE_URL,
[CHAINLIST_CHAIN_IDS_MAP.SEI]: SEI_IMAGE_URL,
Expand Down Expand Up @@ -817,6 +823,7 @@ export const CHAIN_ID_TOKEN_IMAGE_MAP = {
[CHAIN_IDS.MOONRIVER]: MOONRIVER_TOKEN_IMAGE_URL,
[CHAIN_IDS.MOONBEAM]: MOONBEAM_TOKEN_IMAGE_URL,
[CHAINLIST_CHAIN_IDS_MAP.IOTEX_MAINNET]: IOTEX_TOKEN_IMAGE_URL,
[CHAINLIST_CHAIN_IDS_MAP.APE_MAINNET]: APE_TOKEN_IMAGE_URL,
} as const;

export const INFURA_BLOCKED_KEY = 'countryBlocked';
Expand Down

0 comments on commit 20513b8

Please sign in to comment.