[bug] Disconnecting wallet from wagmi hook doesn't trigger SIWE on reconnect
Link to minimal reproducible example
https://codesandbox.io/p/devbox/vite-react-forked-5hydhc
Summary
Hello everyone,
I’m encountering a bug since migrating to the latest version of @reown/appkit. When I disconnect my wallet from the AppKit interface, everything works fine, and the SIWE authentication is properly triggered. However, if I disconnect the wallet using the wagmi hook useDisconnect, as indicated in the documentation, the SIWE trigger does not occur when I try to reconnect.
I created a CodeSandbox to reproduce the bug in question.
Thanks for your help.
List of related npm package versions
"@reown/appkit": "^1.0.6", "@reown/appkit-adapter-wagmi": "^1.0.6", "@reown/appkit-siwe": "1.0.6", "siwe": "2.3.2", "viem": "^2.21.15", "wagmi": "^2.12.14"
@chaffy999
encountered the same issue, the workaround I found was using the wagmiAdapters connectionControllerClient.disconnect() directly which will trigger it
https://github.com/reown-com/appkit/pull/3121/files @chaffy999 @2facedsquid
this is the first disconnect improvement we're pushing in the next release. We'll make sure your issue is fixed, too as part of this or shortly thereafter. thank you!
the fix was released in in v.1.1.7 - customers reported the fix works - closing