Skip to content

Commit

Permalink
fixing siwe auth (#15285)
Browse files Browse the repository at this point in the history
  • Loading branch information
julien51 authored Dec 22, 2024
1 parent 3b4668f commit 4305f29
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions unlock-app/src/hooks/useAuthenticate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ export function useAuthenticate() {
walletAddress,
})
await onSignedIn(walletAddress)
window.dispatchEvent(
new CustomEvent('locksmith.authenticated', {
detail: walletAddress,
})
)
} else {
console.error('Error logging in with SIWE:', response)
ToastHelper.error(
Expand Down
1 change: 1 addition & 0 deletions unlock-app/src/hooks/useSIWE.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ export const SIWEProvider = ({ children }: Props) => {
setSiweResult({ message, signature })
return { message, signature }
} catch (error) {
console.error(error)
onError(error)
return null
}
Expand Down

0 comments on commit 4305f29

Please sign in to comment.