Skip to content

Commit

Permalink
index resets at 99. account for this
Browse files Browse the repository at this point in the history
  • Loading branch information
brightiron committed Jul 5, 2024
1 parent f9c95d6 commit b733e37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/views/Range/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const PriceHistory = () => {
const contract = RANGE_PRICE_CONTRACT.getEthersContract(networks.MAINNET);
const lastObservationIndex = await contract.nextObsIndex();
const secondsToSubtract = await contract.observationFrequency();
const totalObservations = 10;
const totalObservations = lastObservationIndex < 10 ? lastObservationIndex : 10;
let currentDate = new Date(); // Start with the current date
const resultsArray: {
price: number;
Expand Down

0 comments on commit b733e37

Please sign in to comment.