Skip to content

Commit

Permalink
update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
jiexi committed Feb 3, 2025
1 parent 056dc85 commit c3b07f8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [20.0.0]

### Uncategorized
### Changed

- feat: allow `networkVersion` to be set to `null`. fire connection events based on new `isConnected` property value ([#404](https://github.com/MetaMask/providers/pull/404))
- **BREAKING**: `isConnected` that is now expected in the result of `metamask_getProviderState` and `metamask_chainChanged` events ([#404](https://github.com/MetaMask/providers/pull/404))
- **BREAKING**: Interprets the provider's `networkVersion` value of `loading` to be null and for the `networkChanged` event to emit a null value ([#404](https://github.com/MetaMask/providers/pull/404))
- **BREAKING**: Replaces the disconnect event/behavior when receiving the `loading` value for `networkVersion` with a check against `isConnected` instead ([#404](https://github.com/MetaMask/providers/pull/404))

## [19.0.0]

Expand Down
2 changes: 1 addition & 1 deletion src/BaseProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ export abstract class BaseProvider extends SafeEventEmitter {
| {
chainId?: string;
networkVersion?: string | undefined;
isConnected?: boolean | undefined;
isConnected?: boolean;
}
| undefined = {}) {
if (!isValidChainId(chainId)) {
Expand Down
4 changes: 2 additions & 2 deletions src/StreamProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ export abstract class AbstractStreamProvider extends BaseProvider {
networkVersion,
isConnected,
}: {
chainId?: string | undefined;
chainId?: string;
networkVersion?: string | undefined;
isConnected?: boolean | undefined;
isConnected?: boolean;
} = {}) {
if (!isValidChainId(chainId) || !isValidNetworkVersion(networkVersion)) {
this._log.error(messages.errors.invalidNetworkParams(), {
Expand Down

0 comments on commit c3b07f8

Please sign in to comment.