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

bug: shimDisconnectKey is always undefined.shimDisconnect #112

Closed
1 task done
Kethatril opened this issue Feb 16, 2023 · 0 comments · Fixed by #113
Closed
1 task done

bug: shimDisconnectKey is always undefined.shimDisconnect #112

Kethatril opened this issue Feb 16, 2023 · 0 comments · Fixed by #113
Assignees

Comments

@Kethatril
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

shimDisconnectKey in injected is always undefined.shimDisconnect even in connectors that extend InjectedConnector. This is because shimDisconnectKey is initialized before the id from the child class is available.

This causes issues when there are multiple connectors used that extend InjectedConnector (or are) but have different shimDisconnect values e.g. using both MetaMaskConnector with shimDisconnect:true and InjectedConnector shimDisconnect:false at the same time. In this case autoConnect will still reconnect to metamask even after disconnecting effectively ignoring the shimDisconnect value.

Expected Behavior

The shimDisconnectKey should be unique to the connector.

Steps To Reproduce

Use both MetaMaskConnector and InjectedConnector in the same Wagmi Client with different shimDisconnect values

Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)

No response

Anything else?

No response

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants