Skip to content

Commit 5d44962

Browse files
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 changes
1 parent ddc4a85 commit 5d44962

File tree

4 files changed

+324
-4
lines changed

4 files changed

+324
-4
lines changed

packages/network-enablement-controller/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Added
11+
12+
- Add Bitcoin network support with automatic enablement when configured in MultichainNetworkController ([#6455](https://github.com/MetaMask/core/pull/6455))
13+
- Add `BtcScope` enum for Bitcoin mainnet and testnet caip chain IDs ([#6455](https://github.com/MetaMask/core/pull/6455))
14+
- Add Bitcoin network enablement logic to `init()` and `enableAllPopularNetworks()` methods ([#6455](https://github.com/MetaMask/core/pull/6455))
15+
1016
### Changed
1117

1218
- Bump `@metamask/base-controller` from `^8.2.0` to `^8.3.0` ([#6465](https://github.com/MetaMask/core/pull/6465))

0 commit comments

Comments
 (0)