From 4fd0e5caad7bf546261626af6ae98bb32418d1cd Mon Sep 17 00:00:00 2001 From: Pico2x Date: Tue, 11 Oct 2022 13:39:40 +0100 Subject: [PATCH] Fix bug in which new users are flagged as unreliable --- functions/src/update-metrics.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/src/update-metrics.ts b/functions/src/update-metrics.ts index 106ed773..6a01318b 100644 --- a/functions/src/update-metrics.ts +++ b/functions/src/update-metrics.ts @@ -181,7 +181,7 @@ export async function updateMetricsCore() { const badResolutions = contractRatios.filter( (ratio) => ratio > BAD_RESOLUTION_THRESHOLD ) - let newFractionResolvedCorrectly = 0 + let newFractionResolvedCorrectly = 1 if (userContracts.length > 0) { newFractionResolvedCorrectly = (userContracts.length - badResolutions.length) / userContracts.length