Skip to content

Commit

Permalink
fix up client creation
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Nov 1, 2024
1 parent 4431d29 commit 8447c73
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ export class Client<

await XMTPModule.receiveSignature(request.id, signature)
} catch (e) {
this.removeAllSubscriptions()
const errorMessage = 'ERROR in create. User rejected signature'
console.info(errorMessage, e)
reject(errorMessage)
Expand All @@ -296,6 +297,7 @@ export class Client<
installationId: string
dbPath: string
}) => {
this.removeAllSubscriptions()
resolve(
new Client(
message.address,
Expand All @@ -318,6 +320,7 @@ export class Client<
options.historySyncUrl
)
})().catch((error) => {
this.removeAllSubscriptions()
console.error('ERROR in create: ', error)
})
})
Expand Down

0 comments on commit 8447c73

Please sign in to comment.