From 393b068f855cf01c1cabda8cd5b881a74d732567 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Wed, 27 May 2020 19:20:10 +0200 Subject: [PATCH] Revert "Check ForceNone (#2835)" (#2836) This reverts commit 824bf2f61c518a2461f43155c8ceb5cc6d432696. --- packages/page-staking/src/index.tsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/page-staking/src/index.tsx b/packages/page-staking/src/index.tsx index 41e51edef7..19c0719ff9 100644 --- a/packages/page-staking/src/index.tsx +++ b/packages/page-staking/src/index.tsx @@ -4,7 +4,7 @@ import { DeriveStakingOverview } from '@polkadot/api-derive/types'; import { AppProps as Props } from '@polkadot/react-components/types'; -import { ElectionStatus, Forcing } from '@polkadot/types/interfaces'; +import { ElectionStatus } from '@polkadot/types/interfaces'; import React, { useEffect, useMemo, useReducer, useState } from 'react'; import { Route, Switch } from 'react-router'; @@ -44,12 +44,9 @@ function StakingApp ({ basePath, className = '' }: Props): React.ReactElement(api.derive.staking.overview, []); - const isInElection = useCall(api.query.staking.eraElectionStatus, [], { + const isInElection = useCall(api.query.staking?.eraElectionStatus, [], { transform: (status: ElectionStatus) => status.isOpen }); - const isPOA = useCall(api.query.staking.forceEra, [], { - transform: (forcing: Forcing) => forcing.isForceNone - }); const [nominators, dispatchNominators] = useReducer(reduceNominators, [] as string[]); const hasQueries = useMemo( (): boolean => @@ -145,7 +142,7 @@ function StakingApp ({ basePath, className = '' }: Props): React.ReactElement