fix SummaryBar (#1981)
This commit is contained in:
parent
b2b4f5e281
commit
2b0e46e0eb
@ -3,7 +3,7 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { AccountId } from '@polkadot/types/interfaces';
|
||||
import { DeriveStakingValidators } from '@polkadot/api-derive/types';
|
||||
import { BareProps, I18nProps } from '@polkadot/react-components/types';
|
||||
|
||||
import BN from 'bn.js';
|
||||
@ -19,7 +19,7 @@ interface Props extends BareProps, I18nProps {
|
||||
balances_totalIssuance?: BN;
|
||||
chain_bestNumber?: BN;
|
||||
chain_bestNumberLag?: BN;
|
||||
staking_validators?: AccountId[];
|
||||
staking_validators?: DeriveStakingValidators;
|
||||
}
|
||||
|
||||
function SummaryBar ({ balances_totalIssuance, chain_bestNumber, chain_bestNumberLag, staking_validators }: Props): React.ReactElement<Props> {
|
||||
@ -35,14 +35,14 @@ function SummaryBar ({ balances_totalIssuance, chain_bestNumber, chain_bestNumbe
|
||||
{systemChain}
|
||||
</Bubble>
|
||||
<Bubble icon='code' label='runtime'>
|
||||
{api.runtimeVersion.implName} v{api.runtimeVersion.implVersion}
|
||||
{api.runtimeVersion.implName} v{api.runtimeVersion.implVersion.toString(10)}
|
||||
</Bubble>
|
||||
<Bubble icon='bullseye' label='best #'>
|
||||
{formatNumber(chain_bestNumber)} ({formatNumber(chain_bestNumberLag)} lag)
|
||||
</Bubble>
|
||||
{staking_validators && (
|
||||
<Bubble icon='chess queen' label='validators'>{
|
||||
staking_validators.map((accountId, index): React.ReactNode => (
|
||||
staking_validators.validators.map((accountId, index): React.ReactNode => (
|
||||
<IdentityIcon key={index} value={accountId} size={20} />
|
||||
))
|
||||
}</Bubble>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user