Skip to content

Commit

Permalink
Fix int params
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardobl committed May 23, 2024
1 parent c796168 commit 3efc6bb
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/lib/BlobStore.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

Expand Down
4 changes: 1 addition & 3 deletions src/lib/Job.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down
1 change: 0 additions & 1 deletion src/lib/Nostr.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 3efc6bb

Please sign in to comment.