fix: ensure address is registered immediately on first startup
This commit is contained in:
parent
2b78cfd523
commit
2e15c447dc
@ -21,6 +21,8 @@ export default function useInitialization() {
|
||||
await createSignClient()
|
||||
|
||||
await createChatClient()
|
||||
await chatClient.register({ account: `eip155:1:${eip155Addresses[0]}` })
|
||||
console.log('[Chat] registered address %s on keyserver', `eip155:1:${eip155Addresses[0]}`)
|
||||
|
||||
setInitialized(true)
|
||||
} catch (err: unknown) {
|
||||
|
@ -21,11 +21,8 @@ export default function ChatsPage() {
|
||||
|
||||
const [chatInvites, setChatInvites] = useState<any[]>([])
|
||||
|
||||
const { eip155Address } = useSnapshot(SettingsStore.state)
|
||||
|
||||
const initChatClient = async () => {
|
||||
console.log(chatClient)
|
||||
await chatClient.register({ account: `eip155:1:${eip155Address}` })
|
||||
|
||||
console.log('chatInvites on load:', chatClient.chatInvites.getAll())
|
||||
console.log('chatThreads on load:', chatClient.chatThreads.getAll())
|
||||
|
Loading…
Reference in New Issue
Block a user