This PR adds a few new features on top the previous vote modal PR:
Add progress steps: the modal will reflect the various vote process
Add ability to share the vote
Refactor the pending transaction in UI store, to detect failing tx
Refactor the pendingVote, to show the vote form again if the tx has failed, instead of the "You have already voted" message
How to test
Vote on an offchain proposal
You should see the various steps of the progress modal: test with multiple scenario (vote and confirm the tx, vote but reject the tx signature, trying to vote with no vp)
Vote on an onchain proposal
You should see one additional step while confirming the tx
On tx confirmation, you should see the success step, else will see the error step
When a tx fail, it should also remove the vote from the pendingVotes list, so it shows the form to vote again
To-Do
[x] Refactor pendingVote to handle tx failure
[x] Pending transaction fetcher is unreliable, as it's assume it's always the latest. Find another way to get the tx from the vote itself instead of assuming
[x] Vote modal should open on the "confirming" step if the vote is still confirming
[x] Confirm sharing message is correct on all x
[ ] Confirm sharing message is correct on all lens (link not opening the compose editor)
[x] Confirm sharing message is correct on all warpcast
Summary
Closes: #386
This PR adds a few new features on top the previous vote modal PR:
How to test
pendingVotes
list, so it shows the form to vote againTo-Do