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
[VDG] Simplify insufficient balance handling #9508
[VDG] Simplify insufficient balance handling #9508
Conversation
@yahiheb could you test this PR? |
Converted to draft, found a case that is not covered with the new solution. |
Ready for test and review @zkSNACKs/visual-design-group @yahiheb |
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.
tACK. Code is also okay, with minimal style observations in classes such as TransactionPreviewViewModel
, which are not directly related to this PR and hence will be treated separately.
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.
utACK.
Code looks fine. The BuildTransactionAsync
method is now more readable. Good work!
Please, see the comments regarding future improvements.
#9289 simplified a lot so the unused code can be removed.
I started with only removing the dead code but ended up with refactoring. So from now, only fee rate change can cause the exception. Previously it could be due to Pocket changing, total balance sending, and fee changing.
What is the new logic:
The user increases the transaction fee, selected amount cannot cover it anymore,
Test cases: