Skip to content
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

Refactoring and Stax UX revamp #270

Merged
merged 25 commits into from
Jul 12, 2024
Merged

Refactoring and Stax UX revamp #270

merged 25 commits into from
Jul 12, 2024

Conversation

bigspider
Copy link
Collaborator

@bigspider bigspider commented Jul 9, 2024

Implements a substantial refactoring of the signing flow, allowing to simplify the UX code and implement the new design guidelines for Stax/Flex, using the new standard NBGL use cases.

Incidentally, it also improves the signing performance by 1-2s on typical transactions (on Stax/Flex only).

The UX for the wallet policy registration is also reimplemented using NBGL, reducing the number of taps/swipes required. Simplified the language, switching from "wallet policy" to the more simple "account".

Unrelated to the other changes, also includes a fix for the formatting of certain OP_RETURN outputs (4b1f0e0).

Prepares the next release 2.2.4.

Closes: #265.

…using NBGL.

If a transaction has only a single non-change output, then we can fit the
"Amount", "To" and "Fees" fields in a single screen.
By caching the first few external outputs during output preprocessing, we can greatly
simplify the handling of the swap-related code, and the simplified UX for a single
external output.

This also allows to move all the swap-related checks in a single function.
Finally, by moving all the checks not related to user approval out of show_alerts
and display_output, we can omit calling these functions at all during swaps.
@bigspider bigspider changed the title Revamp Refactoring and Stax UX revamp Jul 9, 2024
int sign_result = sign_transaction(dc, &st, internal_inputs);

if (!G_swap_state.called_from_swap) {
ui_post_processing_confirm_transaction(dc, sign_result);

Check warning

Code scanning / CodeQL

Expression has no effect Warning

This expression has no effect (because
ui_post_processing_confirm_transaction
has no external side effects).
@codecov-commenter
Copy link

codecov-commenter commented Jul 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.73%. Comparing base (1a5b170) to head (40c3623).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #270      +/-   ##
===========================================
- Coverage    84.77%   84.73%   -0.05%     
===========================================
  Files           17       17              
  Lines         2187     2181       -6     
===========================================
- Hits          1854     1848       -6     
  Misses         333      333              
Flag Coverage Δ
unittests 84.73% <100.00%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bigspider bigspider force-pushed the revamp branch 2 times, most recently from c4c5cf5 to 57964ee Compare July 9, 2024 20:18
Minor adjustments needed in some tests as the page splitting changed.
Copy link

sonarcloud bot commented Jul 12, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
10.4% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@bigspider bigspider merged commit f17c7fd into develop Jul 12, 2024
144 of 145 checks passed
@bigspider bigspider deleted the revamp branch July 12, 2024 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix "minimal push" check for OP_RETURN outputs
3 participants