Fix vote lock display, conditionally disable recovery, improve modal #4840
Labels
enhancement
New feature or request
scope:app/common
Features related to the App or common components
Hello! Today i want to draw attention to three more or less cosmetic bugs that can lead to confusion.
When a user chooses to recover a vote lock the transaction fails.
Below the more recent vote by the same stake for a different candidate in the last election:
![recentvote](https://private-user-images.githubusercontent.com/31551045/324262382-2f5b9457-2ed9-488f-bbf1-afa48da55017.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0MjAxNzcsIm5iZiI6MTczOTQxOTg3NywicGF0aCI6Ii8zMTU1MTA0NS8zMjQyNjIzODItMmY1Yjk0NTctMmVkOS00ODhmLWJiZjEtYWZhNDhkYTU1MDE3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDA0MTExN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJmYjJhN2RkYzVjZDIwYjQxNDYzOTZhODg3M2NhYzU0YmRiM2JkMjU4NGQyMjlmZWQ0ZDI1M2YwZDI1ZjhkMDImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.QnIiB1o2IgSJrif8WgKwTQZln5-GR2H6TGkoSIgNSO4)
Solution
To fix the above i suggest the following changes:
Recover
button is disabled if the vote was for a winner in the last election. Allow recovering in all other cases (which should work according to the fix applied 2 years ago)."The stake is currently locked due to a recent election."
. It's possible that other cases may apply and should be mentioned as well but it's unlikely since @Ondrata mentioned in above issue that this specific error is only raised for failedcan_unlock_vote_stake
([USERSNAP] Show why transaction failed. #2835 Display error code in the error modal #2621).Tx details
For reference all displayed information
The text was updated successfully, but these errors were encountered: