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

Give accounts precedence over address_book entries #3732

Merged
merged 3 commits into from
Dec 8, 2016

Conversation

jacogr
Copy link
Contributor

@jacogr jacogr commented Dec 7, 2016

@jacogr jacogr added A0-pleasereview 🤓 Pull request needs code review. M4-core ⛓ Core client code / Rust. M7-ui labels Dec 7, 2016
@@ -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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think isAccount would be more intuitive here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hasAccount is perfectly acceptable (as it is in the current codebase) since it indicates that the account is in the acocuntsInfo list.

Wontfix.

Copy link
Contributor Author

@jacogr jacogr Dec 7, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition https://github.com/ethcore/parity/pull/3739 removes the line (in this specific file as well as all the others that has the same hasAccount check & naming completely)

@coveralls
Copy link

Coverage Status

Coverage remained the same at 85.907% when pulling 5bdb6e4 on jg-duplicate-accounts into be90245 on master.

@@ -57,7 +57,7 @@ impl<C: 'static> ParityAccounts for ParityAccountsClient<C> where C: MiningBlock
let info = try!(store.accounts_info().map_err(|e| errors::account("Could not fetch account info.", e)));
let other = store.addresses_info().expect("addresses_info always returns Ok; qed");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated but this proof seems a bit strange

@rphmeier
Copy link
Contributor

rphmeier commented Dec 7, 2016

Rust side LGTM

@gavofyork gavofyork added A5-grumble 🔥 Pull request has minor issues that must be addressed before merging. and removed A0-pleasereview 🤓 Pull request needs code review. labels Dec 7, 2016
@gavofyork
Copy link
Contributor

marked grumble from @derhuerst comment

@derhuerst
Copy link
Contributor

Will be removed anyway.

@derhuerst derhuerst added A8-looksgood 🦄 Pull request is reviewed well. and removed A5-grumble 🔥 Pull request has minor issues that must be addressed before merging. labels Dec 8, 2016
@rphmeier rphmeier merged commit de4715b into master Dec 8, 2016
@rphmeier rphmeier deleted the jg-duplicate-accounts branch December 8, 2016 11:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants