-
|
I have a custom connector to handle an embedded smart wallet. I'm trying to implement auto connection on page reload, by storing information to connector storage. Storage is configured as cookie, as instructed in the ssr manual. When I connect and reload the page I see the Am I missing something? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Problem solved. My connector implementation of I changed the implementation of |
Beta Was this translation helpful? Give feedback.
Problem solved.
My connector implementation of
getProviderwas returning a variable that was only lazily initialized in theconnectcall.When wagmi hydrates the initial state from the cookie it reads the
recentConnectorIdcookie, searches for that providers, and callgetProvider. If it returns undefined, which was my case, it skips it, and don't continue the reconnection procedure.I changed the implementation of
getProviderto check a storage item and also hydrate my provider from it. ThenisAuthorizedis called, followed byconnectwithisReconnecting = true