Placeholder avatar is incosistent across components #39

Merged
s merged 9 commits from issue-27 into main 2024-05-16 08:58:11 +00:00
Showing only changes of commit 38913e770d - Show all commits

View File

@ -40,6 +40,20 @@ export class AuthController {
console.error('Error occurred while finding metadata', err)
})
// Nostr uses unix timestamps
const timestamp = Math.floor(Date.now() / 1000)
const { hostname } = window.location
const authEvent: EventTemplate = {
kind: 1,
tags: [],
content: `${hostname}-${timestamp}`,
created_at: timestamp
}
const signedAuthEvent = await this.nostrController.signEvent(authEvent)
this.createAndSaveAuthToken(signedAuthEvent)
store.dispatch(
setAuthState({
loggedIn: true,