Skip to content

Commit b67f9bd

Browse files
authored
fix: fix wallet_revokeSession on disconnect using default transport (#41)
* Fix default transport wallet_revokeSession * changelog
1 parent 1b66cab commit b67f9bd

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/connect-multichain/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818
- Fix requests not being sent to the mobile wallet with proper wrapping metadata ([#28](https://github.com/MetaMask/connect-monorepo/pull/28))
1919
- Fix connections made from within the MetaMask Mobile In-App Browser ([#21](https://github.com/MetaMask/connect-monorepo/pull/21))
2020
- 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))
21+
- Fix `wallet_revokeSession` not firing correctly when terminating a session using the default transport (In-App Browser / Extension) ([#41](https://github.com/MetaMask/connect-monorepo/pull/41))
2122

2223
## [0.1.0]
2324

packages/connect-multichain/src/multichain/transports/default/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ export class DefaultTransport implements ExtendedTransport {
262262
async disconnect(): Promise<void> {
263263
this.#notificationCallbacks.clear();
264264

265-
await this.request({ method: 'wallet_revokeSession' });
265+
await this.request({ method: 'wallet_revokeSession', params: {} });
266266

267267
// Remove the message listener when disconnecting
268268
if (this.#handleResponseListener) {

0 commit comments

Comments
 (0)