Skip to content

Commit

Permalink
chore: overwrite return values
Browse files Browse the repository at this point in the history
  • Loading branch information
onmax committed Nov 19, 2024
1 parent e0401cd commit d650b3e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions server/utils/validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,12 @@ export async function fetchValidators(params: FetchValidatorsOptions): Result<Fe
validators.filter(v => 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 }
}
Expand Down

0 comments on commit d650b3e

Please sign in to comment.