Skip to content

Conversation

@peachbits
Copy link
Collaborator

@peachbits peachbits commented Dec 2, 2025

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Description

none

…or coinmarketcap

Coinmarketcap doesn't start populating historical rates until they are 5 minutes old
targetFiat: string,
requestedCrypto: CryptoRateMap,
requestedFiat: FiatRateMap,
rightNow: Date
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would leave out this commit. This confuses the date that the request came in (rightNow) with the date the user requested. It made it much harder to review the next commit.

src/v3/utils.ts Outdated

// Ignore requests with a future time with an allowance for clients that are close enough
const isFutureTime = (
rateTime: number,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just make rateTime be a Date object so you don't have to do getTime() everywhere you pass in the param.

to make sure you pass in the params in the right order, make it an object you pass with

{
  date: Date
  rightNow: Date
}

Copy link
Member

@paullinator paullinator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments

We can now filter rates based on their date compared to server time in the bucketing utils
@peachbits peachbits merged commit d76609a into master Dec 2, 2025
1 check passed
@peachbits peachbits deleted the matthew/dates branch December 2, 2025 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants