Skip to content

Commit

Permalink
chore: use enums for bond status values (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
dblackstone1 authored Oct 31, 2024
1 parent 2a581fb commit a78f2b0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/ValidatorScrollTile/ValidatorScrollTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
unstakeFromValidator,
} from '@/helpers';
import {
BondStatus,
DEFAULT_ASSET,
GREATER_EXPONENT_DEFAULT,
LOCAL_ASSET_REGISTRY,
Expand Down Expand Up @@ -82,7 +83,7 @@ export const ValidatorScrollTile = ({
let subTitle: string;
if (validator.jailed) {
subTitle = 'Jailed';
} else if (validator.status === 'BOND_STATUS_UNBONDED') {
} else if (validator.status === BondStatus.UNBONDED) {
subTitle = 'Inactive';
} else if (delegatedAmount === 0) {
subTitle = 'No delegation';
Expand All @@ -104,10 +105,10 @@ export const ValidatorScrollTile = ({
if (validator.jailed) {
statusLabel = 'Jailed';
statusColor = 'error';
} else if (validator.status === 'BOND_STATUS_UNBONDING') {
} else if (validator.status === BondStatus.UNBONDING) {
statusLabel = 'Unbonding';
statusColor = 'warn';
} else if (validator.status === 'BOND_STATUS_UNBONDED') {
} else if (validator.status === BondStatus.UNBONDED) {
statusLabel = 'Inactive';
statusColor = 'warn';
} else {
Expand Down

0 comments on commit a78f2b0

Please sign in to comment.