MetaMask / MetaMask/core

[network-controller] Allow switching active chain without waiting for lookup

Open
#4,930 0 comments 0 reactions 0 assignees View on GitHub
enhancement team-core-platform team-wallet-framework wf-network-controller-improvements
Dominant language
TypeScript
Stars
413
Forks
308
Avg merge
1d 4h
Merged PRs (30d)
253

Description

When `setActiveChain` is called, the function does not resolve until the network lookup has completed. In some cases we just want tomorrow know when the NetworkController state was updated, and waiting for lookup is not desired.

We should allow the caller to not wait on lookup when switching the active chain (maybe by splitting this into two methods, or adding an option to control whether we wait).

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the NetworkController setActiveChain entry point and trace where the network lookup completes relative to the state update. Determine how callers can observe the state update without waiting for lookup while preserving the existing behavior, then add coverage for both waiting modes.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend-api-design
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 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.