-
Notifications
You must be signed in to change notification settings - Fork 259
[Feature] Warning Screen for High Tx Fees #722
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
base: dev
Are you sure you want to change the base?
[Feature] Warning Screen for High Tx Fees #722
Conversation
adee27d to
db51097
Compare
|
Ideally this PR would include a flow test for the scenario that triggers this new View. But unfortunately we are missing a flow test for other similar psbt warning screens (e.g. "full spend"), so we don't have an easy copy-paste flow test to start from. As noted elsewhere, I DO think we should get a unit test on the total output value calcs. So:
|
db51097 to
9032830
Compare
|
Hey @kdmukai, Thanks a lot for the review! I've updated the PR to incorporate all your suggestions:
As for the flow test for this screen (and other PSBT warning views like "full spend"), it probably makes more sense to tackle that in a follow-up PR rather than squeeze it into this one. I can take that up once this is merged. |
9032830 to
7183e6b
Compare
7183e6b to
3cb772b
Compare
|
Hey @kdmukai, Thanks again for your quick review! I've updated the PR with your suggestions:
While I was working on these updates, I realized that it could be helpful to introduce a new variable in Let me know your thoughts on this approach! If it sounds good, perhaps I'll start to work on that on another branch! |
3cb772b to
7cb17ad
Compare
|
tACK. I reviewed the code but would love to get some additional eyes (beyond Keith and I) on this one since its code changes around parsing the PSBT amounts and displaying them to the user. I've also not been consistent about the PR expectation should be around including an updated messages.pot files when new text is included that needs translation. So when/if this PR gets merged it would be knowing that the messages.pot would still need to be regenerated/extracted for the dev branch. |
|
ACK tested as of 8910071 on Raspberry Pi Manual OS. You could take it one step further. Sparrow displays a visual warning for the fee in the PSBT overview. I propose using the same approach here, perhaps by coloring the fees red when they are too high in the The UI would look like this for the
Maybe even adding some kind of warning sing like Feel free to check or cherry-pick the modifications from my repo alvroble@4f01eec. |
|
Thanks @alvroble! That’s a great idea. I’ve updated the PR accordingly and added you as a co-author on the commit. If the fee is high, both I also moved the high-fee check into its own function in |
86dbe4f to
8a57621
Compare
|
Thanks @Chaitanya-Keyal!! Now it looks like this: |
|
I've updated the tests following the addition of the new, exhaustive Also, I’ve reworded the warning to use "transaction" instead of "PSBT", in line with the recent changes that do the same. PR description has the updated screenshots. |
358182e to
da3a72c
Compare
8becaf7 to
e16bbc6
Compare
|
@easyuxd would you review the change in this PR? I'm interested in your thoughts on adding a new warning screen for a high transaction fee and the visual indications around having a high fee. |
|
Thanks for tagging me, @newtonick. I think this warning screen is a useful UX improvement, @Chaitanya-Keyal. I would recommend changing the message type from “Warning” to “Dire Warning.” This was a recent addition, I new message type I introduced that is more severe than a warning but not an error, and it encompasses this “high-attention / loss of funds” use case: https://github.com/easyuxd/seedsigner-ux-guidelines?tab=readme-ov-file#dire-warning I would also recommend changing the “fee(!)” label color to this DIRE_WARNING_COLOR to match. |
ef17c71 to
aca9d21
Compare
|
Thanks @easyuxd! I've updated the view to use |
|
@Chaitanya-Keyal Thank you, looks great! ACK -- Given the current experience, "Caution" seems as consistent a title as any. |
aca9d21 to
ac5c016
Compare
ac5c016 to
6a29d38
Compare



Description
This PR introduces a warning screen that appears before the PSBT math screen if the transaction includes unusually high fees. The goal is to ensure the user is explicitly made aware of any excessive fees before proceeding to sign the transaction.
Fixes #721
Warning Condition
The warning is shown when:
New Warning Screen:
Visual Warning in PSBT Flow Views
This pull request is categorized as a:
Checklist
pytestand made sure all unit tests pass before sumbitting the PRIf you modified or added functionality/workflow, did you add new unit tests?
The warning screen doesn’t currently apply to any of the existing test PSBT flows. I also noticed there aren’t tests for similar warnings (e.g. Full Spend), so figured it's not needed here either. Do let me know if a test needs to be added!
I have tested this PR on the following platforms/os: