Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Fix inactive validators not displayed error #65

Open
wants to merge 1 commit into
base: stargate
Choose a base branch
from

Conversation

WeiJun0827
Copy link

@WeiJun0827 WeiJun0827 commented Aug 16, 2021

Background

Some of the validators in a testnet are offline, they should be labeled as inactive in the validator list. But they are not displayed.

Cause

The loadValidators function only fetches active validators(status === 'BOND_STATUS_BONDED').

Revision

  • The staking/validators endpoint get the validators with status === 'BOND_STATUS_BONDED' by default if the status parameter is not specified. So we should explicitly get inactive validators including status in BOND_STATUS_UNBONDING, BOND_STATUS_UNBONDED, and BOND_STATUS_UNSPECIFIED seperately, which covers all the status enum.
  • Put inactive validators in the array to display.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant