Closed nibhar closed 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 see now that you only disable the blacklisted addresses, and not hide them. In that case I would name the prop disabledAddresses
.
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.
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.