Skip to content

Commit

Permalink
feat: add unichain logo (#30361)
Browse files Browse the repository at this point in the history
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

- Add Unichain ID: 130
- Add Network logo for Unichain and Unichain Sepolia
- Use ETH Token Logo for Unichain and Unichain Sepolia

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

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

## **Related issues**

Fixes:N/A

## **Manual testing steps**

1. Go to app.uniswap.org
2. Connect w/ Metamask
3. Open In-App Wallet Settings in the right hand menu
4. Enable Unichain Beta
5. Attempt to Swap on Unichain Mainnet
6. Add Unichain to Metamask Networks

## **Screenshots/Recordings**

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

### **Before**

<img width="400" alt="Screenshot 2025-02-10 at 14 00 31"
src="https://github.com/user-attachments/assets/de3b61d3-96d9-4583-87c3-71c8c18fb484"
/>



### **After**

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

<img width="398" alt="Screenshot 2025-02-10 at 14 03 57"
src="https://github.com/user-attachments/assets/80647d44-a495-45fe-b667-5223c323cec9"
/>



## **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/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
- [x] 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.
  • Loading branch information
salimtb authored Feb 17, 2025
1 parent 739fac8 commit 422201c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
10 changes: 10 additions & 0 deletions app/images/unichain.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions shared/constants/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ export const CHAIN_IDS = {
CELO_TESTNET: '0xaef3',
ZK_SYNC_ERA_TESTNET: '0x12c',
MANTA_SEPOLIA: '0x138b',
UNICHAIN: '0x82',
UNICHAIN_SEPOLIA: '0x515',
LINEA_MAINNET: '0xe708',
AURORA: '0x4e454152',
Expand Down Expand Up @@ -519,6 +520,7 @@ export const SONIC_MAINNET_IMAGE_URL = './images/sonic.svg';
export const SONEIUM_IMAGE_URL = './images/soneium.svg';
export const MODE_SEPOLIA_IMAGE_URL = './images/mode-sepolia.svg';
export const MODE_IMAGE_URL = './images/mode.svg';
export const UNICHAIN_IMAGE_URL = './images/unichain.svg';

export const INFURA_PROVIDER_TYPES = [
NETWORK_TYPES.MAINNET,
Expand Down Expand Up @@ -883,6 +885,8 @@ export const CHAIN_ID_TO_NETWORK_IMAGE_URL_MAP = {
[CHAINLIST_CHAIN_IDS_MAP.SONEIUM_TESTNET]: SONEIUM_IMAGE_URL,
[CHAINLIST_CHAIN_IDS_MAP.MODE_SEPOLIA]: MODE_SEPOLIA_IMAGE_URL,
[CHAINLIST_CHAIN_IDS_MAP.MODE]: MODE_IMAGE_URL,
[CHAINLIST_CHAIN_IDS_MAP.UNICHAIN]: UNICHAIN_IMAGE_URL,
[CHAINLIST_CHAIN_IDS_MAP.UNICHAIN_SEPOLIA]: UNICHAIN_IMAGE_URL,
} as const;

export const CHAIN_ID_TO_ETHERS_NETWORK_NAME_MAP = {
Expand Down Expand Up @@ -928,6 +932,8 @@ export const CHAIN_ID_TOKEN_IMAGE_MAP = {
[CHAINLIST_CHAIN_IDS_MAP.SONIC_MAINNET]: SONIC_MAINNET_IMAGE_URL,
[CHAIN_IDS.MODE]: ETH_TOKEN_IMAGE_URL,
[CHAINLIST_CHAIN_IDS_MAP.FUNKICHAIN]: ETH_TOKEN_IMAGE_URL,
[CHAINLIST_CHAIN_IDS_MAP.UNICHAIN]: ETH_TOKEN_IMAGE_URL,
[CHAINLIST_CHAIN_IDS_MAP.UNICHAIN_SEPOLIA]: ETH_TOKEN_IMAGE_URL,
} as const;

export const INFURA_BLOCKED_KEY = 'countryBlocked';
Expand Down

0 comments on commit 422201c

Please sign in to comment.