Skip to content

Commit

Permalink
Do not create DB on static canMessage (#744)
Browse files Browse the repository at this point in the history
* Do not create DB on static canMessage

* Create hungry-dodos-own.md
  • Loading branch information
rygine authored Dec 4, 2024
1 parent 299d24d commit 9c625ad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/hungry-dodos-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@xmtp/node-sdk": patch
---

Do not create DB on static canMessage
6 changes: 1 addition & 5 deletions sdks/node-sdk/src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,10 +313,6 @@ export class Client {
const accountAddress = "0x0000000000000000000000000000000000000000";
const host = ApiUrls[env ?? "dev"];
const isSecure = host.startsWith("https");
const dbPath = join(
process.cwd(),
`xmtp-${env ?? "dev"}-${accountAddress}.db3`,
);
const inboxId =
(await getInboxIdForAddress(host, isSecure, accountAddress)) ||
generateInboxId(accountAddress);
Expand All @@ -325,7 +321,7 @@ export class Client {
signMessage: () => new Uint8Array(),
};
const client = new Client(
await createClient(host, isSecure, dbPath, inboxId, accountAddress),
await createClient(host, isSecure, undefined, inboxId, accountAddress),
signer,
[],
);
Expand Down

0 comments on commit 9c625ad

Please sign in to comment.