Skip to content

Commit

Permalink
chore: code style
Browse files Browse the repository at this point in the history
  • Loading branch information
krigga committed Aug 12, 2024
1 parent 53bb567 commit 49da2a8
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 9 deletions.
7 changes: 6 additions & 1 deletion src/ui/display_address_nbgl.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ int ui_display_address(uint8_t flags) {
return -1;
}

nbgl_useCaseAddressReview(g_address, NULL, &C_ledger_stax_ton_64, "Verify TON address", NULL, review_choice);
nbgl_useCaseAddressReview(g_address,
NULL,
&C_ledger_stax_ton_64,
"Verify TON address",
NULL,
review_choice);

return 0;
}
Expand Down
7 changes: 6 additions & 1 deletion src/ui/display_proof_nbgl.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ int ui_display_proof(uint8_t flags) {
pairList.nbMaxLinesForValue = 0;
pairList.pairs = &pair;

nbgl_useCaseAddressReview(g_address, &pairList, &C_ledger_stax_ton_64, "Verify TON address\nto application", NULL, review_choice);
nbgl_useCaseAddressReview(g_address,
&pairList,
&C_ledger_stax_ton_64,
"Verify TON address\nto application",
NULL,
review_choice);

return 0;
}
Expand Down
8 changes: 7 additions & 1 deletion src/ui/display_sign_data_nbgl.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,13 @@ int ui_display_sign_data() {
pairList.nbPairs = G_context.sign_data_info.hints.hints_count;
pairList.smallCaseForValue = false;

nbgl_useCaseReview(TYPE_MESSAGE, &pairList, &C_ledger_stax_ton_64, "Sign custom data", NULL, "Sign custom data", on_review_choice);
nbgl_useCaseReview(TYPE_MESSAGE,
&pairList,
&C_ledger_stax_ton_64,
"Sign custom data",
NULL,
"Sign custom data",
on_review_choice);

return 0;
}
Expand Down
14 changes: 9 additions & 5 deletions src/ui/display_transaction_nbgl.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,13 @@ static void ui_start_review() {
op |= BLIND_OPERATION;
}

nbgl_useCaseReview(op, &pairList, &C_ledger_stax_ton_64, g_transaction_title, NULL, g_transaction_finish_title, on_review_choice);
nbgl_useCaseReview(op,
&pairList,
&C_ledger_stax_ton_64,
g_transaction_title,
NULL,
g_transaction_finish_title,
on_review_choice);
}

static void on_blind_choice2(bool proceed) {
Expand All @@ -131,8 +137,7 @@ static void on_blind_choice1(bool back_to_safety) {
"your assets\nat risk.",
"I accept the risk",
"Reject transaction",
on_blind_choice2
);
on_blind_choice2);
}
}

Expand All @@ -143,8 +148,7 @@ static void ui_show_blind_warning() {
"It may not be safe to sign this transaction. To continue, you'll need to review the risk.",
"Back to safety",
"Review risk",
on_blind_choice1
);
on_blind_choice1);
}

// Public function to start the transaction review
Expand Down
9 changes: 8 additions & 1 deletion src/ui/menu_nbgl.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,14 @@ static const nbgl_contentInfoList_t infoContents = {
static void ui_menu_common(uint8_t initPage) {
initialize_switches();

nbgl_useCaseHomeAndSettings(APPNAME, &C_ledger_stax_ton_64, NULL, initPage, &settingsContents, &infoContents, NULL, app_quit);
nbgl_useCaseHomeAndSettings(APPNAME,
&C_ledger_stax_ton_64,
NULL,
initPage,
&settingsContents,
&infoContents,
NULL,
app_quit);
}

void ui_menu_main(void) {
Expand Down

0 comments on commit 49da2a8

Please sign in to comment.