diff --git a/schema.graphql b/schema.graphql index 0fb6c5e..b4d6733 100644 --- a/schema.graphql +++ b/schema.graphql @@ -11,7 +11,7 @@ type Auction @entity { claimed: Boolean! #Auction Settings - hammerTimeDuration: BigInt! + hammerTimeDuration: BigInt bidDecimals: BigInt! stepMin: BigInt! incMin: BigInt! diff --git a/src/mapping.ts b/src/mapping.ts index cf1a3fc..5ecd4e0 100644 --- a/src/mapping.ts +++ b/src/mapping.ts @@ -319,7 +319,7 @@ export function handleAuction_Initialized( // @todo: seller, createdAt, startsAt, endsAt, claimAt, // contractId quantity, presetId, cancelled, ercType, bids objects - if (!result.reverted && !resultHammerTime.reverted) { + if (!result.reverted) { let auctionInfo = result.value; auction.category = auctionInfo.info.category; @@ -330,7 +330,7 @@ export function handleAuction_Initialized( let presets = auctionInfo.presets; auction.bidDecimals = presets.bidDecimals; auction.bidMultiplier = presets.bidMultiplier; - auction.hammerTimeDuration = resultHammerTime.value; + auction.incMax = presets.incMax; auction.incMin = presets.incMin; auction.stepMin = presets.stepMin; @@ -351,6 +351,10 @@ export function handleAuction_Initialized( auction = updateProceeds(auction); } + if (!resultHammerTime.reverted) { + auction.hammerTimeDuration = resultHammerTime.value; + } + auction.save(); let contractEntity = ContractEntity.load(