Skip to content

Commit 2b5fd98

Browse files
authored
feat: add Tempo chain as additionnal network (#29515)
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until this PR meets the canonical Definition of Ready For Review in `docs/readme/ready-for-review.md`. In short: the template must be materially complete (not just section titles present), all status checks must be currently passing, and the only expected follow-up commits must be reviewer-driven. --> ## **Description** <!-- 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? --> Chain ID: `4217` / `0x1079` Native symbol: None but setting as `USD`, consistently with what is done everywhere in the Tempo ecosystem. RPC: https://rpc.tempo.xyz Explorer: https://explore.tempo.xyz/ ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: add Tempo chain to the additional networks list ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/NEB-1098?atlOrigin=eyJpIjoiNTExNzIwM2EwYjc5NDdkMmFiMTkwY2VmMzhmODllNzAiLCJwIjoiaiJ9 ## **Manual testing steps** Use the [additional-networks-blacklist](https://app.launchdarkly.com/projects/metamask-client-config-api-extension/flags/additional-networks-blacklist) flag to test `Tempo Off` variation, which will make Tempo Network disappear as Additional Network by default. ```gherkin Feature: my feature name Scenario: user [verb for user action] Given [describe expected initial app state] When user [verb for user action] Then [describe expected outcome] ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <img width="300" alt="image" src="https://github.com/user-attachments/assets/682150e6-4ec3-48fb-9f38-6414204d678c" /> <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** <!-- Every checklist item must be consciously assessed before marking this PR as "Ready for review". A checked box means you deliberately considered that responsibility, not that you literally performed every action listed. Unchecked boxes are ambiguous: they are not an implicit "N/A" and they are not a silent "skip". See `docs/readme/ready-for-review.md` for the full checklist semantics. --> - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.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-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. #### Performance checks (if applicable) - [ ] I've tested on Android - Ideally on a mid-range device; emulator is acceptable - [ ] I've tested with a power user scenario - Use these [power-user SRPs](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/edit-v2/401401446401?draftShareId=9d77e1e1-4bdc-4be1-9ebb-ccd916988d93) to import wallets with many accounts and tokens - [ ] I've instrumented key operations with Sentry traces for production performance metrics - See [`trace()`](/app/util/trace.ts) for usage and [`addToken`](/app/components/Views/AddAsset/components/AddCustomToken/AddCustomToken.tsx#L274) for an example For performance guidelines and tooling, see the [Performance Guide](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/400085549067/Performance+Guide+for+Engineers). ## **Pre-merge reviewer checklist** <!-- Reviewer checklist items follow the same semantics as the author checklist: an unchecked box is ambiguous, a checked box means the reviewer consciously assessed that responsibility. See `docs/readme/ready-for-review.md`. --> - [ ] 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** > Small, additive change that only extends the static popular-network configuration and its test; main risk is misconfigured RPC/explorer metadata or missing image asset. > > **Overview** > Adds the `Tempo` network to `PopularList`, including chainId `0x1079` (4217), RPC endpoint, block explorer URL, ticker (`USD`), warning flag, and a bundled logo (`tempo.png`) so it appears in the additional network selection. > > Updates the popular network chainId unit test to assert the new `Tempo` entry is present and correctly encoded. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 0a83f05. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 37c8162 commit 2b5fd98

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

app/util/networks/customNetworks.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ describe('popularNetwork', () => {
2222
Monad: toHex('143'),
2323
HyperEVM: toHex('999'),
2424
MegaETH: toHex('4326'),
25+
Tempo: toHex('4217'),
2526
};
2627

2728
PopularList.forEach((rpc) => {

app/util/networks/customNetworks.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,19 @@ export const PopularList = [
190190
imageSource: require('../../images/megaeth-mainnet-logo.png'),
191191
},
192192
},
193+
{
194+
chainId: toHex('4217'),
195+
nickname: 'Tempo',
196+
rpcUrl: `https://rpc.tempo.xyz/`,
197+
failoverRpcUrls: [],
198+
ticker: 'USD',
199+
warning: true,
200+
rpcPrefs: {
201+
blockExplorerUrl: 'https://explore.tempo.xyz/',
202+
imageUrl: 'TEMPO',
203+
imageSource: require('../../images/tempo.png'),
204+
},
205+
},
193206
];
194207

195208
/**

0 commit comments

Comments
 (0)