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

Feat/LDG-615--nano-app-implement-deploy-stax-and-flex-display #44

Merged

Conversation

keiff3r
Copy link

@keiff3r keiff3r commented Dec 12, 2024

  • Add uiDeployModuleDisplay function for Stax/Flex support
  • Create pairs array for tag-value display
  • Add review_choice_sign callback for transaction signing
  • Display sender and version information in UI
  • Use nbgl_useCaseReview for consistent UI pattern
  • Generate golden snapshots

Implements the UI flow for module deployment on newer Ledger devices
(Stax/Flex) using the NBGL library, displaying sender and version
information with proper signing confirmation.

- Add uiDeployModuleDisplay function for Stax/Flex support
- Create pairs array for tag-value display
- Add review_choice_sign callback for transaction signing
- Display sender and version information in UI
- Use nbgl_useCaseReview for consistent UI pattern
- Generate golden snapshots

Implements the UI flow for module deployment on newer Ledger devices
(Stax/Flex) using the NBGL library, displaying sender and version
information with proper signing confirmation.
// validate_transaction(confirm);
if (confirm) {
buildAndSignTransactionHash();
// nbgl_useCaseReviewStatus(STATUS_TYPE_TRANSACTION_SIGNED, ui_menu_main);

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
// nbgl_useCaseReviewStatus(STATUS_TYPE_TRANSACTION_SIGNED, ui_menu_main);
} else {
sendUserRejection();
// nbgl_useCaseReviewStatus(STATUS_TYPE_TRANSACTION_REJECTED, ui_menu_main);

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
Comment on lines +88 to +91
// // Add sender address
// pairs[pairIndex].item = "Sender";
// pairs[pairIndex].value = (char *) global_account_sender.sender;
// pairIndex++;

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
Comment on lines +93 to +103
// // Add capital amount if present
// if (ctx->hasCapital) {
// if (ctx->stopDelegation) {
// pairs[pairIndex].item = "Action";
// pairs[pairIndex].value = "Stop delegation";
// } else {
// pairs[pairIndex].item = "Amount to delegate";
// pairs[pairIndex].value = (char *) ctx->displayCapital;
// }
// pairIndex++;
// }

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
Comment on lines +105 to +110
// // Add restake earnings if present
// if (ctx->hasRestakeEarnings) {
// pairs[pairIndex].item = "Restake earnings";
// pairs[pairIndex].value = (char *) ctx->displayRestake;
// pairIndex++;
// }

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
Comment on lines +112 to +117
// // Add delegation target if present
// if (ctx->hasDelegationTarget) {
// pairs[pairIndex].item = "Delegation target";
// pairs[pairIndex].value = (char *) ctx->displayDelegationTarget;
// pairIndex++;
// }

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
Comment on lines +119 to +128
// // Create the page content
// nbgl_pageContent_t content;
// content.type = TAG_VALUE_LIST;
// content.title = "Review Transaction";
// content.isTouchableTitle = true;
// content.topRightIcon = NULL;
// content.tagValueList.nbPairs = pairIndex;
// content.tagValueList.pairs = pairs;
// content.tagValueList.smallCaseForValue = false;
// content.tagValueList.nbMaxLinesForValue = 0;

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
@keiff3r keiff3r marked this pull request as ready for review December 12, 2024 12:33
@keiff3r keiff3r requested a review from a team December 12, 2024 12:33
@n4l5u0r n4l5u0r merged commit 133bafe into main Dec 12, 2024
29 of 30 checks passed
@n4l5u0r n4l5u0r deleted the feat/LDG-615--nano-app-implement-deploy-stax-and-flex-display branch December 12, 2024 12: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.

2 participants