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(display): added display for getPublicKey on Stax/Flex #27

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions src/common/ui/display_nbgl.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,39 @@

#include "display.h"
#include "globals.h"
#include "glyphs.h"
#include "menu.h"
#include "getPublicKey.h"

#include "nbgl_use_case.h"
accountSender_t global_account_sender;

static void review_choice(bool confirm) {
// Answer, display a status page and go back to main
if (confirm) {
nbgl_useCaseReviewStatus(STATUS_TYPE_ADDRESS_VERIFIED, ui_menu_main);
} else {
nbgl_useCaseReviewStatus(STATUS_TYPE_ADDRESS_REJECTED, ui_menu_main);
}
}
void uiComparePubkey(void) {
// TODO: Implement this
nbgl_useCaseAddressReview(global.exportPublicKeyContext.publicKey,
NULL,
&C_app_concordium_64px,
"Compare",
NULL,
review_choice);
}

void uiGeneratePubkey(volatile unsigned int *flags) {
nbgl_useCaseAddressReview((char *) global.exportPublicKeyContext.display, // Address to display
NULL, // No additional tag-value list
&C_app_concordium_64px, // Icon to display
"Public Key", // Review title
NULL, // No review subtitle
sendPublicKey // Callback function
);
*flags |= IO_ASYNCH_REPLY;
// TODO: Implement this
}
Expand Down
Loading