Skip to content

Commit

Permalink
Migrate to querying validators by address
Browse files Browse the repository at this point in the history
  • Loading branch information
csillag committed May 24, 2024
1 parent 42ce26f commit 0257536
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/app/pages/ValidatorDetailsPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import CardContent from '@mui/material/CardContent'
import Divider from '@mui/material/Divider'
import Grid from '@mui/material/Grid'
import { useScreenSize } from '../../hooks/useScreensize'
import { Validator, useGetConsensusValidatorsEntityId } from '../../../oasis-nexus/api'
import { Validator, useGetConsensusValidatorsAddress } from '../../../oasis-nexus/api'
import { RouterTabs } from '../../components/RouterTabs'
import { StyledDescriptionList } from '../../components/StyledDescriptionList'
import { PageLayout } from '../../components/PageLayout'
Expand Down Expand Up @@ -36,9 +36,8 @@ export const ValidatorDetailsPage: FC = () => {
const { t } = useTranslation()
const { isMobile } = useScreenSize()
const scope = useRequiredScopeParam()
// TODO: currently API does not work with address query param. Wait for API update or switch to entity_id
const { address } = useLoaderData() as AddressLoaderData
const validatorQuery = useGetConsensusValidatorsEntityId(scope.network, address)
const validatorQuery = useGetConsensusValidatorsAddress(scope.network, address)
const { isLoading, data } = validatorQuery
const validator = data?.data
const transactionsLink = useHref('')
Expand Down

0 comments on commit 0257536

Please sign in to comment.