Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Commit

Permalink
fix: poolFeesTransactions fallback for missing epochs
Browse files Browse the repository at this point in the history
  • Loading branch information
filo87 committed Feb 27, 2024
1 parent 6528d26 commit cf391b0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/mappings/services/poolFeeTransactionService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ export class PoolFeeTransactionService extends PoolFeeTransaction {
static init(data: PoolFeeData, type: keyof typeof PoolFeeTransactionType) {
const { hash, epochNumber, poolId, feeId, timestamp, blockNumber } = data
const _type = PoolFeeTransactionType[type]
const _epochNumber = epochNumber ?? 0
return new this(
`${hash}-${epochNumber ?? 0}`,
`${hash}-${_epochNumber}`,
`${poolId}-${feeId}`,
_type,
timestamp,
blockNumber,
epochNumber
_epochNumber
)
}

Expand Down

0 comments on commit cf391b0

Please sign in to comment.