Skip to content

Commit

Permalink
Merge pull request #338 from metaDAOproject/fix/not-adding-proposal-t…
Browse files Browse the repository at this point in the history
…o-markets

fix: adds in the update for the markets to make sure we fill in proposal
  • Loading branch information
R-K-H authored Dec 15, 2024
2 parents 5cd562b + 097c58f commit 2ac6a81
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -265,12 +265,8 @@ export const AutocratProposalIndexer: IntervalFetchIndexer = {

// Setup time to add to the date..
const timeLeftSecondsEstimate = (slotDifference.toNumber() * 400) / 1000 // MS to seconds
// const timeLeftMinutesEstimate = timeLeftSecondsEstimate / 60 // MS to seconds to minutes
// const timeLeftHoursEstimate = timeLeftMinutesEstimate / 60

const endedAt = new Date(currentTime.toUTCString());
// endedAt.setHours(endedAt.getHours() + timeLeftHoursEstimate);
// endedAt.setMinutes(endedAt.getMinutes() + timeLeftMinutesEstimate);
endedAt.setSeconds(endedAt.getSeconds() + timeLeftSecondsEstimate); // setSeconds accepts float and will increase to hours etc.

await usingDb((db) =>
Expand Down Expand Up @@ -435,6 +431,7 @@ export const AutocratProposalIndexer: IntervalFetchIndexer = {
onChainProposal,
currentTime
);
await updateMarketsWithProposal(onChainProposal);
}
}

Expand Down

0 comments on commit 2ac6a81

Please sign in to comment.