Skip to content
This repository has been archived by the owner on Jan 14, 2022. It is now read-only.

Fix voters list on delegate page - Closes #502 #515

Merged
merged 7 commits into from
Apr 5, 2018
Merged

Conversation

lsilvs
Copy link
Contributor

@lsilvs lsilvs commented Apr 3, 2018

What was the problem?

Voters list wasn't showing on delegate page

How did I fix it?

I've fixed the getVoters calling it recursively until all voters are returned. That was required as core api limits the response to 100 items.
I also added an issue suggesting we improve the UI for this list adding pagination.

How to test it?

Assuming you are using test data, access delegate/3038510178697972178L and you should see the list with 2 voters

Review checklist

@lsilvs lsilvs self-assigned this Apr 3, 2018
@lsilvs lsilvs requested a review from MichalTuleja April 3, 2018 17:26
@lsilvs lsilvs added this to New Issues in Sprint Board 02-04-18 via automation Apr 3, 2018
@lsilvs lsilvs added this to Open Issues in Version 2.0.0 via automation Apr 3, 2018
@MichalTuleja MichalTuleja moved this from New Issues to OpenPRs in Sprint Board 02-04-18 Apr 4, 2018
return cb(null, account);
});
account.voters = [];
return this.getVotersCall(account, 100, 0, cb);
Copy link
Contributor

Choose a reason for hiding this comment

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

We should avoid using literals as parameters. The literals above should be replaced with defined variables or constants. ex. const limit = 100 and reference to the limit in the function params.

@MichalTuleja MichalTuleja merged commit 855467c into 2.0.0 Apr 5, 2018
Version 2.0.0 automation moved this from Open Issues to Merged PRs Apr 5, 2018
Sprint Board 02-04-18 automation moved this from OpenPRs to Merged PRs Apr 5, 2018
@MichalTuleja MichalTuleja deleted the 502-voters-list branch April 5, 2018 16:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
Sprint Board 02-04-18
  
Merged PRs
Version 2.0.0
  
Merged PRs
Development

Successfully merging this pull request may close these issues.

None yet

2 participants