MetaMask / MetaMask/metamask-extension

Establish and use `getGlobalChainId()` function

Open
#25,223 0 comments 0 reactions 0 assignees View on GitHub
INVALID-ISSUE-TEMPLATE type-refactor
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

We should create a `getGlobalChainId()` function to use instead of `networkController.state.providerConfig.chainId` in the background.

Contributor guide

Open the contributing guide

Research direction

Search the background code for uses of `networkController.state.providerConfig.chainId` and trace how the chain ID is currently obtained. Define the scope of the replacement from those call sites; done means the relevant background usages use `getGlobalChainId()` consistently and existing checks still pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.