Skip to content

Commit

Permalink
fix: donut
Browse files Browse the repository at this point in the history
  • Loading branch information
Albermonte committed Nov 20, 2024
1 parent 8bbf042 commit 7f16d68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/components/Donut.client.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ defineProps<{ data: ValidatorScore[] }>()
const isMounted = useMounted()
const value = (d: ValidatorScore) => d.dominanceRatio
const value = (d: ValidatorScore) => (d.dominanceRatioViaBalance > 0 ? d.dominanceRatioViaBalance : d.dominanceRatioViaSlots) || 0
const label = (d: ValidatorScore) => d.name || d.address
const colors = ['red', 'orange', 'blue', 'green', 'gold']
Expand Down
3 changes: 2 additions & 1 deletion server/utils/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Range } from '~~/packages/nimiq-validators-trustscore/src'
import type { Score, Validator } from './drizzle'
import type { Activity, Score, Validator } from './drizzle'

export type Result<T> = Promise<{ data: T, error: undefined } | { data: undefined, error: string }>

Expand All @@ -12,6 +12,7 @@ export enum PayoutType {
export type ValidatorScore =
Omit<Validator, 'hasDefaultLogo' | 'accentColor' | 'contact'>
& Pick<Score, 'availability' | 'dominance' | 'reliability' | 'total'>
& Pick<Activity, 'dominanceRatioViaBalance' | 'dominanceRatioViaSlots'>

export enum HealthFlag {
MissingEpochs = 'missing-epochs',
Expand Down

0 comments on commit 7f16d68

Please sign in to comment.