From ffdbc1dae2261ee0cb1c5f5f66abc4734f3f8f40 Mon Sep 17 00:00:00 2001 From: shay <43248357+shayypy@users.noreply.github.com> Date: Sun, 24 Nov 2024 09:00:59 -0600 Subject: [PATCH] chore(bot): always 3 digits for p% --- packages/bot/src/ht/client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/bot/src/ht/client.ts b/packages/bot/src/ht/client.ts index b208489..610ec73 100644 --- a/packages/bot/src/ht/client.ts +++ b/packages/bot/src/ht/client.ts @@ -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); @@ -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 =