Commit 5d44962
authored
fix(network-enablement-controller): enable Bitcoin networks if enabled in MultichainNetworkController (#6455)
## Explanation
Bitcoin networks are not enabled by default in the Network Enablement
Controller, causing the `enabledNetworks` object to show Bitcoin as an
empty namespace (`"bip122": {}`) instead of showing Bitcoin mainnet as
enabled. This is inconsistent with how Solana networks are handled. This
discrepancy is cashing a crash in Flask builds
This change makes Bitcoin networks follow the same enablement pattern as
Solana networks:
1. Default state: Bitcoin mainnet is now enabled by default in Flask
builds alongside Ethereum and Solana
2. Initialization: The `init()` method enables Bitcoin mainnet if it
exists in MultichainNetworkController configurations
3. Popular networks: The enableAllPopularNetworks() method now includes
Bitcoin mainnet enablement
## References
Fixes [#12345](MetaMask/metamask-mobile#19201)
## Checklist
- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] 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
- [x] I've prepared draft pull requests for clients and consumer
packages to resolve any breaking changes1 parent ddc4a85 commit 5d44962
File tree
4 files changed
+324
-4
lines changed- packages/network-enablement-controller
- src
4 files changed
+324
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
10 | 16 | | |
11 | 17 | | |
12 | 18 | | |
| |||
0 commit comments