Skip to content

Commit 020ab11

Browse files
committed
fix: listings kinship
1 parent 85d5f70 commit 020ab11

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/mappings/diamond.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff 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 {

0 commit comments

Comments
 (0)