starknet-react icon indicating copy to clipboard operation
starknet-react copied to clipboard

`disconnect` function from `useConnectors` only disconnect in the current "session" but not after a refresh

Open YohanTz opened this issue 3 years ago • 5 comments

YohanTz avatar Sep 22 '22 19:09 YohanTz

I believe this is related to #170, need to track the user preferences on top of wallet availability.

fracek avatar Sep 27 '22 19:09 fracek

Yes totally, I can give some help if needed, as mentioned in #170 🙂 @fracek

YohanTz avatar Sep 30 '22 00:09 YohanTz

Of course! I would wait for #171 to be merged (eta today) before start coding. Can you share a bit how you plan to add it? IIRC wagmi does something similar and they just use local storage.

fracek avatar Sep 30 '22 08:09 fracek

Ok, great ! I planned to simply store the last connected wallet id in the local storage and nothing if the wallet has been disconnected. This way, we can check on page load to which wallet we should try to connect

YohanTz avatar Sep 30 '22 16:09 YohanTz

Hey @fracek ! I just started to work on this issue, I just have a question about it, do we want this behaviour to be under the autoConnect option or under a new option that we can add ?

YohanTz avatar Oct 17 '22 13:10 YohanTz

Fixed in #186.

fracek avatar Oct 18 '22 19:10 fracek

Hey @fracek ! I just started to work on this issue, I just have a question about it, do we want this behaviour to be under the autoConnect option or under a new option that we can add ?

They way you implemented it is great!

fracek avatar Oct 18 '22 19:10 fracek