Skip to content

Commit

Permalink
fix reversion
Browse files Browse the repository at this point in the history
  • Loading branch information
45930 committed Sep 18, 2024
1 parent 05cb9b4 commit 70b1f24
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/zkapps/10-account-updates/src/ProofsOnlyZkApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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();
Expand Down

0 comments on commit 70b1f24

Please sign in to comment.