Show all accounts on Topbar (#7498)
* Show all accounts in the top bar * Update to latest js-shared * Add comments * Update refs and remove dapp-dapp-accounts
This commit is contained in:
committed by
Jaco Greeff
parent
a553485bbd
commit
c6b0db61e7
@@ -50,10 +50,10 @@ class DefaultAccount extends Component {
|
||||
}
|
||||
|
||||
render () {
|
||||
const { accounts, defaultAccount: defaultAddress } = this.props.accountStore;
|
||||
const defaultAccount = accounts.find(({ address }) => address === defaultAddress);
|
||||
const { allAccounts, defaultAccount: defaultAddress } = this.props.accountStore;
|
||||
const defaultAccount = allAccounts.find(({ address }) => address === defaultAddress);
|
||||
|
||||
if (!accounts || !defaultAccount) { return null; }
|
||||
if (!allAccounts || !defaultAccount) { return null; }
|
||||
|
||||
return (
|
||||
<Popup
|
||||
@@ -68,15 +68,15 @@ class DefaultAccount extends Component {
|
||||
}
|
||||
content={
|
||||
<div>
|
||||
<List relaxed='very' selection className={ [styles.list, styles.isDefault, accounts.length > 1 && styles.hasOtherAccounts].join(' ') }>
|
||||
<List relaxed='very' selection className={ [styles.list, styles.isDefault, allAccounts.length > 1 && styles.hasOtherAccounts].join(' ') }>
|
||||
<AccountItem
|
||||
isDefault
|
||||
account={ defaultAccount }
|
||||
/>
|
||||
</List>
|
||||
{accounts.length > 1 &&
|
||||
{allAccounts.length > 1 &&
|
||||
<List relaxed='very' selection className={ styles.list } divided>
|
||||
{accounts
|
||||
{allAccounts
|
||||
.filter(({ address }) => address !== defaultAddress)
|
||||
.map(account => (
|
||||
<AccountItem
|
||||
|
||||
Reference in New Issue
Block a user