[pull] main from MetaMask:main#174
Merged
Merged
Conversation
) Recently we added some new behavior to NetworkController which will detect if an Infura RPC endpoint is down and allow for forwarding traffic to Quicknode automatically. Because this behavior involves integrating with backend services to enable Quicknode on failure, we are unsure whether everything will work the way we want to on the first try, so we want to be able to disable or enable the behavior using feature flags. That is, when turned off, even if an RPC endpoint has been configured with failover URLs, network traffic will not be forwarded to the failovers if the primary is perceived to be down. There are a couple of things to note about this commit: - Usually we would have NetworkController listen to RemoteFeatureFlagController to know when a feature flag was enabled or disabled and then enable or disable the RPC failover behavior accordingly. Because we don't intend to keep the feature flag forever, however, we let the clients do that and we simply expose methods in NetworkController that can be used manually by the clients. - The way that the enabling/disabling works is a bit tricky. Naively, we could create new versions of network client objects that have different sets of RpcService objects, and replace the existing versions directly in the network client registry (without updating their IDs). That's a little weird, though, and it also means that if another controller caches a network client at any point in time, the cached version would not be updated. So instead, we take advantage of the fact that when other controllers interact with a network client, it's really a proxy — an AutoManagedNetworkClient — and so we can replace the underlying object (a NetworkClient) without changing the proxy.
…ction (#5714) ## Explanation Combinining `setAccountName` + `setSelectedAccount` to avoid having 2 update blocks. ## References N/A ## Changelog N/A ## Checklist - [ ] I've updated the test suite for new or updated code as appropriate - [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [ ] I've communicated my changes to consumers by [updating changelogs for packages I've changed](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs), highlighting breaking changes as necessary - [ ] I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes
Minor release of `@metamask/transaction-controller`.
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.1)
Can you help keep this open source service alive? 💖 Please sponsor : )