-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small comments.
One issue: when editing a Vault meta data, the second new password input doesn't have to have the same value as the first one.
One question (outside of this PR): is there a plan on being able to delete a Vault?
vaultStore = VaultStore.get(this.context.api); | ||
|
||
componentWillMount () { | ||
this.vaultStore.loadVaults(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't it be loaded only once (the Vault Store) when the app starts ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason it is done here is to ensure we have the current info. It is loaded already at this point, basically a refresh if/when it was changed outside of the window. (It should be ok, but rather safe than sorry)
js/src/modals/EditMeta/editMeta.js
Outdated
<InputAddress | ||
allowCopy={ false } | ||
allowInvalid | ||
disabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
readOnly
?
class VaultMeta extends Component { | ||
static propTypes = { | ||
newError: PropTypes.func.isRequired, | ||
vaultStore: PropTypes.object.isRequired |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the VaultStore
passed as a prop here, and not in the EditMeta
component?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically not needed until it is needed, so don't want to pull it in in the parent.
Even where the info is displayed on the Account Header, this is still the case - all the required info is already available as part of meta to render the icon.
In the case of VaultMeta it gets called from ~/views/Vaults
so already available, no need to create.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But isn't it a Singleton? The instance is saved in memory, so there's no need to re-create it, right? Just seems unbalanced to have the two approaches. No big deal though
defaultMessage='close' | ||
/> | ||
} | ||
onClick={ this.onClose } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this has been discussed earlier, but I think that at least for new modals using the Portal, we shouldn't add this useless Close
button
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this point it is done for the sake of consistency :(
onClose: PropTypes.func.isRequired, | ||
onSelect: PropTypes.func.isRequired, | ||
selected: PropTypes.string, | ||
vaultStore: PropTypes.object.isRequired |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above regarding the vaultStore
as a prop
|
||
return ( | ||
<div className={ styles.vault }> | ||
<IdentityIcon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Matter of personal taste here, but I find the Identity Icon a bit big here
Fixed the password bug. As for your question - would like to see both rename & delete. |
Have some errors in the console when modifying the password (in
|
Last comments:
|
Extending the work from https://github.com/ethcore/parity/pull/4446, working towards completing https://github.com/ethcore/parity/issues/3501
Includes & requires (there should be merged first, relevant parts in here) -
SelectionList component introduced in https://github.com/ethcore/parity/pull/4639 (used for selection of vaults)Future work -
Edit vault -
Account Vault info -
Edit Meta -