Skip to content

Commit

Permalink
Merge pull request #3181 from OlympusDAO/observationFix
Browse files Browse the repository at this point in the history
index resets at 99. account for this
  • Loading branch information
brightiron authored Jul 5, 2024
2 parents f9c95d6 + b733e37 commit 2c32d99
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 2c32d99

Please sign in to comment.