File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -489,6 +489,13 @@ export function handleAavegotchiInteract(event: AavegotchiInteract): void {
489489 gotchi . lastInteracted = event . block . timestamp ;
490490 // gotchi = updateAavegotchiInfo(gotchi, event.params._tokenId, event);
491491 gotchi . save ( ) ;
492+
493+ // Update ERC721Listing if gotchi has an active listing
494+ if ( gotchi . activeListing ) {
495+ let listing = getOrCreateERC721Listing ( gotchi . activeListing ! . toString ( ) ) ;
496+ listing . kinship = gotchi . kinship ;
497+ listing . save ( ) ;
498+ }
492499}
493500
494501//ERC721 Transfer
@@ -528,8 +535,9 @@ export function handleTransfer(event: Transfer): void {
528535
529536 if ( newOwner . id == "0x0000000000000000000000000000000000000000" ) {
530537 let stats = getStatisticEntity ( ) ;
531- stats . aavegotchisSacrificed =
532- stats . aavegotchisSacrificed . plus ( BIGINT_ONE ) ;
538+ stats . aavegotchisSacrificed = stats . aavegotchisSacrificed . plus (
539+ BIGINT_ONE
540+ ) ;
533541 stats . save ( ) ;
534542 }
535543 } else {
You can’t perform that action at this time.
0 commit comments