Rename called_from_swap to G_called_from_swap

This commit is contained in:
Francois Beutin
2023-06-30 14:05:46 +02:00
parent 1edf9cdb6a
commit 02cdc23751
8 changed files with 14 additions and 14 deletions

View File

@@ -149,7 +149,7 @@ eth_plugin_result_t eth_plugin_perform_init(uint8_t *contractAddress,
}
// Do not handle a plugin if running in swap mode
if (called_from_swap && (contractAddress != NULL)) {
if (G_called_from_swap && (contractAddress != NULL)) {
PRINTF("eth_plug_init aborted in swap mode\n");
return 0;
}

View File

@@ -54,7 +54,7 @@ bool copy_transaction_parameters(create_transaction_parameters_t* sign_transacti
void handle_swap_sign_transaction(chain_config_t* config) {
chainConfig = config;
reset_app_context();
called_from_swap = true;
G_called_from_swap = true;
io_seproxyhal_init();
if (N_storage.initialized != 0x01) {

View File

@@ -52,7 +52,7 @@ cx_sha3_t global_sha3;
uint8_t appState;
uint16_t apdu_response_code;
bool called_from_swap;
bool G_called_from_swap;
pluginType_t pluginType;
#ifdef HAVE_STARKWARE
bool quantumSet;
@@ -77,7 +77,7 @@ chain_config_t *chainConfig = NULL;
void reset_app_context() {
// PRINTF("!!RESET_APP_CONTEXT\n");
appState = APP_STATE_IDLE;
called_from_swap = false;
G_called_from_swap = false;
pluginType = OLD_INTERNAL;
#ifdef HAVE_STARKWARE
quantumSet = false;

View File

@@ -213,7 +213,7 @@ extern strings_t strings;
extern cx_sha3_t global_sha3;
extern const internalStorage_t N_storage_real;
extern bool called_from_swap;
extern bool G_called_from_swap;
typedef enum {
EXTERNAL, // External plugin, set by setExternalPlugin.