From 70b1f24e602572a9c5fc33d37adc5d221463a143 Mon Sep 17 00:00:00 2001 From: Coby Date: Wed, 18 Sep 2024 17:20:52 -0400 Subject: [PATCH] fix reversion --- examples/zkapps/10-account-updates/src/ProofsOnlyZkApp.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/zkapps/10-account-updates/src/ProofsOnlyZkApp.ts b/examples/zkapps/10-account-updates/src/ProofsOnlyZkApp.ts index 548a2a355..48ac83ed4 100644 --- a/examples/zkapps/10-account-updates/src/ProofsOnlyZkApp.ts +++ b/examples/zkapps/10-account-updates/src/ProofsOnlyZkApp.ts @@ -42,7 +42,7 @@ export class ProofsOnlyZkApp extends SmartContract { } @method async add(incrementBy: Field) { - this.account.provedState.getAndRequireEquals(); + this.account.provedState.getAndRequireEquals().assertTrue(); const num = this.num.getAndRequireEquals(); this.num.set(num.add(incrementBy)); @@ -51,14 +51,14 @@ export class ProofsOnlyZkApp extends SmartContract { } @method async incrementCalls() { - this.account.provedState.getAndRequireEquals(); + this.account.provedState.getAndRequireEquals().assertTrue(); const calls = this.calls.getAndRequireEquals(); this.calls.set(calls.add(Field(1))); } @method async callSecondary(secondaryAddr: PublicKey) { - this.account.provedState.getAndRequireEquals(); + this.account.provedState.getAndRequireEquals().assertTrue(); const secondaryContract = new SecondaryZkApp(secondaryAddr); const num = this.num.getAndRequireEquals();