From eb3011aed14b10e71cce71ff07787c152e20e0d3 Mon Sep 17 00:00:00 2001 From: orionstardust Date: Wed, 1 May 2024 09:58:54 -0400 Subject: [PATCH] refactor: isBuyNow to isBought --- schema.graphql | 2 +- src/helper.ts | 2 +- src/mapping.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) 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,