Fix deleteProposal() and missing PaymentAddress #178
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Abstract
This is a rather simple PR that fixes two critical bugs that can cause loss of funds and/or failure to submit or finalise a proposal on v1.1.0.
localProposals
were missingPaymentAddress
, leading torenderProposals
failing, causing the entire Governance Dashboard to fail to render, and cascade errors up the stack.deleteProposal()
was also badly written: it filtered proposals that were NOT the target proposal, it had atxid
typo usingtxId
which never existed, and it was just generally unreadable, I've rewritten the function to fix the bugs and be far easier to review.Testing
To test this PR, it's suggested to attempt these user flows, or variations of these:
If all of the above, and variations of such; go without error, then things are looking bright!
What does this PR address?
It addresses two critical bugs that could cause loss of funds, as well as complete failure of MPW's Governance and Proposal Submission Dashboard, these were encountered by a mainnet user, and were verified this morning by myself on testnet.