Skip to content

Commit

Permalink
fix query validator
Browse files Browse the repository at this point in the history
  • Loading branch information
HoangNDM6 committed Oct 3, 2023
1 parent 9038cf1 commit 6495f00
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/services/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ export async function getAllValidators(): Promise<IResponse<any>> {
.post(chainInfo.indexerV2, {
query: `query GetAllValidator {
${chainInfo.environment || ''} {
validator(limit: 1000) {
validator(limit: 1000, where: {status: {_neq: "UNRECOGNIZED"}} ) {
account_address
commission
description
Expand Down Expand Up @@ -351,8 +351,7 @@ export async function getNumberOfDelegator(validatorId: any): Promise<IResponse<
const { chainInfo } = await getGatewayUrl()
return axios
.get(
`${
chainInfo.find((chain) => chain.chainId == currentChainInfo.chainId)?.rest
`${chainInfo.find((chain) => chain.chainId == currentChainInfo.chainId)?.rest
}/cosmos/staking/v1beta1/validators/${validatorId}/delegations?pagination.count_total=true`,
)
.then((res) => res.data)
Expand Down

0 comments on commit 6495f00

Please sign in to comment.