You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I checked there isn't already an issue for the bug I encountered.
Describe the bug
When calling disconnect, wagmi would normally store a session cookie like wagmi.io.metamask.disconnected so the page stays disconnected after a refresh.
However, this cookie should be cleared/removed if the user connects again. This removal of the "disconnected" cookie currently only works when the the "connect" call is made on the root / and first level pages (e.g. /foo) but NOT on pages that are deeper (e.g. /bar/qux or /a/b/c).
Check existing issues
Describe the bug
When calling
disconnect
, wagmi would normally store a session cookie likewagmi.io.metamask.disconnected
so the page stays disconnected after a refresh.However, this cookie should be cleared/removed if the user connects again. This removal of the "disconnected" cookie currently only works when the the "connect" call is made on the root
/
and first level pages (e.g./foo
) but NOT on pages that are deeper (e.g./bar/qux
or/a/b/c
).Link to Minimal Reproducible Example
https://wagmi-bug.vercel.app/
Steps To Reproduce
(Code is available at https://github.com/dengpeng/wagmi-bug)
Correct behavior:
wagmi.io.metamask.disconnected
is set.wagmi.io.metamask.disconnected
is removed. ✅Incorrect behavior:
wagmi.io.metamask.disconnected
is set.wagmi.io.metamask.disconnected
is NOT removed. ❌What Wagmi package(s) are you using?
wagmi, @wagmi/core
Wagmi Version
@wagmi/[email protected], [email protected]
Viem Version
2.16.3
TypeScript Version
5
Anything else?
No response
The text was updated successfully, but these errors were encountered: