Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
fix(tick): update function to get endtimestamp for auction
Browse files Browse the repository at this point in the history
  • Loading branch information
dtfiedler committed Oct 31, 2023
1 parent ada830f commit 5ef4df5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/actions/write/tick.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export function tickAuctions({
return acc;
}
// create the new record object
const maybeEndTimestamp = (() => {
const getEndTimestamp = () => {
switch (auction.type) {
case 'permabuy':
return {};
Expand All @@ -248,13 +248,14 @@ export function tickAuctions({
currentBlockTimestamp.valueOf(),
};
}
})();
};
const endTimestamp = getEndTimestamp();
updatedRecords[key] = {
type: auction.type,
contractTxId: auction.contractTxId,
startTimestamp: currentBlockTimestamp.valueOf(),
undernames: DEFAULT_UNDERNAME_COUNT,
...maybeEndTimestamp,
...endTimestamp,
purchasePrice: auction.floorPrice,
};

Expand Down

0 comments on commit 5ef4df5

Please sign in to comment.