Skip to content

Commit

Permalink
chore: check for score
Browse files Browse the repository at this point in the history
  • Loading branch information
onmax committed Nov 19, 2024
1 parent 36a8bb4 commit 22ec0c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/utils/validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,10 @@ export async function fetchValidators(params: FetchValidatorsOptions): Result<Fe
if (dominance)
// @ts-expect-error The wallet expects a score object, but until these values are stable, we will use null
v.score.dominance = dominance
else if (v.dominanceRatioViaBalance !== -1)
else if (v.dominanceRatioViaBalance && v.dominanceRatioViaBalance !== -1)
// @ts-expect-error The wallet expects a score object, but until these values are stable, we will use null
v.score = { ...nullScore, dominance: getDominance({ dominanceRatio: v.dominanceRatioViaBalance }) }
else if (v.dominanceRatioViaSlots !== -1)
else if (v.dominanceRatioViaBalance && v.dominanceRatioViaSlots !== -1)
// @ts-expect-error The wallet expects a score object, but until these values are stable, we will use null
v.score = { ...nullScore, dominance: getDominance({ dominanceRatio: v.dominanceRatioViaSlots }) }
})
Expand Down

0 comments on commit 22ec0c8

Please sign in to comment.