fix: dont show staking errors if the motion is completed #4248
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.
Description
This PR just cleans up the booleans a bit and makes sure that when a motion is completed, the errors don't show up.
Testing
leela
in browser 1. In browser 2, go tohttp://localhost:9091/go/planex
withDev wallet 4
. Name the user "has-nothing" or somethinghttp://localhost:9091/go/planex
withDev wallet 5
. Name the user "has-no-coins"6. Open up the URL
http://localhost:9091/invite/planex/<that_code>
ashas-nothing
andhas-no-coins
and join the colony7. As
leela
givehas-no-coins
some reputation inGeneral
. Go tohttp://localhost:3001/reputation/monitor/toggle
and runnpm run forward-time 1
in the terminal8. Create a mint tokens motion and fully stake it as
leela
. Don't finalize it!9. As
has-nothing
open up the motion and verify that you get the no reputation error.10. As
has-no-coins
open up the motion and verify that you get the not enough tokens error.11. Finalize the motion and open it as
has-nothing
andhas-no-coins
and verify that there is no errorDiffs
Changes 🏗
StakingStep
Resolves #3909