Skip to content

Commit f0863da

Browse files
committed
fix: snapshot cumulative _claimable (not delta _newClaimable) on OTokenVault
1 parent d3a5346 commit f0863da

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/templates/otoken/otoken-state.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ export const otokenStateProcessor = (params: {
8282
for (const log of block.logs) {
8383
if (log.address === vaultAddrLc && log.topics[0] === otokenVault.events.WithdrawalClaimable.topic) {
8484
const data = otokenVault.events.WithdrawalClaimable.decode(log)
85-
await upsertVaultState(block, data._newClaimable)
85+
// `_claimable` is the new cumulative pointer; `_newClaimable` is the
86+
// delta added by this event. We snapshot the cumulative.
87+
await upsertVaultState(block, data._claimable)
8688
}
8789
}
8890
}

0 commit comments

Comments
 (0)