diff --git a/schema.graphql b/schema.graphql index dc15db8..4e71512 100644 --- a/schema.graphql +++ b/schema.graphql @@ -47,7 +47,7 @@ type Auction @entity { category: Int! buyNowPrice: BigInt! startBidPrice: BigInt! - isBuyNow: Boolean! + isBought: Boolean! } type Bid @entity { diff --git a/src/helper.ts b/src/helper.ts index 909a329..68a47a5 100644 --- a/src/helper.ts +++ b/src/helper.ts @@ -84,7 +84,7 @@ export function getOrCreateAuction( auction.totalBids = BIGINT_ZERO; auction.buyNowPrice = BIGINT_ZERO; auction.startBidPrice = BIGINT_ZERO; - auction.isBuyNow = false; + auction.isBought = false; } return auction; diff --git a/src/mapping.ts b/src/mapping.ts index 435c396..e749282 100644 --- a/src/mapping.ts +++ b/src/mapping.ts @@ -319,7 +319,7 @@ export function handleAuction_Initialized( auction.cancelled = false; auction.buyNowPrice = BigInt.fromI32(0); auction.startBidPrice = BigInt.fromI32(0); - auction.isBuyNow = false; + auction.isBought = false; // Update Auction auction = updateAuction(auction, event); @@ -599,7 +599,7 @@ export function handleAuction_BoughtNow( } auction.claimed = true; auction.claimAt = event.block.timestamp; - auction.isBuyNow = true; + auction.isBought = true; let bid = getOrCreateBid( auction.highestBidder,