fix: ensure address is registered immediately on first startup

This commit is contained in:
Ben Kremer 2022-10-28 13:42:18 +02:00
parent 2b78cfd523
commit 2e15c447dc
2 changed files with 2 additions and 3 deletions

View File

@ -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) {

View File

@ -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())