Skip to content

Commit

Permalink
refactor: isBuyNow to isBought
Browse files Browse the repository at this point in the history
  • Loading branch information
orionstardust committed May 1, 2024
1 parent 3486502 commit eb3011a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ type Auction @entity {
category: Int!
buyNowPrice: BigInt!
startBidPrice: BigInt!
isBuyNow: Boolean!
isBought: Boolean!
}

type Bid @entity {
Expand Down
2 changes: 1 addition & 1 deletion src/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit eb3011a

Please sign in to comment.