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

Politeia: Migrate to new API. #3495

Merged
merged 14 commits into from
Jul 13, 2021
Merged

Politeia: Migrate to new API. #3495

merged 14 commits into from
Jul 13, 2021

Conversation

amass01
Copy link
Member

@amass01 amass01 commented Jun 7, 2021

Closes #3391.

Note: The new API supports paginated vote inventory calls, I decided to keep the pagination work to a separate
future PR to try maintain incermental easily reviewable PRs.

Testing against local PI

To run against local PI instance add the following commented out code:

app/middleware/politeiaapi.js Outdated Show resolved Hide resolved
@amass01 amass01 force-pushed the piroutes branch 4 times, most recently from 5ea46ae to d052f75 Compare June 13, 2021 02:10
@amass01 amass01 changed the title [wip] Politeia: Migrate to new API. Politeia: Migrate to new API. Jun 24, 2021
@amass01 amass01 marked this pull request as ready for review June 24, 2021 22:36
@matheusd
Copy link
Member

Is the testnet Pi instance already updated and sufficient to test this or do we still need to run a local instance to test?

@amass01
Copy link
Member Author

amass01 commented Jun 28, 2021

hrmm looks like https://test-proposals.decred.org got some test data on it, maybe we can start vote on a proposal to test voting as well.

cc: @alexlyp @lukebp

@lukebp
Copy link
Member

lukebp commented Jun 28, 2021

Copy link
Member

@matheusd matheusd left a comment

Choose a reason for hiding this comment

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

Got a "type error: cannot read property length of undefined" when loading the proposal on discussion in testnet (error page is looking nice, btw).

Accessing the proposal that is currently voting also occasionally fails. If I go to the "Finished Voting" tab, open a proposal, then go back to the "Voting" tab, the proposal opens. But if I then go to the "In Discussion" tab, try to open the proposal (this fails) and go back to the "Voting" tab, the under voting proposal will now not open.

I purchased tickets but I guess I didnt purchase them fast enough to be able to cast a vote on the prop, so I didnt test that.

app/helpers/politeia.js Outdated Show resolved Hide resolved
app/constants/governance.js Show resolved Hide resolved
app/constants/governance.js Show resolved Hide resolved
app/main_dev/paths.js Show resolved Hide resolved
app/helpers/politeia.js Outdated Show resolved Hide resolved
app/helpers/politeia.js Outdated Show resolved Hide resolved
app/helpers/politeia.js Outdated Show resolved Hide resolved
app/helpers/politeia.js Outdated Show resolved Hide resolved
app/helpers/politeia.js Outdated Show resolved Hide resolved
@amass01
Copy link
Member Author

amass01 commented Jun 30, 2021

@matheusd Fixed the in discussion edge case you were hitting. tested navigating to voting after visiting in discussion
and looks like it's working now as well.

will be looking into the other issue with the voting prop.

@amass01
Copy link
Member Author

amass01 commented Jun 30, 2021

@matheusd all set for another round of review.

@lukebp I have also missed the voting on last proposal you created, bought dozen of
tickets and they should be eligible to vote at the moment, could you please start a vote on another proposal ?

@amass01
Copy link
Member Author

amass01 commented Jun 30, 2021

Just noticed that by default author username isn't displayed when proposals list is loaded,
it shows up only when user clicks on a proposal to see it's details.

image

@amass01
Copy link
Member Author

amass01 commented Jun 30, 2021

Just noticed that by default author username isn't displayed when proposals list is loaded,
it shows up only when user clicks on a proposal to see it's details.

image

Fixed.

Copy link
Member

@matheusd matheusd left a comment

Choose a reason for hiding this comment

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

Working fine (minus voting in active proposal which I couldn't test)

@alexlyp alexlyp merged commit 3a6178a into decred:master Jul 13, 2021
@amass01 amass01 deleted the piroutes branch July 13, 2021 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate to new politeia API
4 participants