Fix bug in which new users are flagged as unreliable

This commit is contained in:
Pico2x 2022-10-11 13:39:40 +01:00
parent 70b2b14f80
commit 4fd0e5caad

View File

@ -181,7 +181,7 @@ export async function updateMetricsCore() {
const badResolutions = contractRatios.filter( const badResolutions = contractRatios.filter(
(ratio) => ratio > BAD_RESOLUTION_THRESHOLD (ratio) => ratio > BAD_RESOLUTION_THRESHOLD
) )
let newFractionResolvedCorrectly = 0 let newFractionResolvedCorrectly = 1
if (userContracts.length > 0) { if (userContracts.length > 0) {
newFractionResolvedCorrectly = newFractionResolvedCorrectly =
(userContracts.length - badResolutions.length) / userContracts.length (userContracts.length - badResolutions.length) / userContracts.length