Skip to content
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions packages/connect-multichain/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Fix connections made from within the MetaMask Mobile In-App Browser ([#21](https://github.com/MetaMask/connect-monorepo/pull/21))
- Bump `@metamask/multichain-api-client` to prevent JSON RPC request ID conflicts across disconnect/reconnect cycles ([#38](https://github.com/MetaMask/connect-monorepo/pull/38))
- Lowercase cached account address values from `metamask_accountsChanged` to align with `eth_accounts` ([#40](https://github.com/MetaMask/connect-monorepo/pull/40))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesn't really matter unless you're using the connect-evm package though

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we specify that this only applies to legacy connector package then ?


## [0.1.0]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,14 @@ export class MWPTransport implements ExtendedTransport {
(message.data as { method: string }).method ===
'metamask_accountsChanged'
) {
// Account addressed are being lowercased here to align with the eth_accounts returned casing
// and with how they are returned/emitted in the injected EIP-1193 provider.
const messageData = message.data as { params: string[] };
messageData.params = messageData.params.map(account => account.toLowerCase());
this.kvstore.set(
ACCOUNTS_STORE_KEY,
JSON.stringify(
(message.data as { params: { accounts: string[] } }).params,
messageData.params,
),
);
}
Expand Down
Loading