Skip to content

Commit

Permalink
fixing tests;
Browse files Browse the repository at this point in the history
-stax icon path;
-lint;
  • Loading branch information
rduarte83 committed Dec 13, 2023
1 parent 2425fa3 commit 17effac
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ APP_SOURCE_PATH += src
ICON_NANOS = icons/nanos_app_phantasma.gif #16x16
ICON_NANOSP = icons/nanox_app_phantasma.gif #14x14
ICON_NANOX = icons/nanox_app_phantasma.gif #14x14
ICON_STAX = icons/stax_app_phantasma.gif #32x32
ICON_STAX = icons/stax_app_phantasma.png #32x32

# Application allowed derivation curves.
# Possibles curves are: secp256k1, secp256r1, ed25519 and bls12381g1
Expand Down
1 change: 0 additions & 1 deletion src/transaction/deserialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,6 @@ parser_status_e transaction_deserialize(buffer_t *buf, transaction_t *tx) {
tx->token = (uint8_t *) tx->transfer_tokens.args[1].load.buf.ptr;
tx->token_len = tx->transfer_tokens.args[1].load.buf.size;
} else if (tx->type == TRANSACTION_TYPE_CUSTOM) {

tx->from = (uint8_t *) tx->allow_gas.args[3].load.buf.ptr;
tx->from_len = tx->allow_gas.args[3].load.buf.size;
// Handle Stake Tokens
Expand Down
2 changes: 1 addition & 1 deletion src/ui/menu_nbgl.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ static char INFO_ADDRESS[ADDRESS_LEN];
static const char* const INFO_TYPES[] = {"Version", "Developer", "Address"};
static const char* const INFO_CONTENTS[] = {APPVERSION, "Phantasma Team", INFO_ADDRESS};

//static nbgl_layoutSwitch_t switches[SETTINGS_SWITCHES_NB] = {0};
// static nbgl_layoutSwitch_t switches[SETTINGS_SWITCHES_NB] = {0};

static void build_first_page(nbgl_pageContent_t* content) {
content->type = INFOS_LIST;
Expand Down
6 changes: 3 additions & 3 deletions src/ui/nbgl_display_address.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ int ui_display_address() {
return io_send_sw(SW_DISPLAY_ADDRESS_FAIL);
}

//if (format_hex(address, sizeof(address), g_address, sizeof(g_address)) == -1) {
// return io_send_sw(SW_DISPLAY_ADDRESS_FAIL);
//}
// if (format_hex(address, sizeof(address), g_address, sizeof(g_address)) == -1) {
// return io_send_sw(SW_DISPLAY_ADDRESS_FAIL);
// }

memmove(g_address, address, ADDRESS_LEN);

Expand Down
17 changes: 9 additions & 8 deletions src/ui/nbgl_display_transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
// Buffer where the transaction amount string is written
static char g_amount[30];
// Buffer where the transaction address string is written
//static char g_address[43];
// static char g_address[43];
static char g_address[64];
static char g_token[TOKEN_LEN];
static char g_contract[TOKEN_LEN];
Expand Down Expand Up @@ -97,7 +97,7 @@ static void review_continue(void) {
pairs[5].value = g_chain;
pairs[6].item = "Script length";
pairs[6].value = g_scriptlength;

// Setup list
pairList.nbMaxLinesForValue = 0;
pairList.nbPairs = 7;
Expand Down Expand Up @@ -140,15 +140,16 @@ int ui_display_transaction() {
memset(g_amount, 0, sizeof(g_amount));
memmove(g_amount, G_context.tx_info.transaction.value, G_context.tx_info.transaction.value_len);

//snprintf(g_amount, sizeof(g_amount), "%.*s", sizeof(amount), amount);
// snprintf(g_amount, sizeof(g_amount), "%.*s", sizeof(amount), amount);

memset(g_address, 0, sizeof(g_address));
memmove(g_address, G_context.tx_info.transaction.to, G_context.tx_info.transaction.to_len);

//if (format_hex(G_context.tx_info.transaction.to, ADDRESS_LEN, g_address, sizeof(g_address)) ==
// -1) {
// return io_send_sw(SW_DISPLAY_ADDRESS_FAIL);
//}
// if (format_hex(G_context.tx_info.transaction.to, ADDRESS_LEN, g_address, sizeof(g_address))
// ==
// -1) {
// return io_send_sw(SW_DISPLAY_ADDRESS_FAIL);
// }

// Start review
nbgl_useCaseReviewStart(&C_app_phantasma_64px,
Expand All @@ -174,7 +175,7 @@ static void review_continue_custom(void) {
pairs[4].value = g_address;
pairs[5].item = "Contract Method Args";
pairs[5].value = g_contract_method_args;

// Setup list
pairList.nbMaxLinesForValue = 1;
pairList.nbPairs = 6;
Expand Down

0 comments on commit 17effac

Please sign in to comment.