Skip to content

Commit

Permalink
Merge pull request #204 from Zondax/fix-principal
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosala authored May 17, 2023
2 parents ce5bcac + 673cab1 commit 16edb10
Show file tree
Hide file tree
Showing 13 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion app/Makefile.version
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ APPVERSION_M=2
# This is the minor version of this release
APPVERSION_N=4
# This is the patch version of this release
APPVERSION_P=1
APPVERSION_P=2
13 changes: 3 additions & 10 deletions app/src/parser_print_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@
// 365.25 * 24*60*60 = 31557600
#define ICP_YEAR_IN_SECONDS ((uint64_t)31557600)

parser_error_t page_principal_with_delimiters(const char *input, const uint16_t inputLen, char *output, const uint16_t outputLen, const uint8_t pageIdx, uint8_t *pageCount) {
#if defined(TARGET_STAX)
const uint8_t LINES_PER_PAGE = 7;
#include "view_internal.h"
const uint8_t LINES_PER_PAGE = MAX_LINES_PER_PAGE_REVIEW;
#elif defined(TARGET_NANOS2) || defined(TARGET_NANOX)
const uint8_t LINES_PER_PAGE = 3;
#else
const uint8_t LINES_PER_PAGE = 2;
#endif

parser_error_t page_principal_with_delimiters(const char *input, const uint16_t inputLen, char *output, const uint16_t outputLen, const uint8_t pageIdx, uint8_t *pageCount) {
const uint8_t CHARS_PER_CHUNK = 5;
const uint8_t CHARS_PER_PAGE = 15 * LINES_PER_PAGE;
const uint8_t CHUNKS_PER_PAGE = 3 * LINES_PER_PAGE;
Expand Down Expand Up @@ -80,14 +81,6 @@ parser_error_t page_principal_with_delimiters(const char *input, const uint16_t
parser_error_t print_subaccount_hex(const uint8_t *input, const uint64_t inputLen,
char *output, const uint16_t outputLen,
const uint8_t pageIdx, uint8_t *pageCount) {
#if defined(TARGET_STAX)
const uint8_t LINES_PER_PAGE = 7;
#elif defined(TARGET_NANOS2) || defined(TARGET_NANOX)
const uint8_t LINES_PER_PAGE = 3;
#else
const uint8_t LINES_PER_PAGE = 2;
#endif

const uint8_t CHARS_PER_CHUNK = 8;
const uint8_t CHARS_PER_PAGE = 16 * LINES_PER_PAGE;
const uint8_t CHUNKS_PER_PAGE = 2 * LINES_PER_PAGE;
Expand Down
2 changes: 1 addition & 1 deletion deps/ledger-zxlib
Binary file modified tests_zemu/snapshots/s-mainmenu/00004.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_zemu/snapshots/s-mainmenu/00010.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_zemu/snapshots/sp-mainmenu/00004.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_zemu/snapshots/sp-mainmenu/00010.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_zemu/snapshots/st-icrc_transfer/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_zemu/snapshots/st-icrc_transfer/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_zemu/snapshots/st-mainmenu/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_zemu/snapshots/st-sns_disburse/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_zemu/snapshots/x-mainmenu/00004.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_zemu/snapshots/x-mainmenu/00010.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 16edb10

Please sign in to comment.