Skip to content
Merged

Dev #367

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
4 changes: 2 additions & 2 deletions app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ INCLUDES_PATH += $(CURDIR)/src/common/
CC := $(CLANGPATH)clang

ifeq ($(DEBUG), 1)
CFLAGS += -O3 -Os -Wno-unknown-pragmas -Wno-unused-parameter -g
CFLAGS += -O3 -Os -Wno-unknown-pragmas -g
else
CFLAGS += -O3 -Os -Wno-unknown-pragmas -Wno-unused-parameter
CFLAGS += -O3 -Os -Wno-unknown-pragmas
endif

CFLAGS += -DAPPVERSION_M=$(APPVERSION_M) -DAPPVERSION_N=$(APPVERSION_N) -DAPPVERSION_P=$(APPVERSION_P)
Expand Down
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
# Minor
APPVERSION_N=2
# Patch
APPVERSION_P=2
APPVERSION_P=3
6 changes: 3 additions & 3 deletions app/src/addr.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ zxerr_t app_fill_ed25519_address(uint8_t *buffer, uint16_t buffer_len, uint16_t
}

zxerr_t fill_address(
uint32_t *flags,
__Z_UNUSED uint32_t *flags,
uint32_t *tx,
uint32_t rx,
uint8_t *buffer,
Expand All @@ -54,10 +54,10 @@ zxerr_t fill_address(
zemu_log("fill_address\n");
zxerr_t err = zxerr_ok;
if (curve_type == CURVE_ED25519) {
err = app_fill_ed25519_address(G_io_apdu_buffer, IO_APDU_BUFFER_SIZE -2, &action_addrResponseLen);
err = app_fill_ed25519_address(buffer, buffer_len, &action_addrResponseLen);
*tx = action_addrResponseLen;
} else {
err = _app_fill_address(tx, rx, G_io_apdu_buffer, IO_APDU_BUFFER_SIZE, addr_ui_obj, ADDR_UI_MAX_SIZE);
err = _app_fill_address(tx, rx, buffer, buffer_len, addr_ui_obj, ADDR_UI_MAX_SIZE);
action_addrResponseLen = *tx;
}

Expand Down
6 changes: 3 additions & 3 deletions app/src/apdu_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ __Z_INLINE void avax_dispatch(volatile uint32_t *flags, volatile uint32_t *tx, u
}
}

__Z_INLINE void handleEthConfig(volatile uint32_t *flags, volatile uint32_t *tx, uint32_t rx) {
__Z_INLINE void handleEthConfig(volatile uint32_t *flags, volatile uint32_t *tx, __Z_UNUSED uint32_t rx) {
zemu_log("handleEthConfig\n");
*tx = 0;
app_eth_configuration();
Expand Down Expand Up @@ -448,7 +448,7 @@ __Z_INLINE void handleNftInfo(volatile uint32_t *flags, volatile uint32_t *tx, u
}


__Z_INLINE void handleProvideErc20(volatile uint32_t *flags, volatile uint32_t *tx, uint32_t rx) {
__Z_INLINE void handleProvideErc20(volatile uint32_t *flags, volatile uint32_t *tx, __Z_UNUSED uint32_t rx) {
zemu_log("handleProvideErc20\n");

// Nothing to do as we do not handle this information,
Expand All @@ -461,7 +461,7 @@ __Z_INLINE void handleProvideErc20(volatile uint32_t *flags, volatile uint32_t *
*flags |= IO_ASYNCH_REPLY;
}

__Z_INLINE void handleSetPlugin(volatile uint32_t *flags, volatile uint32_t *tx, uint32_t rx) {
__Z_INLINE void handleSetPlugin(volatile uint32_t *flags, volatile uint32_t *tx, __Z_UNUSED uint32_t rx) {
zemu_log("handleSetPlugin\n");

// This instruction is sent in the process of providing
Expand Down
4 changes: 2 additions & 2 deletions app/src/handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ void init_coin_config(chain_config_t *coin_config) {
* @note This function sets the blockchain configuration on the first call and logs each operation.
* It includes extensive error handling to gracefully manage exceptions and reset the context as needed.
*/
void handle_eth_apdu(uint32_t *flags, uint32_t *tx,
uint32_t rx, uint8_t *buffer, uint16_t bufferLen) {
void handle_eth_apdu(__Z_UNUSED uint32_t *flags, uint32_t *tx,
__Z_UNUSED uint32_t rx, uint8_t *buffer, __Z_UNUSED uint16_t bufferLen) {
unsigned short sw = 0;

// This is the best place to put this,
Expand Down
4 changes: 1 addition & 3 deletions app/src/wallet_id.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
// Use to hold the addr_ui object, used by rust to display the address
uint8_t addr_ui_obj[WALLET_UI_MAX_SIZE] = {0};



zxerr_t fill_wallet_id(
uint32_t *tx,
uint32_t rx,
Expand All @@ -49,7 +47,7 @@ zxerr_t fill_wallet_id(
zemu_log(data);
}

zxerr_t err = _app_fill_wallet(tx, rx, G_io_apdu_buffer, IO_APDU_BUFFER_SIZE, addr_ui_obj, WALLET_UI_MAX_SIZE);
zxerr_t err = _app_fill_wallet(tx, rx, buffer, buffer_len, addr_ui_obj, WALLET_UI_MAX_SIZE);

if (err != zxerr_ok)
action_addrResponseLen = 0;
Expand Down
1 change: 0 additions & 1 deletion app/src/wallet_id.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
extern "C" {
#endif


zxerr_t fill_wallet_id(
uint32_t *tx,
uint32_t rx,
Expand Down
6 changes: 2 additions & 4 deletions app/src/xaddr.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@
// Use to hold the addr_ui object, used by rust to display the address
uint8_t xaddr_ui_obj[ADDR_UI_MAX_SIZE] = {0};



zxerr_t fill_ext_address(
uint32_t *flags,
__Z_UNUSED uint32_t *flags,
uint32_t *tx,
uint32_t rx,
uint8_t *buffer,
Expand All @@ -44,7 +42,7 @@ zxerr_t fill_ext_address(

zemu_log("fill_ext_address\n");

zxerr_t err = _app_fill_ext_address(tx, rx, G_io_apdu_buffer, IO_APDU_BUFFER_SIZE, xaddr_ui_obj, ADDR_UI_MAX_SIZE);
zxerr_t err = _app_fill_ext_address(tx, rx, buffer, buffer_len, xaddr_ui_obj, ADDR_UI_MAX_SIZE);

if (err != zxerr_ok)
action_addrResponseLen = 0;
Expand Down
2 changes: 1 addition & 1 deletion app/src/xaddr.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ extern "C" {


zxerr_t fill_ext_address(
uint32_t *flags,
__Z_UNUSED uint32_t *flags,
uint32_t *tx,
uint32_t rx,
uint8_t *buffer,
Expand Down
Binary file modified tests_zemu/snapshots/fl-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/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-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/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.
Loading