// Copyright 2017-2021 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 import type { DeriveStakingAccount } from '@polkadot/api-derive/types'; import { useApi } from './useApi'; import { useCall } from './useCall'; export function useStakingInfo (accountId: string | null): DeriveStakingAccount | undefined { const { api } = useApi(); return useCall(api.derive.staking?.account, [accountId]); }