Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make validators an Object instead of array #1882

Closed
fedekunze opened this issue Jan 24, 2019 · 4 comments
Closed

make validators an Object instead of array #1882

fedekunze opened this issue Jan 24, 2019 · 4 comments

Comments

@fedekunze
Copy link
Contributor

we should make delegates.delegates an object: {address: validatorObject}

Originally posted by @fedekunze in #1860

@jbibla
Copy link
Collaborator

jbibla commented Jan 25, 2019

can you include an explanation of why?

thankyou.thankyou

@faboweb
Copy link
Collaborator

faboweb commented Jan 28, 2019

We are doing this for most of the look up lists as it is easier to read querying for one element in this way:

Array (list):

list.find(item => item.key === keyIAmLookingFor)

Object (dictionary):

dictionary[keyIAmLookingFor]

@faboweb
Copy link
Collaborator

faboweb commented Jan 28, 2019

See also #1708

@stale
Copy link

stale bot commented Aug 23, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Aug 23, 2019
@stale stale bot closed this as completed Aug 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants