nimiq / vue-components

Vue component library for Nimiq ecosystem apps.
https://nimiq.github.io/vue-components/
Apache License 2.0
17 stars 4 forks source link

Add disabledAddresses to AccountList and AccountSelector. #66

Closed nibhar closed 4 years ago

nibhar commented 4 years ago

Offer the optional Prop blacklistedAddresses in AccountList and AccountSelector. They will see their first use in disabling the recipient address as the sender of a tx, as that would lead to an error terminating the request, which is not necessary.

sisou commented 4 years ago

This could also be solved by filtering the input to the component instead.

Further, I think 'blacklisted' is a hard word and I expected a security related blacklist when I first saw the title of this PR. I suggest a friendlier name, such as 'hiddenAddresses'.

sisou commented 4 years ago

I see now that you only disable the blacklisted addresses, and not hide them. In that case I would name the prop disabledAddresses.

nibhar commented 4 years ago

This could also be solved by filtering the input to the component instead.

Further, I think 'blacklisted' is a hard word and I expected a security related blacklist when I first saw the title of this PR. I suggest a friendlier name, such as 'hiddenAddresses'.

I do not have that association but I changed it, according to your second comment.

I had it as a filter from the caller of the component first. This way I feel has a nicer option of providing feedback to the user and also does not show him an incomplete list of his accounts where he might wonder where is favourite account went.