5afe / safe-core-sdk-demo

Account Abstraction with Safe{Core} SDK
https://safe-account-abstraction-demo.netlify.app/
GNU General Public License v3.0
35 stars 24 forks source link

fix: refresh gelato taskId on logout #21

Closed DaniSomoza closed 1 year ago

DaniSomoza commented 1 year ago

What it solves

Resolves #23

How this PR fixes it

refresh gelato taskId data on logout.

  const logoutWeb3Auth = () => {
    authClient?.signOut()
    setOwnerAddress('')
    setSafes([])
    setChainId(chain.id)
    setWeb3Provider(undefined)
    setSafeSelected('')
    setAuthClient(undefined)
    setGelatoTaskId(undefined) // refresh gelato taskId data
  }