Add historyDepth to warmUp (#3058)

This commit is contained in:
Jaco Greeff 2020-06-26 19:31:09 +02:00 committed by GitHub
parent a1ac8479f4
commit e81879d168
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,10 +11,11 @@ function WarmUp (): React.ReactElement {
const registrars = useCall<unknown>(isApiReady && api.query.identity?.registrars, []);
const staking = null; // useCall<unknown>(isApiReady && api.derive.staking?.overview, []);
const issuance = useCall<unknown>(isApiReady && api.query.balances?.totalIssuance, []);
const historyDepth = useCall<unknown>(api.query.staking?.historyDepth, []);
const [hasValues, setHasValues] = useState(false);
useEffect((): void => {
setHasValues(!!indexes || !!issuance || !!registrars || !!staking);
setHasValues(!!historyDepth || !!indexes || !!issuance || !!registrars || !!staking);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);