MetaMask / MetaMask/metamask-mobile
Allow adding networks with chain_id 1 via addCustomNetwork API
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 1.7k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 669
Description
Today we disallow it (sorry if this is a duplicate)
So far we had disabled this because we were concerned about phishing potential, but we still allow adding a main-net network via settings, so this vector still existed.
I propose we add this method, and add our best copy to represent the risk. And any copy that would improve this case would probably be good for the generic addCustomNetwork case, so let's just review that copy @coreyjanssen . Should be something like:
- The network provider will be able to see and associate your accounts together.
- The network provider will be responsible for broadcasting your transactions, and their reliability.
- The network provider will be trusted to provide an accurate view of account balances and other on-chain state.
Mobile version of https://github.com/MetaMask/metamask-extension/issues/16712
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the mobile addCustomNetwork API and the existing Settings flow for main-net networks; the issue names no files or tests. Compare how chain_id 1 is handled in those paths, then confirm done by allowing it through the API with reviewed copy covering provider visibility, transaction broadcasting, reliability, and account-state accuracy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- api, mobile, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100