From b3bcaea44acc7495c2c9234d38f1146638b308e4 Mon Sep 17 00:00:00 2001 From: apaillier-ledger Date: Tue, 16 May 2023 12:45:41 +0000 Subject: [PATCH 1/3] [create-pull-request] automated change --- ethereum-plugin-sdk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethereum-plugin-sdk b/ethereum-plugin-sdk index a4b971f..b9777e7 160000 --- a/ethereum-plugin-sdk +++ b/ethereum-plugin-sdk @@ -1 +1 @@ -Subproject commit a4b971f67980694d8c3862e793859209bc525545 +Subproject commit b9777e7a81a9c33b3f8997ffa23396fa2b3f861d From 5f7cc79f16107a10e45f6aa2ee9a895a574dc730 Mon Sep 17 00:00:00 2001 From: Alexandre Paillier Date: Tue, 16 May 2023 18:18:08 +0200 Subject: [PATCH 2/3] Limit caller_type struct handling for only Stax --- src/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.c b/src/main.c index 08113ae..ac4bd30 100644 --- a/src/main.c +++ b/src/main.c @@ -69,7 +69,9 @@ bolos_ux_params_t G_ux_params; const internalStorage_t N_storage_real; +#ifdef HAVE_NBGL caller_app_t *caller_app = NULL; +#endif chain_config_t *chainConfig = NULL; void reset_app_context() { @@ -957,6 +959,7 @@ void coin_main(libargs_t *args) { if (args->chain_config != NULL) { chainConfig = args->chain_config; } +#ifdef HAVE_NBGL if ((caller_app = args->caller_app) != NULL) { if (chainConfig != NULL) { caller_app->type = CALLER_TYPE_CLONE; @@ -964,6 +967,7 @@ void coin_main(libargs_t *args) { caller_app->type = CALLER_TYPE_PLUGIN; } } +#endif } if (chainConfig == NULL) { init_coin_config(&config); From 52e6c29aaeee65505a9d9344f96827fd1608518d Mon Sep 17 00:00:00 2001 From: Alexandre Paillier Date: Tue, 16 May 2023 18:22:44 +0200 Subject: [PATCH 3/3] BLE handling for all BLE-enabled devices --- src/handle_swap_sign_transaction.c | 6 ++---- src/main.c | 6 +++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/handle_swap_sign_transaction.c b/src/handle_swap_sign_transaction.c index 7eb0e27..3a7fcd0 100644 --- a/src/handle_swap_sign_transaction.c +++ b/src/handle_swap_sign_transaction.c @@ -78,13 +78,11 @@ void handle_swap_sign_transaction(chain_config_t* config) { USB_power(1); // ui_idle(); PRINTF("USB power ON/OFF\n"); -#ifdef TARGET_NANOX +#ifdef HAVE_BLE // grab the current plane mode setting G_io_app.plane_mode = os_setting_get(OS_SETTING_PLANEMODE, NULL, 0); -#endif // TARGET_NANOX -#ifdef HAVE_BLE BLE_power(0, NULL); - BLE_power(1, "Nano X"); + BLE_power(1, NULL); #endif // HAVE_BLE app_main(); } diff --git a/src/main.c b/src/main.c index ac4bd30..6967042 100644 --- a/src/main.c +++ b/src/main.c @@ -989,10 +989,10 @@ void coin_main(libargs_t *args) { TRY { io_seproxyhal_init(); -#ifdef TARGET_NANOX +#ifdef HAVE_BLE // grab the current plane mode setting G_io_app.plane_mode = os_setting_get(OS_SETTING_PLANEMODE, NULL, 0); -#endif // TARGET_NANOX +#endif // HAVE_BLE if (!N_storage.initialized) { internalStorage_t storage; @@ -1020,7 +1020,7 @@ void coin_main(libargs_t *args) { #ifdef HAVE_BLE BLE_power(0, NULL); - BLE_power(1, "Nano X"); + BLE_power(1, NULL); #endif // HAVE_BLE #ifdef HAVE_DOMAIN_NAME