From d650b3e3ed28efb476b78fc74428500d7a0ab3ff Mon Sep 17 00:00:00 2001 From: onmax Date: Tue, 19 Nov 2024 02:00:53 -0600 Subject: [PATCH] chore: overwrite return values --- server/utils/validators.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/server/utils/validators.ts b/server/utils/validators.ts index e2d5ea8..e29a41c 100644 --- a/server/utils/validators.ts +++ b/server/utils/validators.ts @@ -202,8 +202,12 @@ export async function fetchValidators(params: FetchValidatorsOptions): Result v.hasDefaultLogo).forEach(v => delete v.logo) const nullScore = { total: null, dominance: null, availability: null, reliability: null } - // @ts-expect-error The wallet expects a score object, but until these values are stable, we will use null - validators.forEach(v => v.score = nullScore) + validators.forEach((v) => { + // @ts-expect-error The wallet expects a score object, but until these values are stable, we will use null + v.score = nullScore + // @ts-expect-error The wallet expects a score object, but until these values are stable, we will use null + v.score.dominance = v.dominanceRatio + }) return { data: validators, error: undefined } }