Skip to content

Commit

Permalink
Merge pull request #2607 from BibliothecaDAO/fix/points-client
Browse files Browse the repository at this point in the history
fix: points
  • Loading branch information
ponderingdemocritus authored Dec 27, 2024
2 parents 2178bd4 + 089adc4 commit f022b88
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions client/src/dojo/modelManager/LeaderboardManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,10 @@ export class LeaderboardManager {
getEntityIdFromKeys([BigInt(hyperstructure.entity_id), BigInt(i + 1)]),
);

const epochEndTimestamp = season.is_over
? season.ended_at
: nextEpoch?.start_timestamp ?? BigInt(currentTimestamp);
const epochEndTimestamp =
season.is_over && nextEpoch === undefined
? season.ended_at
: nextEpoch?.start_timestamp ?? BigInt(currentTimestamp);
const epochDuration = epochEndTimestamp - epoch.start_timestamp;

const nbOfCycles = Number(epochDuration) / ClientConfigManager.instance().getTick(TickIds.Default);
Expand Down

0 comments on commit f022b88

Please sign in to comment.