Skip to content

Commit

Permalink
v73 and withdrawals fix
Browse files Browse the repository at this point in the history
  • Loading branch information
apexearth committed Jan 22, 2025
1 parent 8cdd217 commit 72812a4
Show file tree
Hide file tree
Showing 2 changed files with 461 additions and 721 deletions.
6 changes: 3 additions & 3 deletions src/templates/withdrawals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ export const createOTokenWithdrawalsProcessor = ({
log: Context['blocks'][number]['logs'][number],
) => {
const data = oethVault.events.WithdrawalRequested.decode(log)

const id = `${ctx.chain.id}:${oTokenAddress}:${data._withdrawer.toLowerCase()}:${data._requestId}`
const withdrawalRequest = new OTokenWithdrawalRequest({
id: `${data._withdrawer.toLowerCase()}:${data._requestId}`,
id,
chainId: ctx.chain.id,
blockNumber: block.header.height,
timestamp: new Date(block.header.timestamp),
Expand All @@ -84,7 +84,7 @@ export const createOTokenWithdrawalsProcessor = ({
log: Context['blocks'][number]['logs'][number],
) => {
const data = oethVault.events.WithdrawalClaimed.decode(log)
const id = `${data._withdrawer.toLowerCase()}:${data._requestId}`
const id = `${ctx.chain.id}:${oTokenAddress}:${data._withdrawer.toLowerCase()}:${data._requestId}`
let updated
if (result.withdrawalRequests.has(id)) {
updated = result.withdrawalRequests.get(id)
Expand Down
Loading

0 comments on commit 72812a4

Please sign in to comment.