diff --git a/scripts/agent/smoke-test.mjs b/scripts/agent/smoke-test.mjs index 35024f07..51628835 100644 --- a/scripts/agent/smoke-test.mjs +++ b/scripts/agent/smoke-test.mjs @@ -8,7 +8,6 @@ import { buildLegacyDirectMessageEvent } from '../../js/nostrEventSchemas.js'; import { generateSecretKey, getPublicKey } from 'nostr-tools'; -import { bytesToHex } from '../../vendor/crypto-helpers.bundle.min.js'; import { chromium } from 'playwright'; import { spawn } from 'child_process'; import fs from 'fs'; @@ -33,6 +32,7 @@ function log(message) { } // Generate Keys +const bytesToHex = (bytes) => Buffer.from(bytes).toString('hex'); const EPHEMERAL_SK_BYTES = generateSecretKey(); const EPHEMERAL_SK = bytesToHex(EPHEMERAL_SK_BYTES); const EPHEMERAL_PK = getPublicKey(EPHEMERAL_SK_BYTES); diff --git a/tests/app-batch-fetch-profiles.test.mjs b/tests/app-batch-fetch-profiles.test.mjs index df90a4bc..23eb374e 100644 --- a/tests/app-batch-fetch-profiles.test.mjs +++ b/tests/app-batch-fetch-profiles.test.mjs @@ -49,6 +49,9 @@ test("batchFetchProfiles handles fast and failing relays", async () => { const originalRelays = Array.isArray(nostrClient.relays) ? [...nostrClient.relays] : []; + const originalReadRelays = Array.isArray(nostrClient.readRelays) + ? [...nostrClient.readRelays] + : []; const originalWriteRelays = Array.isArray(nostrClient.writeRelays) ? [...nostrClient.writeRelays] : nostrClient.writeRelays; @@ -57,6 +60,7 @@ test("batchFetchProfiles handles fast and failing relays", async () => { const poolListCalls = []; nostrClient.relays = [FAST_RELAY, FAIL_RELAY]; + nostrClient.readRelays = [FAST_RELAY, FAIL_RELAY]; nostrClient.writeRelays = [FAST_RELAY, FAIL_RELAY]; nostrClient.pool = { list: (relays, filters) => { @@ -92,6 +96,7 @@ test("batchFetchProfiles handles fast and failing relays", async () => { }); } finally { nostrClient.relays = originalRelays; + nostrClient.readRelays = originalReadRelays; nostrClient.writeRelays = originalWriteRelays; nostrClient.pool = originalPool; }