-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
feat: show a list of accounts and their balances before selecting an account #4771
Conversation
Blocked by #4718 |
## Description Unused dependency check is failing as nightly version that we use for that step is too old for fuels-program v0.44 dependency which is being added in a separate PR. (failing PR: #4771)
941b21a
to
36cf2ed
Compare
I am not sure what is causing it but mdbook documentor starting throwing issues while compiling with these changes and changes here is totally independent from each other but to make the compiler happy i am fixing it with this PR as well. |
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.
Looks good, just left a comment to open an issue for the todo if one hasn't been opened already.
Forgot to reply! sorry for that. These two are already open: |
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.
Nice work! A couple suggestions/questions:
- It would be nice to align the amount underneath the "Amount" heading, so the first digit of the amount is directly underneath "A"
- Have you tested it with multiple accounts? I'm curious what the TUI looks like in that case.
- What happens in the case where there are no accounts? Does it show the same message as
total_balance == 0
? We should probably show a different error message for that case.
Co-authored-by: Sophie Dankel <47993817+sdankel@users.noreply.github.com>
If there are no wallet to be used a different error is returned sway/forc-plugins/forc-client/src/util/tx.rs Line 155 in 6015013
And there will always be an account. If there is a wallet. Once i fix #4861.
Again this is not something I can do here with this PR as this is how forc-wallet prints it. If you feel like we should change let's change it there. |
It would be cleaner to have the alignment as Sophie mentioned. Would you mind opening an issue for this in forc-wallet so we can add this in a future PR? |
Opened this one 🙌 will tackle it right away once we clear urgent stuff cc @sdankel @JoshuaBatty |
Description
closes #4757.
closes #4756.
This PR adds balance query capabilities to forc-deploy so that users can select the desired account to use before signing their transaction. Current output looks like:
Also now forc-deploy throws an error for empty accounts:
Once we integrate a nice TUI selection library the output could be more interactive with up and down keys etc.
Checklist
Breaking*
orNew Feature
labels where relevant.