Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue where per dapp selected network state is enabled without the request queue experimental toggle enabled #21946

Merged
merged 4 commits into from
Nov 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions app/scripts/metamask-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -512,11 +512,6 @@ export default class MetamaskController extends EventEmitter {
}),
});

// turn on perDappSelectedNetwork feature flag
this.selectedNetworkController.update((state) => {
state.perDomainNetwork = true;
});

this.tokenListController = new TokenListController({
chainId: this.networkController.state.providerConfig.chainId,
preventPollingOnNetworkRestart: initState.TokenListController
Expand Down Expand Up @@ -2590,9 +2585,7 @@ export default class MetamaskController extends EventEmitter {
preferencesController,
),
///: END:ONLY_INCLUDE_IN
setUseRequestQueue: preferencesController.setUseRequestQueue.bind(
preferencesController,
),
setUseRequestQueue: this.setUseRequestQueue.bind(this),
setIpfsGateway: preferencesController.setIpfsGateway.bind(
preferencesController,
),
Expand Down Expand Up @@ -4065,6 +4058,17 @@ export default class MetamaskController extends EventEmitter {
this.sendUpdate();
}

//=============================================================================
// REQUEST QUEUE
//=============================================================================

setUseRequestQueue(value) {
this.preferencesController.setUseRequestQueue(value);
this.selectedNetworkController.update((state) => {
state.perDomainNetwork = value;
});
}

//=============================================================================
// SETUP
//=============================================================================
Expand Down
Loading