diff --git a/package.json b/package.json index cf8172f8..677651fe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "warp-contracts", - "version": "1.4.36-beta.9", + "version": "1.4.36-beta.10", "description": "An implementation of the SmartWeave smart contract protocol.", "types": "./lib/types/index.d.ts", "main": "./lib/cjs/index.js", diff --git a/src/contract/states/ContractInteractionState.ts b/src/contract/states/ContractInteractionState.ts index ac84c72a..47d5d8cd 100644 --- a/src/contract/states/ContractInteractionState.ts +++ b/src/contract/states/ContractInteractionState.ts @@ -81,9 +81,7 @@ export class ContractInteractionState implements InteractionState { } }); const doStoreJsonBenchmark = Benchmark.measure(); - this.doStoreJson(latestState, interaction, forceStore).then(() => { - this.logger.info(`json stored`); - }); + await this.doStoreJson(latestState, interaction, forceStore); doStoreJsonBenchmark.stop(); this.logger.info('doStoreJsonBenchmark', doStoreJsonBenchmark.elapsed()); const commitKvsBenchmark = Benchmark.measure(); @@ -102,7 +100,7 @@ export class ContractInteractionState implements InteractionState { async rollback(interaction: GQLNodeInterface, forceStateStoreToCache: boolean): Promise { try { - this.doStoreJson(this._initialJson, interaction, forceStateStoreToCache).then(); + await this.doStoreJson(this._initialJson, interaction, forceStateStoreToCache); await this.rollbackKVs(); } finally { this.reset(); @@ -150,7 +148,7 @@ export class ContractInteractionState implements InteractionState { ) { if (states.size > 1 || forceStore) { for (const [k, v] of states) { - await this._warp.stateEvaluator.putInCache(k, interaction, v); + this._warp.stateEvaluator.putInCache(k, interaction, v).then(); } } }