Skip to content

Commit dc58025

Browse files
committed
fix: Update field updatedAt when events transferCreatorship or transferOwnership happens
1 parent cfa5fa0 commit dc58025

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/handlers/collection.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,7 @@ export function handleTransferCreatorship(event: CreatorshipTransferred): void {
579579
item.save()
580580
}
581581
}
582+
collection.updatedAt = event.block.timestamp
582583
collection.save()
583584
}
584585
}
@@ -587,6 +588,7 @@ export function handleTransferOwnership(event: OwnershipTransferred): void {
587588
let collection = Collection.load(event.address.toHexString())
588589
if (collection != null) {
589590
collection.owner = event.params.newOwner.toHexString()
591+
collection.updatedAt = event.block.timestamp
590592
collection.save()
591593
}
592594
}

0 commit comments

Comments
 (0)