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

Disable withdrawal when user doesn't have any delegations #2378

Closed
fedekunze opened this issue Mar 28, 2019 · 7 comments · Fixed by #2590
Closed

Disable withdrawal when user doesn't have any delegations #2378

fedekunze opened this issue Mar 28, 2019 · 7 comments · Fixed by #2590
Labels
bug 🐛 issues related to unhandled errors in the code that need to be fixed

Comments

@fedekunze
Copy link
Contributor

Describe the bug

Attempting to do a withdrawal without delegations renders the following error on the modal:

Withdrawal failed: JSON Missing msgs.

To Reproduce

  1. Sign in with an account with no delegations
  2. Click withdraw and try to submit the transaction

Expected behavior

Show a message that user needs to delegate to be able to withdraw.

@fedekunze fedekunze added the bug 🐛 issues related to unhandled errors in the code that need to be fixed label Mar 28, 2019
@jbibla
Copy link
Collaborator

jbibla commented Mar 29, 2019

how can a user do a withdrawal of zero? doesn't that mean we're not validating the form?

@fedekunze
Copy link
Contributor Author

there's no "form" we only display the total rewards as the message doesn't contain any amount field

@jbibla
Copy link
Collaborator

jbibla commented Mar 30, 2019

ah ok. so we should just show a message on the action modal when rewards = 0

@fedekunze
Copy link
Contributor Author

When delegations.length = 0

@jbibla
Copy link
Collaborator

jbibla commented Mar 30, 2019

ohhhhhhh. yeah. but also when rewards = 0 i guess.

@fedekunze
Copy link
Contributor Author

You get rewards on every block so I wouldn’t bother handling that case

@jbibla
Copy link
Collaborator

jbibla commented Mar 31, 2019

ah, i see what you're saying. i suppose we agree on what the outcome should be. i'll leave the implementation to you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 issues related to unhandled errors in the code that need to be fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants