ABW-3715 Disable Accounts with Insufficient Funds #1291
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Jira ticket: ABW-3715
Description
When selecting fee payer accounts, we already filter out accounts with no XRD at all. We should also disable ones that don't have enough to pay the transfer and the fee. And show the "Insufficient balance" error.
Notes
Additional notes.
How to test
Make sure there is an account with a very small but non-zero XRD balance, say 0.1
Make a transfer in the app, from another account
Try to change the fee payer
-> On the selection screen, the low balance account should be disabled for selection
Also try transferring an amount of XRD from an account that is just above the balance of that account. Enough to cover the transfer (or the fee alone), but not the fee AND the transfer.
-> Should lead to same result
Screenshot
PR submission checklist