Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ debug/
dep/
obj/
build/
.vscode/settings.json

# Unit tests and code coverage
unit-tests/build/
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# Application version
APPVERSION_M = 0
APPVERSION_N = 1
APPVERSION_P = 1
APPVERSION_P = 2
APPVERSION = "$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)"

# Setting to allow building variant applications
Expand Down
13 changes: 7 additions & 6 deletions src/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,18 @@ static void review_choice(bool approved) {
}
}

#define MAX_N_PAIRS 4;
#define MAX_N_PAIRS 4

// These are kept static rather than on the stack because the NBGL library
// stores pointers to them that must remain valid long term.
static nbgl_layoutTagValue_t pairs[MAX_N_PAIRS];
static nbgl_layoutTagValueList_t pairList;
static char value_str[32], magic_value_str[32], fee_str[32];

bool display_transaction(dispatcher_context_t *dc,
int64_t value_spent,
uint64_t magic_input_value,
uint64_t fee) {
nbgl_layoutTagValue_t pairs[4];
nbgl_layoutTagValueList_t pairList;

// format value_spent
char value_str[32], magic_value_str[32], fee_str[32];
uint64_t value_spent_abs = value_spent < 0 ? -value_spent : value_spent;
format_sats_amount(COIN_COINID_SHORT, value_spent_abs, value_str);
format_sats_amount(COIN_COINID_SHORT, magic_input_value, magic_value_str);
Expand Down
3 changes: 2 additions & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ static bool validate_transaction(dispatcher_context_t *dc,
sizeof(witness_utxo))) {
PRINTF("Failed to get witness utxo, or invalid witness utxo\n");
SEND_SW(dc, SW_INCORRECT_DATA);
};
return false;
}
if (witness_utxo[8] != 34) {
PRINTF("Unexpected scriptPubKey length in witness utxo: %d\n", witness_utxo[8]);
SEND_SW(dc, SW_INCORRECT_DATA);
Expand Down
Binary file modified tests/snapshots/apex_p/test_dashboard_main/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/apex_p/test_dashboard_test/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_dashboard_main/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_dashboard_test/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_dashboard_main/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_dashboard_test/00001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading