DigixGlobal / governance-ui-components

Governance UI reusable components library
Other
3 stars 2 forks source link

[HOTFIX] Remove fetching of proposal details from info-server and update subscription handling #340

Closed mandres-digix closed 5 years ago

mandres-digix commented 5 years ago

There is a caching bug where users will see a different proposal load on the page after viewing. The bug is difficult to catch since it's intermittent and hard to replicate.

This diff makes sure we're only using the GraphQL data for viewing the proposal details, and eliminate any bugs that might occur because we're loading the proposal details from the info-server (which might have been the source of the outdated cached data).

This also makes sure that we only update the component if the ProposalDetails props has the same proposal id as the one in the URL. It's possible that it could be a mishandling of the subscription, where we accidentally update the proposal page when an action has been done by the user, without checking if we are on the correct proposal.

Test Plan