Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Ignore meta.deleted for account name display
Browse files Browse the repository at this point in the history
  • Loading branch information
jacogr committed Dec 7, 2016
1 parent f758610 commit 5bdb6e4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
17 changes: 8 additions & 9 deletions js/src/redux/providers/personalActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,17 @@ export function personalAccountsInfo (accountsInfo) {

Object.keys(accountsInfo || {})
.map((address) => Object.assign({}, accountsInfo[address], { address }))
.filter((account) => account.uuid || !account.meta.deleted)
.forEach((account) => {
if (account.uuid) {
accounts[account.address] = account;
} else if (!account.meta.deleted) {
if (account.meta.wallet) {
account.wallet = true;
wallets[account.address] = account;
} else if (account.meta.contract) {
contracts[account.address] = account;
} else {
contacts[account.address] = account;
}
} else if (account.meta.wallet) {
account.wallet = true;
wallets[account.address] = account;
} else if (account.meta.contract) {
contracts[account.address] = account;
} else {
contacts[account.address] = account;
}
});

Expand Down
2 changes: 1 addition & 1 deletion js/src/ui/IdentityName/identityName.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class IdentityName extends Component {
render () {
const { address, accountsInfo, tokens, empty, name, shorten, unknown, className } = this.props;
const account = accountsInfo[address] || tokens[address];
const hasAccount = account && (!account.meta || !account.meta.deleted);
const hasAccount = account && (account.uuid || !account.meta || !account.meta.deleted);

if (!hasAccount && empty) {
return null;
Expand Down

0 comments on commit 5bdb6e4

Please sign in to comment.