Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

Commit

Permalink
fix: fix shim key (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm authored Feb 19, 2023
1 parent bb1b88c commit fcb5595
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/quick-cobras-confess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@wagmi/connectors': patch
---

Fixed shim disconnect key to read from defined Connector ID.
3 changes: 1 addition & 2 deletions packages/connectors/src/injected.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class InjectedConnector extends Connector<
ConnectorOptions,
providers.JsonRpcSigner
> {
readonly id: string
readonly id: string = 'injected'
readonly name: string
readonly ready: boolean

Expand Down Expand Up @@ -86,7 +86,6 @@ export class InjectedConnector extends Connector<
}
} else this.name = 'Injected'

this.id = 'injected'
this.ready = !!provider
}

Expand Down
2 changes: 2 additions & 0 deletions packages/connectors/src/metaMask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ export type MetaMaskConnectorOptions = Pick<
export class MetaMaskConnector extends InjectedConnector {
readonly id = 'metaMask'

protected shimDisconnectKey = `${this.id}.shimDisconnect`

#UNSTABLE_shimOnConnectSelectAccount: MetaMaskConnectorOptions['UNSTABLE_shimOnConnectSelectAccount']

constructor({
Expand Down

0 comments on commit fcb5595

Please sign in to comment.