Remove data needed by plugins from shared_context file

This commit is contained in:
Francois Beutin
2024-01-15 19:08:19 +01:00
parent 3d9da0dd16
commit ca9d5c9c77
9 changed files with 55 additions and 21 deletions

View File

@@ -3,8 +3,13 @@
#include <stdbool.h>
#include <stdint.h>
#include "os.h"
#include "cx.h"
#include "ethUstream.h"
#include "tokens.h"
#include "extra_info.h"
#include "tx_content.h"
#include "chainConfig.h"
#include "nft.h"
#ifdef HAVE_NBGL
@@ -13,8 +18,6 @@
#define MAX_BIP32_PATH 10
#define WEI_TO_ETHER 18
#define SELECTOR_LENGTH 4
#define PLUGIN_ID_LENGTH 30
@@ -95,11 +98,6 @@ typedef struct publicKeyContext_t {
bool getChaincode;
} publicKeyContext_t;
typedef union extraInfo_t {
tokenDefinition_t token;
nftInfo_t nft;
} extraInfo_t;
typedef struct transactionContext_t {
bip32_path_t bip32;
uint8_t hash[INT256_LENGTH];
@@ -226,16 +224,6 @@ typedef enum {
extern pluginType_t pluginType;
typedef enum { CALLER_TYPE_CLONE, CALLER_TYPE_PLUGIN } e_caller_type;
typedef struct caller_app_t {
const char *name;
#ifdef HAVE_NBGL
const nbgl_icon_details_t *icon;
#endif
char type; // does not have to be set by the caller app
} caller_app_t;
extern uint8_t appState;
#ifdef HAVE_STARKWARE
extern bool quantumSet;
@@ -244,8 +232,6 @@ extern bool quantumSet;
extern uint32_t eth2WithdrawalIndex;
#endif
extern caller_app_t *caller_app;
void reset_app_context(void);
const uint8_t *parseBip32(const uint8_t *dataBuffer, uint8_t *dataLength, bip32_path_t *bip32);