From dd5fc505facf86a4aead15e78a9d375d7b09699b Mon Sep 17 00:00:00 2001 From: TamtamHero <10632523+TamtamHero@users.noreply.github.com> Date: Fri, 30 Oct 2020 14:50:18 +0100 Subject: [PATCH] Remove unused code --- src/eth_plugin_handler.c | 10 ---------- src/handle_swap_sign_transaction.c | 2 -- src/main.c | 4 ---- src/shared_context.h | 2 -- 4 files changed, 18 deletions(-) diff --git a/src/eth_plugin_handler.c b/src/eth_plugin_handler.c index 4b9da53..fd4d206 100644 --- a/src/eth_plugin_handler.c +++ b/src/eth_plugin_handler.c @@ -61,8 +61,6 @@ int eth_plugin_perform_init(uint8_t *contractAddress, ethPluginInitContract_t *i } } -#ifndef TARGET_BLUE - // Do not handle a plugin if running in swap mode if (called_from_swap && (contractAddress != NULL)) { PRINTF("eth_plug_init aborted in swap mode\n"); @@ -90,14 +88,6 @@ int eth_plugin_perform_init(uint8_t *contractAddress, ethPluginInitContract_t *i PRINTF("eth_plugin_init ok %s\n", dataContext.tokenContext.pluginName); dataContext.tokenContext.pluginAvailable = 1; return 1; - -#else - - // Disable plugins on Ledger Blue for the time being - - return 0; -#endif - } int eth_plugin_call(uint8_t *contractAddress, int method, void *parameter) { diff --git a/src/handle_swap_sign_transaction.c b/src/handle_swap_sign_transaction.c index ccfa280..3db3b93 100644 --- a/src/handle_swap_sign_transaction.c +++ b/src/handle_swap_sign_transaction.c @@ -47,8 +47,6 @@ void handle_swap_sign_transaction(create_transaction_parameters_t* sign_transact storage.initialized = 0x01; nvm_write((void*)&N_storage, (void*)&storage, sizeof(internalStorage_t)); } - dataAllowed = N_storage.dataAllowed; - contractDetails = N_storage.contractDetails; UX_INIT(); USB_power(0); diff --git a/src/main.c b/src/main.c index 24b5377..ec57c7d 100644 --- a/src/main.c +++ b/src/main.c @@ -48,8 +48,6 @@ dataContext_t dataContext; strings_t strings; cx_sha3_t global_sha3; -uint8_t dataAllowed; -uint8_t contractDetails; uint8_t appState; bool dataPresent; bool called_from_swap; @@ -627,8 +625,6 @@ void coin_main_with_config(chain_config_t *config) { storage.initialized = 0x01; nvm_write((void*)&N_storage, (void*)&storage, sizeof(internalStorage_t)); } - dataAllowed = N_storage.dataAllowed; - contractDetails = N_storage.contractDetails; USB_power(0); USB_power(1); diff --git a/src/shared_context.h b/src/shared_context.h index 0fc4485..054ef0f 100644 --- a/src/shared_context.h +++ b/src/shared_context.h @@ -163,8 +163,6 @@ extern cx_sha3_t global_sha3; extern const internalStorage_t N_storage_real; extern bool called_from_swap; -extern uint8_t dataAllowed; -extern uint8_t contractDetails; extern bool dataPresent; extern uint8_t appState; #ifdef HAVE_STARKWARE