Skip to content

Commit

Permalink
chore(bot): always 3 digits for p%
Browse files Browse the repository at this point in the history
  • Loading branch information
shayypy committed Nov 24, 2024
1 parent 9c83da8 commit ffdbc1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/bot/src/ht/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export interface HockeyTechLeagueConfiguration {
}

// export const khlProxyOrigin = "http://localhost:51996";
export const khlProxyOrigin = "https://khl.shayy.workers.dev"
export const khlProxyOrigin = "https://khl.shayy.workers.dev";

export const isKhl = (league: HockeyTechLeague) =>
["khl", "zhhl", "mhl"].includes(league);
Expand Down Expand Up @@ -143,7 +143,7 @@ export const getPointsPct = (
// much an individual game is "worth". Hockeytech uses a static value for
// this and doesn't account for the PWHL's max 3 points per game.
const gamesWorth = league === "pwhl" ? 3 : 2;
return (points / (gamesPlayed * gamesWorth || 1)).toPrecision(3);
return (points / (gamesPlayed * gamesWorth || 1)).toFixed(3);
};

export const GLOBAL_GAME_ID_REGEX =
Expand Down

0 comments on commit ffdbc1d

Please sign in to comment.