File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ import {
113113} from "../utils/constants" ;
114114import { Address , BigInt , log , Bytes } from "@graphprotocol/graph-ts" ;
115115
116- import { /*Parcel,*/ Parcel , TokenCommitment } from "../../generated/schema" ;
116+ import { ERC721Listing , Parcel , TokenCommitment } from "../../generated/schema" ;
117117// import {
118118// RealmDiamond,
119119// MintParcel,
@@ -495,13 +495,12 @@ export function handleAavegotchiInteract(event: AavegotchiInteract): void {
495495
496496 // Update ERC721Listing if gotchi has an active listing
497497 if ( gotchi . activeListing ) {
498- let listing = getOrCreateERC721Listing (
499- gotchi . activeListing ! . toString ( ) ,
500- false
501- ) ;
502- listing . kinship = gotchi . kinship ;
503- listing . save ( ) ;
504- }
498+ let listing = ERC721Listing . load ( gotchi . activeListing ! . toString ( ) ) ;
499+
500+ if ( listing ) {
501+ listing . kinship = gotchi . kinship ;
502+ listing . save ( ) ;
503+ }
505504}
506505
507506//ERC721 Transfer
@@ -584,6 +583,7 @@ export function handleERC721ListingAdd(event: ERC721ListingAdd): void {
584583 ) ! ;
585584 gotchi . locked = true ;
586585 listing . collateral = gotchi . collateral ;
586+ listing . kinship = gotchi . kinship ; // Explicitly set kinship when listing is created
587587 gotchi . activeListing = event . params . listingId ;
588588 gotchi . save ( ) ;
589589 listing . nameLowerCase = gotchi . nameLowerCase ;
You can’t perform that action at this time.
0 commit comments