Fix errant bonded call (with invalid address) (#925)
This commit is contained in:
parent
ba0d276ae3
commit
37ba6f0338
@ -93,7 +93,6 @@ export default translate(
|
||||
'derive.chain.bestNumberLag',
|
||||
'query.balances.totalIssuance',
|
||||
'query.session.validators',
|
||||
'query.staking.intentions',
|
||||
'rpc.chain.getRuntimeVersion',
|
||||
'rpc.system.chain',
|
||||
'rpc.system.name',
|
||||
|
||||
@ -148,8 +148,7 @@ export default withMulti(
|
||||
withCalls<Props>(
|
||||
'derive.staking.controllers',
|
||||
'query.session.validators',
|
||||
'query.staking.nominators',
|
||||
['derive.staking.intentionsBalances', { propName: 'balances' }]
|
||||
'query.staking.nominators'
|
||||
),
|
||||
withObservable(accountObservable.subject, { propName: 'allAccounts' })
|
||||
);
|
||||
|
||||
@ -8,6 +8,7 @@ import React from 'react';
|
||||
import { AccountId, AccountIndex, Address, Balance } from '@polkadot/types';
|
||||
import { Nonce } from '@polkadot/ui-reactive';
|
||||
import { withCalls } from '@polkadot/ui-api';
|
||||
import BaseIdentityIcon from '@polkadot/ui-identicon';
|
||||
|
||||
import { classes, toShortAddress } from './util';
|
||||
import BalanceDisplay from './Balance';
|
||||
@ -174,11 +175,17 @@ class AddressSummary extends React.PureComponent<Props> {
|
||||
const [_accountId] = accounts_idAndIndex;
|
||||
const accountId = (_accountId || value || '').toString();
|
||||
|
||||
// Since we do queries to storage in the wrapped example, we don't want
|
||||
// to follow that route if we don't have a valid address.
|
||||
const Component = accountId
|
||||
? IdentityIcon
|
||||
: BaseIdentityIcon;
|
||||
|
||||
return (
|
||||
<IdentityIcon
|
||||
<Component
|
||||
className={className}
|
||||
size={size || identIconSize}
|
||||
value={accountId || DEFAULT_ADDR}
|
||||
value={accountId}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user