Skip to content

Commit

Permalink
add ticker and change wordings
Browse files Browse the repository at this point in the history
  • Loading branch information
tdejoigny-ledger committed May 24, 2024
1 parent e31e709 commit fb7fc6f
Show file tree
Hide file tree
Showing 30 changed files with 23 additions and 18 deletions.
6 changes: 3 additions & 3 deletions src/monero_nvram.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
#include "monero_api.h"
#include "monero_vars.h"

#if defined(TARGET_NANOX) || defined(TARGET_NANOS2) || defined(TARGET_STAX) || defined(TARGET_FLEX)
const monero_nv_state_t N_state_pic;
#else
#if defined(TARGET_NANOS)
monero_nv_state_t N_state_pic;
#else
const monero_nv_state_t N_state_pic;
#endif
5 changes: 5 additions & 0 deletions src/monero_prehash.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ int monero_apdu_mlsag_prehash_init() {
// fee str
monero_vamount2str(G_monero_vstate.io_buffer + G_monero_vstate.io_offset,
G_monero_vstate.ux_amount, 15);

snprintf(G_monero_vstate.ux_amount + strlen(G_monero_vstate.ux_amount),
sizeof(G_monero_vstate.ux_amount) - strlen(G_monero_vstate.ux_amount), " XMR");
// ask user
monero_io_discard(1);
ui_menu_fee_validation_display(0);
Expand Down Expand Up @@ -212,6 +215,8 @@ int monero_apdu_mlsag_prehash_update() {
amount = monero_bamount2uint64(v, sizeof(v));
if (amount) {
monero_amount2str(amount, G_monero_vstate.ux_amount, 15);
snprintf(G_monero_vstate.ux_amount + strlen(G_monero_vstate.ux_amount),
sizeof(G_monero_vstate.ux_amount) - strlen(G_monero_vstate.ux_amount), " XMR");

if ((G_monero_vstate.options & IN_OPTION_MORE_COMMAND) == 0) {
if (!is_change) {
Expand Down
4 changes: 2 additions & 2 deletions src/monero_ux_nano.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ UX_STEP_NOCB(ux_menu_validation_timelock_1_step, bn,
UX_STEP_CB(ux_menu_validation_cf_2_step, pb, ui_menu_amount_validation_action(ACCEPT),
{
&C_icon_validate_14,
"Accept",
"Sign transaction",
});

UX_STEP_CB(ux_menu_validation_cf_3_step, pb, ui_menu_amount_validation_action(REJECT),
Expand Down Expand Up @@ -241,7 +241,7 @@ UX_STEP_NOCB(ux_menu_validation_2_step,
{"Destination", G_monero_vstate.ux_address});

UX_STEP_CB(ux_menu_validation_3_step, pb, ui_menu_validation_action(ACCEPT),
{&C_icon_validate_14, "Accept"});
{&C_icon_validate_14, "Sign transaction"});

UX_STEP_CB(ux_menu_validation_4_step, pb, ui_menu_validation_action(REJECT),
{&C_icon_crossmark, "Reject"});
Expand Down
18 changes: 9 additions & 9 deletions src/monero_ux_nbgl.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,13 @@ void ui_menu_change_validation_display_last(unsigned int value __attribute__((un
transactionContext.tagValueList.nbPairs++;

transactionContext.infoLongPress.icon = &C_Monero_64px;
transactionContext.infoLongPress.longPressText = "Approve";
transactionContext.infoLongPress.longPressText = "Hold to sign";
transactionContext.infoLongPress.longPressToken = 0;
transactionContext.infoLongPress.tuneId = TUNE_TAP_CASUAL;
transactionContext.infoLongPress.text = "Hold to confirm";
transactionContext.infoLongPress.text = "Sign transaction";

nbgl_useCaseStaticReview(&transactionContext.tagValueList, &transactionContext.infoLongPress,
"Cancel", ui_menu_validation_action);
"Reject transaction", ui_menu_validation_action);
}

static void timelock_callback(void) {
Expand Down Expand Up @@ -234,7 +234,7 @@ static void continue_display(int token, unsigned char index) {
.navWithTap.backButton = false,
.navWithTap.nextPageText = NEXT_PAGE_TEXT,
.navWithTap.nextPageToken = CONTINUE_TOKEN,
.navWithTap.quitText = "Cancel",
.navWithTap.quitText = "Reject transaction",
.quitToken = QUIT_TOKEN,
.tuneId = TUNE_TAP_CASUAL};

Expand All @@ -255,13 +255,13 @@ static void continue_display_last(int token, unsigned char index) {

fill_amount_and_destination();
transactionContext.infoLongPress.icon = &C_Monero_64px;
transactionContext.infoLongPress.longPressText = "Approve";
transactionContext.infoLongPress.longPressText = "Hold to sign";
transactionContext.infoLongPress.longPressToken = 0;
transactionContext.infoLongPress.tuneId = TUNE_TAP_CASUAL;
transactionContext.infoLongPress.text = "Hold to confirm";
transactionContext.infoLongPress.text = "Sign transaction";

nbgl_useCaseStaticReview(&transactionContext.tagValueList, &transactionContext.infoLongPress,
"Cancel", ui_menu_validation_action);
"Reject transaction", ui_menu_validation_action);
}

static void display_previous_infos(bool last) {
Expand All @@ -274,7 +274,7 @@ static void display_previous_infos(bool last) {
.navWithTap.backButton = false,
.navWithTap.nextPageText = NEXT_PAGE_TEXT,
.navWithTap.nextPageToken = CONTINUE_TOKEN,
.navWithTap.quitText = "Cancel",
.navWithTap.quitText = "Reject transaction",
.quitToken = QUIT_TOKEN,
.tuneId = TUNE_TAP_CASUAL};

Expand Down Expand Up @@ -380,7 +380,7 @@ void display_account(void) {
transactionContext.tagValueList.pairs = transactionContext.tagValuePair;

nbgl_useCaseAddressReview(G_monero_vstate.ux_address, &transactionContext.tagValueList,
&C_Monero_64px, "Review Address", NULL, ui_menu_pubaddr_action);
&C_Monero_64px, "Verify Monero\naddress", NULL, ui_menu_pubaddr_action);
}

int ui_menu_any_pubaddr_display(unsigned int value __attribute__((unused)), unsigned char* pub_view,
Expand Down
8 changes: 4 additions & 4 deletions src/monero_vars.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@

extern monero_v_state_t G_monero_vstate;

#if defined(TARGET_NANOX) || defined(TARGET_NANOS2) || defined(TARGET_STAX) || defined(TARGET_FLEX)
extern const monero_nv_state_t N_state_pic;
#define N_monero_pstate ((volatile monero_nv_state_t *)PIC(&N_state_pic))
#else
#if defined(TARGET_NANOS)
extern monero_nv_state_t N_state_pic;
#define N_monero_pstate ((WIDE monero_nv_state_t *)PIC(&N_state_pic))
#else
extern const monero_nv_state_t N_state_pic;
#define N_monero_pstate ((volatile monero_nv_state_t *)PIC(&N_state_pic))
#endif

#ifdef MONERO_DEBUG_MAIN
Expand Down
Binary file modified tests/snapshots/flex/test_display_address/00000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/flex/test_display_subaddress/00000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/flex/test_validate_prehash_update/00000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/flex/test_validate_prehash_update/00001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/flex/test_validate_prehash_update/00002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/nanos/test_prefix_hash_hash_init/00001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/nanos/test_validate_prehash_init/00000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/nanos/test_validate_prehash_init/00001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/nanos/test_validate_prehash_update/00000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/nanos/test_validate_prehash_update/00007.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/nanosp/test_prefix_hash_hash_init/00001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/nanosp/test_validate_prehash_init/00000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/nanosp/test_validate_prehash_init/00001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/nanosp/test_validate_prehash_update/00000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/nanosp/test_validate_prehash_update/00003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/nanox/test_prefix_hash_hash_init/00001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/nanox/test_validate_prehash_init/00000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/nanox/test_validate_prehash_init/00001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/nanox/test_validate_prehash_update/00000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/nanox/test_validate_prehash_update/00003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/stax/test_display_address/00000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/stax/test_display_subaddress/00000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/stax/test_validate_prehash_update/00000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/stax/test_validate_prehash_update/00001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/stax/test_validate_prehash_update/00002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fb7fc6f

Please sign in to comment.