From 3efc6bb47f05a0d25498e99448be92b56312b41c Mon Sep 17 00:00:00 2001 From: Riccardo Balbo Date: Thu, 23 May 2024 21:24:54 +0200 Subject: [PATCH] Fix int params --- src/lib/BlobStore.cjs | 3 +-- src/lib/Job.cjs | 4 +--- src/lib/Nostr.cjs | 1 - 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/lib/BlobStore.cjs b/src/lib/BlobStore.cjs index 99537d8..a5ec92d 100644 --- a/src/lib/BlobStore.cjs +++ b/src/lib/BlobStore.cjs @@ -16,8 +16,7 @@ class BlobStore { static async create(name, encryptionKey = "", includeEncryptionKeyInOutput = false) { const nameMem = Memory.fromString(name); const encryptionKeyMem = Memory.fromString(encryptionKey); - const includeEncryptionKeyInOutput = BigInt(includeEncryptionKeyInOutput ? 1 : 0); - const urlOff = await BlobStore_create(nameMem.offset, encryptionKeyMem.offset, includeEncryptionKeyInOutput) + const urlOff = await BlobStore_create(nameMem.offset, encryptionKeyMem.offset, includeEncryptionKeyInOutput?1:0) return new BlobStore(Memory.find(urlOff).readString()); } diff --git a/src/lib/Job.cjs b/src/lib/Job.cjs index 1aa2ecb..7ed3684 100644 --- a/src/lib/Job.cjs +++ b/src/lib/Job.cjs @@ -176,9 +176,7 @@ class Job { static async waitFor(jobId, nExpectedResults = 1, maxWaitTime = 1000 *60*2){ jobId = await jobId; const jobIdOff = Memory.fromString(jobId); - const nExpectedResultsB=BigInt(nExpectedResults); - const maxWaitTimeB=BigInt(maxWaitTime); - const res = await Job_waitFor(jobIdOff.offset, nExpectedResultsB, maxWaitTimeB); + const res = await Job_waitFor(jobIdOff.offset, nExpectedResults, maxWaitTime); if(res == 0){ throw new Error("Job "+jobId+" failed"); } diff --git a/src/lib/Nostr.cjs b/src/lib/Nostr.cjs index 1205a40..c90bad3 100644 --- a/src/lib/Nostr.cjs +++ b/src/lib/Nostr.cjs @@ -50,7 +50,6 @@ class Nostr { */ static async getEvents(subId, limit) { if (!limit) limit = 0; - limit = BigInt(limit); const memSubId = Memory.fromString(subId); const resOffset = await Nostr_getEvents(memSubId.offset, limit); return Memory.find(resOffset).readJsonObject();