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

fix: fix shim key #113

Merged
merged 1 commit into from
Feb 19, 2023
Merged
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
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