Non-disabled on POA states (#1960)
This commit is contained in:
parent
9893890367
commit
a345d919c1
@ -41,7 +41,7 @@ interface StakingState {
|
||||
isNominatorMe: boolean;
|
||||
nominators: [AccountId, Balance][];
|
||||
sessionId?: string;
|
||||
stashId?: string;
|
||||
stashId: string;
|
||||
}
|
||||
|
||||
const WITH_VALIDATOR_PREFS = { validatorPayment: true };
|
||||
@ -56,7 +56,8 @@ function Address ({ address, authorsMap, className, defaultName, filter, hasQuer
|
||||
balanceOpts: { bonded: true },
|
||||
hasNominators: false,
|
||||
isNominatorMe: false,
|
||||
nominators: []
|
||||
nominators: [],
|
||||
stashId: address.toString()
|
||||
});
|
||||
|
||||
useEffect((): void => {
|
||||
@ -88,17 +89,15 @@ function Address ({ address, authorsMap, className, defaultName, filter, hasQuer
|
||||
),
|
||||
nominators,
|
||||
sessionId: nextSessionIds && nextSessionIds[0]?.toString(),
|
||||
stashId: stashId?.toString()
|
||||
stashId: (stashId || address).toString()
|
||||
});
|
||||
}
|
||||
}, [stakingInfo]);
|
||||
|
||||
useEffect((): void => {
|
||||
setHasActivity(
|
||||
recentlyOnline && recentlyOnline[stashId || '']
|
||||
? recentlyOnline[stashId || ''].isOnline
|
||||
: true
|
||||
);
|
||||
if (recentlyOnline && stashId && recentlyOnline[stashId]) {
|
||||
setHasActivity(recentlyOnline[stashId].isOnline);
|
||||
}
|
||||
}, [recentlyOnline, stashId]);
|
||||
|
||||
if ((filter === 'hasNominators' && !hasNominators) ||
|
||||
@ -110,18 +109,6 @@ function Address ({ address, authorsMap, className, defaultName, filter, hasQuer
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!stashId) {
|
||||
return (
|
||||
<AddressCard
|
||||
className={className}
|
||||
defaultName={defaultName}
|
||||
isDisabled
|
||||
value={address}
|
||||
withBalance={false}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
const lastBlockNumber = authorsMap[stashId];
|
||||
const isAuthor = lastAuthors && lastAuthors.includes(stashId);
|
||||
const _onFavorite = (): void => toggleFavorite(stashId);
|
||||
@ -276,7 +263,6 @@ export default translate(
|
||||
}
|
||||
|
||||
.staking--Address-info {
|
||||
/* Small additional margin to take care of validator highlights */
|
||||
margin-right: 0.25rem;
|
||||
text-align: right;
|
||||
|
||||
|
||||
@ -9,7 +9,8 @@ import { api } from './Api';
|
||||
|
||||
const ALLOWED_CHAINS = [
|
||||
'0x3fd7b9eb6a00376e5be61f01abb429ffb0b104be05eaff4d458da48fcd425baf', // Kusama CC1
|
||||
'0xe3777fa922cafbff200cadeaea1a76bd7898ad5b89f7848999058b50e715f636' // Kusama CC2
|
||||
'0xe3777fa922cafbff200cadeaea1a76bd7898ad5b89f7848999058b50e715f636', // Kusama CC2
|
||||
'0xb0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe' // Kusama CC3
|
||||
];
|
||||
|
||||
let ledger: Ledger | null = null;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user