Fixed nullifier service bug
This commit is contained in:
parent
28a83b6ec4
commit
6447563ea0
@ -141,25 +141,23 @@ const getNullifiers = async (blockFrom) => {
|
|||||||
blockFrom = lastSyncBlock + numbers.ONE
|
blockFrom = lastSyncBlock + numbers.ONE
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!blockTo || blockTo > blockFrom) {
|
let nodeEvents = await self.BatchEventsService.getBatchEvents({
|
||||||
let nodeEvents = await self.BatchEventsService.getBatchEvents({
|
fromBlock: blockFrom,
|
||||||
fromBlock: blockFrom,
|
type: 'NewNullifier'
|
||||||
type: 'NewNullifier'
|
})
|
||||||
|
|
||||||
|
if (nodeEvents && nodeEvents.length) {
|
||||||
|
nodeEvents = nodeEvents.map(({ blockNumber, transactionHash, args }) => ({
|
||||||
|
blockNumber,
|
||||||
|
transactionHash,
|
||||||
|
nullifier: args.nullifier,
|
||||||
|
}))
|
||||||
|
|
||||||
|
console.log({
|
||||||
|
nodeEvents
|
||||||
})
|
})
|
||||||
|
|
||||||
if (nodeEvents && nodeEvents.length) {
|
events.push(...nodeEvents)
|
||||||
nodeEvents = nodeEvents.map(({ blockNumber, transactionHash, args }) => ({
|
|
||||||
blockNumber,
|
|
||||||
transactionHash,
|
|
||||||
nullifier: args.nullifier,
|
|
||||||
}))
|
|
||||||
|
|
||||||
console.log({
|
|
||||||
nodeEvents
|
|
||||||
})
|
|
||||||
|
|
||||||
events.push(...nodeEvents)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return events
|
return events
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user