Skip to content

Commit

Permalink
v1.4.34-beta.1
Browse files Browse the repository at this point in the history
  • Loading branch information
asiaziola committed Feb 13, 2024
1 parent 0b53bff commit baa9a10
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
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",
"version": "1.4.34",
"version": "1.4.34-beta.1",
"description": "An implementation of the SmartWeave smart contract protocol.",
"types": "./lib/types/index.d.ts",
"main": "./lib/cjs/index.js",
Expand Down
10 changes: 4 additions & 6 deletions src/contract/HandlerBasedContract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -646,13 +646,11 @@ export class HandlerBasedContract<State> implements Contract<State> {

const benchmark = Benchmark.measure();
if (!this.isRoot()) {
cachedState =
state ||
(this.interactionState().getLessOrEqual(this.txId(), upToSortKey) as SortKeyCacheResult<
EvalStateResult<State>
>);
cachedState = this.interactionState().getLessOrEqual(this.txId(), upToSortKey) as SortKeyCacheResult<
EvalStateResult<State>
>;
}
cachedState = cachedState || (await stateEvaluator.latestAvailableState<State>(contractTxId, upToSortKey));
cachedState = state || cachedState || (await stateEvaluator.latestAvailableState<State>(contractTxId, upToSortKey));
if (upToSortKey && this.evaluationOptions().strictSortKey && cachedState?.sortKey != upToSortKey) {
throw new Error(`State not cached at the exact required ${upToSortKey} sortKey`);
}
Expand Down

0 comments on commit baa9a10

Please sign in to comment.