Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Commit

Permalink
Merge pull request #28 from Zondax/update_edgeware
Browse files Browse the repository at this point in the history
Update edgeware
  • Loading branch information
jleni authored Jan 22, 2022
2 parents be1f93f + 3ff80e6 commit d0d0d11
Show file tree
Hide file tree
Showing 16 changed files with 1,373 additions and 953 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=1
# This is the `spec_version` field of `Runtime`
APPVERSION_N=46
# This is the patch version of this release
APPVERSION_P=3
APPVERSION_P=4
9 changes: 4 additions & 5 deletions app/src/common/actions.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,16 @@ __Z_INLINE zxerr_t app_fill_address(key_kind_e addressKind) {
}

__Z_INLINE key_kind_e get_key_type(uint8_t num) {
#ifdef SUPPORT_SR25519
switch (num) {
case 0x00:
return key_ed25519;
#ifdef SUPPORT_SR25519
case 0x01:
return key_sr25519;
}
return 0xff;
#else
return key_ed25519;
#endif
default:
return 0xff;
}
}

__Z_INLINE void app_reply_error() {
Expand Down
3 changes: 2 additions & 1 deletion app/src/common/app_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ unsigned char io_event(unsigned char channel) {
break;

case SEPROXYHAL_TAG_DISPLAY_PROCESSED_EVENT:
if (!UX_DISPLAYED())
if (!UX_DISPLAYED()) {
UX_DISPLAYED_EVENT();
}
break;

case SEPROXYHAL_TAG_TICKER_EVENT: { //
Expand Down
10 changes: 9 additions & 1 deletion app/src/crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ zxerr_t crypto_extractPublicKey(key_kind_e addressKind, const uint32_t path[HDPA
return zxerr_invalid_crypto_settings;
}
}
CATCH_ALL
{
MEMZERO(&cx_privateKey, sizeof(cx_privateKey));
MEMZERO(privateKeyData, SK_LEN_25519);
CLOSE_TRY;
return zxerr_unknown;
}
FINALLY
{
MEMZERO(&cx_privateKey, sizeof(cx_privateKey));
Expand Down Expand Up @@ -141,10 +148,11 @@ zxerr_t crypto_sign_ed25519(uint8_t *signature, uint16_t signatureMaxlen,
CATCH_ALL
{
MEMZERO(&cx_privateKey, sizeof(cx_privateKey));
MEMZERO(privateKeyData, SK_LEN_25519);
*signatureLen = 0;
CLOSE_TRY;
return zxerr_unknown;
};
}
FINALLY
{
MEMZERO(&cx_privateKey, sizeof(cx_privateKey));
Expand Down
2 changes: 1 addition & 1 deletion app/src/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ parser_error_t parser_getItem(const parser_context_t *ctx,
CHECK_PARSER_ERR(parser_getNumItems(ctx, &numItems))
CHECK_APP_CANARY()

if (displayIdx < 0 || displayIdx >= numItems) {
if (displayIdx >= numItems) {
return parser_no_data;
}

Expand Down
1 change: 0 additions & 1 deletion app/src/substrate_types.c
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,6 @@ parser_error_t _toStringTupleDataData(
CHECK_ERROR(_toStringData(&v->data2, outValue, outValueLen, pageIdx, &pages[1]))
return parser_ok;
}
// pageIdx -= pages[1];

return parser_display_idx_out_of_range;
}
Expand Down
3 changes: 0 additions & 3 deletions app/src/substrate_types_V1.c
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,6 @@ parser_error_t _toStringAccountVoteSplit_V1(
CHECK_ERROR(_toStringBalanceOf(&v->nay, outValue, outValueLen, pageIdx, &pages[2]));
return parser_ok;
}
// pageIdx -= pages[2];

/////////
/////////
Expand Down Expand Up @@ -782,7 +781,6 @@ parser_error_t _toStringAccountVoteStandard_V1(
CHECK_ERROR(_toStringBalanceOf(&v->balance, outValue, outValueLen, pageIdx, &pages[2]));
return parser_ok;
}
// pageIdx -= pages[2];

/////////
/////////
Expand Down Expand Up @@ -1155,7 +1153,6 @@ parser_error_t _toStringIdentityInfo_V1(
CHECK_ERROR(_toStringData(&v->twitter, outValue, outValueLen, pageIdx, &pages[8]))
return parser_ok;
}
// pageIdx -= pages[8];

return parser_display_idx_out_of_range;
}
Expand Down
1 change: 0 additions & 1 deletion deps/ledger-zxlib/app/common/view.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ zxerr_t h_review_update_data() {
zemu_log_stack("h_review_update_data - GetNumItems==NULL");
return zxerr_no_data;
}

if (viewdata.viewfuncGetItem == NULL) {
zemu_log_stack("h_review_update_data - GetItem==NULL");
return zxerr_no_data;
Expand Down
2 changes: 1 addition & 1 deletion deps/ledger-zxlib/cmake/gtest/CMakeLists.txt.gtest.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ project(googletest-download NONE)
include(ExternalProject)
ExternalProject_Add(googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG master
GIT_TAG release-1.11.0
SOURCE_DIR "${CMAKE_BINARY_DIR}/googletest-src"
BINARY_DIR "${CMAKE_BINARY_DIR}/googletest-build"
CONFIGURE_COMMAND ""
Expand Down
Loading

0 comments on commit d0d0d11

Please sign in to comment.