Skip to content

Commit

Permalink
fix: Update field updatedAt when events transferCreatorship or transf…
Browse files Browse the repository at this point in the history
…erOwnership happens
  • Loading branch information
cyaiox committed Jan 31, 2025
1 parent cfa5fa0 commit dc58025
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/handlers/collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,7 @@ export function handleTransferCreatorship(event: CreatorshipTransferred): void {
item.save()
}
}
collection.updatedAt = event.block.timestamp
collection.save()
}
}
Expand All @@ -587,6 +588,7 @@ export function handleTransferOwnership(event: OwnershipTransferred): void {
let collection = Collection.load(event.address.toHexString())
if (collection != null) {
collection.owner = event.params.newOwner.toHexString()
collection.updatedAt = event.block.timestamp
collection.save()
}
}

0 comments on commit dc58025

Please sign in to comment.