Removed veDelegation creation record.

This commit is contained in:
Maria Carmina 2023-04-26 17:18:13 +03:00
parent 42586360ac
commit c1e2d28738
1 changed files with 8 additions and 6 deletions

View File

@ -79,12 +79,14 @@ export function handleBurnBoost(event: BurnBoost): void {
// delete
const eventIndex: number = event.logIndex.toI32()
const tx = event.transaction.hash.toHex()
let veDelegation = getveDelegation(tx, _tokenId.toHex(), eventIndex)
if (!veDelegation) {
veDelegation = createDefaultVeDelegation(
`${tx}-${_tokenId.toHex()}-${eventIndex}`
)
}
const veDelegation = getveDelegation(tx, _tokenId.toHex(), eventIndex)
if (!veDelegation) return
// {
// veDelegation = createDefaultVeDelegation(
// `${tx}-${_tokenId.toHex()}-${eventIndex}`
// )
// }
veDelegation.amount = BigInt.zero()
veDelegation.eventIndex = event.logIndex.toI32()
veDelegation.save()