Skip to content

Commit

Permalink
remove _, auto type inference
Browse files Browse the repository at this point in the history
  • Loading branch information
Trivo25 committed Dec 14, 2023
1 parent d2d5105 commit f84a6e0
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/examples/zkapps/reducer/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,11 @@ class StorageContract extends SmartContract {
let { state: optionValue } = this.reducer.reduce(
pendingActions,
Option,
(
_state: Option,
_action: {
key: Field;
value: Field;
}
) => {
let currentMatch = keyHash.equals(_action.key);
(state, action) => {
let currentMatch = keyHash.equals(action.key);
return {
isSome: currentMatch.or(_state.isSome),
value: Provable.if(currentMatch, _action.value, _state.value),
isSome: currentMatch.or(state.isSome),
value: Provable.if(currentMatch, action.value, state.value),
};
},
{
Expand Down

0 comments on commit f84a6e0

Please sign in to comment.