Skip to content

Commit

Permalink
Merge pull request #115 from embrio-tech/main
Browse files Browse the repository at this point in the history
fix: poolFeesTransactions fallback for missing epochs
  • Loading branch information
filo87 authored Feb 29, 2024
2 parents 39b3ad4 + cf391b0 commit d9026d5
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 d9026d5

Please sign in to comment.