From 9c625adba0fa1fd8f1db8566999124ce7aec6324 Mon Sep 17 00:00:00 2001 From: Ry Racherbaumer Date: Wed, 4 Dec 2024 12:11:02 -0600 Subject: [PATCH] Do not create DB on static canMessage (#744) * Do not create DB on static canMessage * Create hungry-dodos-own.md --- .changeset/hungry-dodos-own.md | 5 +++++ sdks/node-sdk/src/Client.ts | 6 +----- 2 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 .changeset/hungry-dodos-own.md diff --git a/.changeset/hungry-dodos-own.md b/.changeset/hungry-dodos-own.md new file mode 100644 index 000000000..357f7f26b --- /dev/null +++ b/.changeset/hungry-dodos-own.md @@ -0,0 +1,5 @@ +--- +"@xmtp/node-sdk": patch +--- + +Do not create DB on static canMessage diff --git a/sdks/node-sdk/src/Client.ts b/sdks/node-sdk/src/Client.ts index 674b4c150..b479bc9f2 100644 --- a/sdks/node-sdk/src/Client.ts +++ b/sdks/node-sdk/src/Client.ts @@ -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); @@ -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, [], );