diff --git a/src/ERC20.mapping.ts b/src/ERC20.mapping.ts index fc9062d..3999dc1 100644 --- a/src/ERC20.mapping.ts +++ b/src/ERC20.mapping.ts @@ -545,7 +545,7 @@ export function handleExit(event: Exit): void { totalETH = totalETH.plus(ethValue); depositDataEntry.exitedEth = depositDataEntry.exitedEth.plus(ethValue); const exitQueue = vExitQueue.load(pool!.exitQueue); - const nextTicketIdx = exitQueue!.ticketCount.minus(BigInt.fromI32(1)); + const nextTicketIdx = exitQueue!.ticketCount.minus(BigInt.fromI32(details.length - idx)); const linkedTicketId = externalEntityUUID(Address.fromBytes(exitQueue!.address), [nextTicketIdx.toString()]); tickets.push(linkedTicketId);