Skip to content

Commit

Permalink
[QN] fix WG worker missing rewards mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
kdembler committed May 2, 2024
1 parent 011d1a6 commit 383bc06
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions query-node/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### Unreleased

- Fix mappings for `workingGroups_NewMissedRewardLevelReached` event to properly handle worker missing rewards updates

### 2.2.1

- Bump deps @polkadot/api v10.7.1
Expand Down
2 changes: 1 addition & 1 deletion query-node/mappings/src/workingGroups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ export async function workingGroups_NewMissedRewardLevelReached({
await store.save<NewMissedRewardLevelReachedEvent>(newMissedRewardLevelReachedEvent)

// Update worker
worker.missingRewardAmount = newMissedRewardAmountOpt.unwrapOr(undefined)
worker.missingRewardAmount = newMissedRewardAmountOpt.unwrapOr(new BN(0))

await store.save<Worker>(worker)
}
Expand Down

0 comments on commit 383bc06

Please sign in to comment.