Put externalPluginIsSet as its own global; initialize it at launch

This commit is contained in:
pscott
2021-05-11 19:08:04 +02:00
parent 0de6e1011a
commit b651f530be
4 changed files with 6 additions and 3 deletions

View File

@@ -15,6 +15,7 @@ void handleSetExternalPlugin(uint8_t p1,
UNUSED(p1);
UNUSED(p2);
UNUSED(flags);
PRINTF("Handling set External Plugin\n");
uint8_t hash[32];
cx_ecfp_public_key_t tokenKey;
uint8_t pluginNameLength = *workBuffer;
@@ -78,7 +79,7 @@ void handleSetExternalPlugin(uint8_t p1,
memmove(dataContext.tokenContext.contract_address, workBuffer, CONTRACT_ADDR_SIZE);
workBuffer += 20;
memmove(dataContext.tokenContext.method_selector, workBuffer, SELECTOR_SIZE);
tmpCtx.transactionContext.externalPluginIsSet = true;
externalPluginIsSet = true;
G_io_apdu_buffer[(*tx)++] = 0x90;
G_io_apdu_buffer[(*tx)++] = 0x00;