Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: catch errors and inform user of the need to register voting rights [LW-11518] #3237

Conversation

DominikGuzei
Copy link
Member

@DominikGuzei DominikGuzei commented Nov 11, 2024

Properly handle the case when a Conway era wallet that has staking rewards but did not participate in governance (register voting rights) yet can't send transactions due to blocked staking rewards.

Please note: This PR is based on #3229 to work with the latest cardano-node and cardano-wallet which needs to be merged first.

Screenshots

image

image

image

Todos

  • Catch the error from the node and show some message in the send tx confirm dialog
  • Disable the send button in the confirmation dialog if this error happened
  • Link to the governance tab from the error link

this.actions.dialogs.closeActiveDialog.trigger();
this.sendMoneyRequest.reset();
this.goToWalletRoute(wallet.id);
try {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrapping this in a try catch block was necessary because otherwise it crashed Daedalus … im not sure how it worked with other types of errors though 🤔

@DominikGuzei DominikGuzei force-pushed the LW-11518-catch-errors-and-inform-user-of-the-need-to-register-voting-rights branch 3 times, most recently from e0742c4 to 4bd3820 Compare November 12, 2024 14:10
@DominikGuzei DominikGuzei marked this pull request as ready for review November 12, 2024 16:14
@DominikGuzei DominikGuzei force-pushed the LW-11518-catch-errors-and-inform-user-of-the-need-to-register-voting-rights branch 2 times, most recently from 77dac74 to c3a95a3 Compare November 12, 2024 17:19
Copy link
Contributor

@przemyslaw-wlodek przemyslaw-wlodek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job @DominikGuzei ! 🚀

@DominikGuzei
Copy link
Member Author

This PR needs to wait for #3229 to be merged (base branch)

Base automatically changed from chore/LW-11505-new-cardano-wallet to develop November 20, 2024 08:33
@DominikGuzei DominikGuzei changed the base branch from develop to feat/LW-11519-governance-voting-tab November 27, 2024 09:26
…tered voting rights yet [LW-11518]

Signed-off-by: Dominik Guzei <dominik.guzei@gmail.com>
@DominikGuzei DominikGuzei force-pushed the LW-11518-catch-errors-and-inform-user-of-the-need-to-register-voting-rights branch from c3a95a3 to 58bcd21 Compare November 27, 2024 10:14
@DominikGuzei
Copy link
Member Author

@szymonmaslowski @szymonmaslowski I rebased this PR on feat/LW-11519-governance-voting-tab and added the final translations (Japanese) so that we have everything in one place. I tested that the error link correctly redirects to the new governance tab. Feel free to merge after review 🙏

Copy link
Contributor

@szymonmaslowski szymonmaslowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GJ!

@szymonmaslowski szymonmaslowski merged commit 235216a into feat/LW-11519-governance-voting-tab Nov 27, 2024
5 checks passed
@szymonmaslowski szymonmaslowski deleted the LW-11518-catch-errors-and-inform-user-of-the-need-to-register-voting-rights branch November 27, 2024 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants