From 74248582a26b25d52d7e62c3705588ef7de87210 Mon Sep 17 00:00:00 2001 From: Lucian Date: Fri, 2 Feb 2024 09:35:02 -0700 Subject: [PATCH] fix(app): removed infinite loop glitch triggered by a failed get score request (#2131) --- app/context/scorerContext.tsx | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/app/context/scorerContext.tsx b/app/context/scorerContext.tsx index e5f8f521c0..96e3781971 100644 --- a/app/context/scorerContext.tsx +++ b/app/context/scorerContext.tsx @@ -102,9 +102,6 @@ export const ScorerContextProvider = ({ children }: { children: any }) => { const numThreshold = Number.parseFloat(response.data.evidence.threshold); const numScore = Number.parseFloat(response.data.score); - if (needsRescore(rescore, numRawScore, response.data.stamp_scores)) - return loadScore(address, dbAccessToken, true); - setRawScore(numRawScore); setThreshold(numThreshold); setScore(numScore); @@ -123,16 +120,6 @@ export const ScorerContextProvider = ({ children }: { children: any }) => { } }; - const needsRescore = (currentlyRescoring: boolean, rawScore: number, stamp_scores: any): boolean => { - let needsRescore = rawScore > 0; - if (!currentlyRescoring && needsRescore) { - try { - if (Object.keys(stamp_scores).length > 0) needsRescore = false; - } catch {} - } - return needsRescore; - }; - const fetchStampWeights = async () => { try { const response = await axios.get(`${scorerApiGetWeights}`);