Skip to content

Commit

Permalink
Don't unsubscribe too early
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronvoell committed Dec 21, 2023
1 parent c2909ed commit 84e5796
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ export class Client<ContentTypes> {
)

XMTPModule.emitter.addListener('authed', async () => {
this.removeSubscription(enableSubscription)
this.removeSubscription(createSubscription)
const address = await signer.getAddress()
resolve(new Client(address, opts?.codecs || []))
})
Expand All @@ -89,8 +91,6 @@ export class Client<ContentTypes> {
Boolean(enableSubscription)
)
})()
this.removeSubscription(enableSubscription)
this.removeSubscription(createSubscription)
})
}

Expand Down

0 comments on commit 84e5796

Please sign in to comment.