Skip to content

Commit

Permalink
1.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Tadeuchi committed Dec 29, 2023
1 parent 1b68125 commit 51e188a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "warp-contracts-postgres",
"version": "1.1.2",
"version": "1.1.3",
"description": "Postgres contract cache for Warp SDK",
"types": "./lib/types/index.d.ts",
"main": "./lib/cjs/index.js",
Expand Down
6 changes: 4 additions & 2 deletions src/PgContractCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,9 @@ export class PgContractCache<V> implements BasicSortKeyCache<EvalStateResult<V>>
let batchCounter = 0;
for (const [tx, v] of Object.entries(value.validity)) {
batchCounter++;
insertValues += `${batchCounter > 1 ? "," : ""} ('${stateCacheKey.key}', '${stateCacheKey.sortKey}', '${tx}', ${v}, '${value.errorMessages[tx]}')`
insertValues += `${batchCounter > 1 ? ',' : ''} ('${stateCacheKey.key}', '${
stateCacheKey.sortKey
}', '${tx}', ${v}, '${value.errorMessages[tx]}')`;
if (batchCounter % this.pgCacheOptions.validityBatchSize === 0) {
await this.queryInsertValidity(insertValues);
insertValues = '';
Expand Down Expand Up @@ -448,5 +450,5 @@ export class PgContractValidity {
}

readonly validity: Record<string, boolean>;
readonly count: number
readonly count: number;
}

0 comments on commit 51e188a

Please sign in to comment.