Skip to content

Commit

Permalink
chore: fixed build
Browse files Browse the repository at this point in the history
  • Loading branch information
onmax committed Nov 19, 2024
1 parent 7c747cd commit 0d0807d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions server/utils/validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,12 @@ 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 || v.dominanceRatioViaSlots)
else if (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 || v.dominanceRatioViaSlots }) }
v.score = { ...nullScore, dominance: getDominance({ dominanceRatio: v.dominanceRatioViaBalance }) }
else if (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 }) }
})

return { data: validators, error: undefined }
Expand Down

0 comments on commit 0d0807d

Please sign in to comment.