Skip to content

Commit

Permalink
Add args to the callback method invocation (#516)
Browse files Browse the repository at this point in the history
* Add args to the callback method invocation

* Changelog
  • Loading branch information
MartinMinkov committed Oct 26, 2022
1 parent 2787994 commit 928bc47
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

- Proof verification on the web version https://github.com/o1-labs/snarkyjs/pull/476
- Callback arguments are properly passed into method invocations https://github.com/o1-labs/snarkyjs/pull/516

## [0.6.0](https://github.com/o1-labs/snarkyjs/compare/f2ad423...ba688523)

Expand Down
2 changes: 1 addition & 1 deletion src/lib/zkapp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ class Callback<Result> extends GenericArgument {

// call the callback, leveraging composability (if this is inside a smart contract method)
// to prove to the outer circuit that we called it
let result = (instance[methodName] as Function)();
let result = (instance[methodName] as Function)(...args);
let accountUpdate = instance.self;

let callback = new Callback<any>({
Expand Down

0 comments on commit 928bc47

Please sign in to comment.