Skip to content

Commit

Permalink
Include last bet in points
Browse files Browse the repository at this point in the history
  • Loading branch information
IanPhilips committed Feb 28, 2025
1 parent 0884f52 commit 9cff924
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion common/src/contract-params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export async function getContractParams(
contractId: contract.id,
filterRedemptions: !includeRedemptions,
includeZeroShareRedemptions: includeRedemptions,
beforeTime: contract.lastBetTime ?? contract.createdTime,
beforeTime: (contract.lastBetTime ?? contract.createdTime) + 1,
afterTime: contract.createdTime,
})
: [],
Expand Down
4 changes: 2 additions & 2 deletions web/components/charts/contract/zoom-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const useDataZoomFetcher = <T>(props: {
const min = viewXScale.invert(minX - 20).valueOf()
const max = viewXScale.invert(maxX + 20).valueOf()
const fixedMin = Math.max(min, createdTime)
const fixedMax = Math.min(max, lastBetTime)
const fixedMax = Math.min(max, lastBetTime) + 1

onZoomData(fixedMin, fixedMax)
} else {
Expand Down Expand Up @@ -173,7 +173,7 @@ export const useMultiChoiceDataZoomFetcher = <T>(props: {
const min = viewXScale.invert(minX - 20).valueOf()
const max = viewXScale.invert(maxX + 20).valueOf()
const fixedMin = Math.max(min, createdTime)
const fixedMax = Math.min(max, lastBetTime)
const fixedMax = Math.min(max, lastBetTime) + 1

onZoomData(fixedMin, fixedMax)
} else {
Expand Down

0 comments on commit 9cff924

Please sign in to comment.