Skip to content

Commit 16edb10

Browse files
authored
Merge pull request #204 from Zondax/fix-principal
2 parents ce5bcac + 673cab1 commit 16edb10

File tree

13 files changed

+5
-12
lines changed

13 files changed

+5
-12
lines changed

app/Makefile.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ APPVERSION_M=2
33
# This is the minor version of this release
44
APPVERSION_N=4
55
# This is the patch version of this release
6-
APPVERSION_P=1
6+
APPVERSION_P=2

app/src/parser_print_helper.c

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,16 @@
2424
// 365.25 * 24*60*60 = 31557600
2525
#define ICP_YEAR_IN_SECONDS ((uint64_t)31557600)
2626

27-
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) {
2827
#if defined(TARGET_STAX)
29-
const uint8_t LINES_PER_PAGE = 7;
28+
#include "view_internal.h"
29+
const uint8_t LINES_PER_PAGE = MAX_LINES_PER_PAGE_REVIEW;
3030
#elif defined(TARGET_NANOS2) || defined(TARGET_NANOX)
3131
const uint8_t LINES_PER_PAGE = 3;
3232
#else
3333
const uint8_t LINES_PER_PAGE = 2;
3434
#endif
3535

36+
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) {
3637
const uint8_t CHARS_PER_CHUNK = 5;
3738
const uint8_t CHARS_PER_PAGE = 15 * LINES_PER_PAGE;
3839
const uint8_t CHUNKS_PER_PAGE = 3 * LINES_PER_PAGE;
@@ -80,14 +81,6 @@ parser_error_t page_principal_with_delimiters(const char *input, const uint16_t
8081
parser_error_t print_subaccount_hex(const uint8_t *input, const uint64_t inputLen,
8182
char *output, const uint16_t outputLen,
8283
const uint8_t pageIdx, uint8_t *pageCount) {
83-
#if defined(TARGET_STAX)
84-
const uint8_t LINES_PER_PAGE = 7;
85-
#elif defined(TARGET_NANOS2) || defined(TARGET_NANOX)
86-
const uint8_t LINES_PER_PAGE = 3;
87-
#else
88-
const uint8_t LINES_PER_PAGE = 2;
89-
#endif
90-
9184
const uint8_t CHARS_PER_CHUNK = 8;
9285
const uint8_t CHARS_PER_PAGE = 16 * LINES_PER_PAGE;
9386
const uint8_t CHUNKS_PER_PAGE = 2 * LINES_PER_PAGE;
3 Bytes
Loading
3 Bytes
Loading
5 Bytes
Loading
5 Bytes
Loading
605 Bytes
Loading
604 Bytes
Loading
-31 Bytes
Loading

0 commit comments

Comments
 (0)