-
Notifications
You must be signed in to change notification settings - Fork 19
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
Prevent finalizing a Task with insufficient domain pot balance #2030
Prevent finalizing a Task with insufficient domain pot balance #2030
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, nice improvement 🙌
Just one quick thing with typings!
dc25d7b
to
25f5f25
Compare
Yup, took your advice on the domains balances logic and now works like a charm. Thanks! This is ready for another look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heck yes! ✅
Great stuff
25f5f25
to
cce5935
Compare
Description
This PR fixes the bad UX pattern where a task can be finalized with a payout larger then available funds in the domain pot.
The user would be allowed to press Finalize Task, generate the transaction, sign it, but as expected, the transaction would fail (with a rather cryptic error message)
The fix for this implies calculating the that task payout relative to the domain pot balance, and in the funds are not sufficient, show a dialog informing the user of that fact, otherwise proceed as nromal.
New stuff
TaskFinalize
componentTaskFinalizeDialog
dialog componentChanges
Task
to extract the finalize button into it's own component (TaskFinalize
)Task
to use theROOT_DOMAIN
constant, rather then the number1
Demo
Resolves #1952
Resolves #1997