Skip to content

Commit b510ea7

Browse files
authored
Merge pull request #181 from Zondax/support-new-methods
implement few candid methods
2 parents 0d31737 + 6f03b7d commit b510ea7

File tree

172 files changed

+1356
-9242
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+1356
-9242
lines changed

.github/workflows/ledger.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424

2525
steps:
2626
- uses: actions/checkout@v2
27+
with:
28+
submodules: true
2729

2830
- name: Build with Clang Static Analyzer
2931
run: |

.github/workflows/sonarcloud.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
steps:
2323
- uses: actions/checkout@v2
2424
with:
25+
submodules: true
2526
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
2627
- name: Set up JDK 11
2728
uses: actions/setup-java@v1

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@
1313
[submodule "deps/nanosplus-secure-sdk"]
1414
path = deps/nanosplus-secure-sdk
1515
url = https://github.com/LedgerHQ/nanosplus-secure-sdk
16+
[submodule "deps/ledger-zxlib"]
17+
path = deps/ledger-zxlib
18+
url = https://github.com/Zondax/ledger-zxlib

app/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ all: bin/app.elf
2727
@echo "APPNAME=\"${APPNAME}\"" >> $(OUTPUT_INSTALLER)
2828
@echo "APPVERSION=\"${APPVERSION}\"" >> $(OUTPUT_INSTALLER)
2929
@echo "APPPATH=\""${APPPATH}"\"" >> $(OUTPUT_INSTALLER)
30-
@echo "LOAD_PARAMS=\"${COMMON_LOAD_PARAMS}\"" >> $(OUTPUT_INSTALLER)
31-
@echo "DELETE_PARAMS=\"${COMMON_DELETE_PARAMS}\"" >> $(OUTPUT_INSTALLER)
30+
@echo "LOAD_PARAMS=($$(echo "${APP_LOAD_PARAMS}" | sed -e "s|"${APPNAME}"|\""${APPNAME}"\"|"))" >> $(OUTPUT_INSTALLER)
31+
@echo "DELETE_PARAMS=($$(echo "${COMMON_DELETE_PARAMS}" | sed -e "s|"${APPNAME}"|\""${APPNAME}"\"|"))" >> $(OUTPUT_INSTALLER)
3232
@echo "APPHEX=\"" >> $(OUTPUT_INSTALLER)
3333
@cat $(CURDIR)/bin/app.hex >> $(OUTPUT_INSTALLER)
3434
@echo "\"" >> $(OUTPUT_INSTALLER)
@@ -74,7 +74,7 @@ endef
7474
$(error "$(error_message)")
7575
endif
7676

77-
APP_LOAD_PARAMS = --delete $(COMMON_LOAD_PARAMS) --path ${APPPATH} --path "44'/1'"
77+
APP_LOAD_PARAMS = --delete $(COMMON_LOAD_PARAMS) --path $(APPPATH) --path "44'/1'"
7878

7979
ifeq ($(TARGET_NAME),TARGET_NANOS)
8080
APP_STACK_SIZE:=2050

app/Makefile.version

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This is the major version of this release
22
APPVERSION_M=2
33
# This is the minor version of this release
4-
APPVERSION_N=1
4+
APPVERSION_N=2
55
# This is the patch version of this release
6-
APPVERSION_P=7
6+
APPVERSION_P=0

app/src/apdu_handler.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <ux.h>
2424

2525
#include "view.h"
26+
#include "view_internal.h"
2627
#include "actions.h"
2728
#include "tx.h"
2829
#include "addr.h"
@@ -44,7 +45,7 @@ __Z_INLINE void handleGetAddr(volatile uint32_t *flags, volatile uint32_t *tx, u
4445

4546
if (requireConfirmation) {
4647
view_review_init(addr_getItem, addr_getNumItems, app_reply_address);
47-
view_review_show();
48+
view_review_show(REVIEW_ADDRESS);
4849
*flags |= IO_ASYNCH_REPLY;
4950
return;
5051
}
@@ -72,7 +73,7 @@ __Z_INLINE void handleSign(volatile uint32_t *flags, volatile uint32_t *tx, uint
7273

7374
CHECK_APP_CANARY()
7475
view_review_init(tx_getItem, tx_getNumItems, app_sign);
75-
view_review_show();
76+
view_review_show(REVIEW_TXN);
7677
*flags |= IO_ASYNCH_REPLY;
7778
}
7879

@@ -95,7 +96,7 @@ __Z_INLINE void handleSignCombined(volatile uint32_t *flags, volatile uint32_t *
9596

9697
CHECK_APP_CANARY()
9798
view_review_init(tx_getItem, tx_getNumItems, app_sign_combined);
98-
view_review_show();
99+
view_review_show(REVIEW_TXN);
99100
*flags |= IO_ASYNCH_REPLY;
100101
}
101102

0 commit comments

Comments
 (0)