Added a global apdu response code variable
This commit is contained in:
@@ -34,6 +34,15 @@
|
||||
#define COMMON_CLA 0xB0
|
||||
#define COMMON_INS_GET_WALLET_ID 0x04
|
||||
|
||||
#define APDU_RESPONSE_OK 0x9000
|
||||
#define APDU_RESPONSE_INVALID_DATA 0x6a80
|
||||
#define APDU_RESPONSE_INSUFFICIENT_MEMORY 0x6a84
|
||||
#define APDU_RESPONSE_INVALID_INS 0x6d00
|
||||
#define APDU_RESPONSE_INVALID_P1_P2 0x6b00
|
||||
#define APDU_RESPONSE_CONDITION_NOT_SATISFIED 0x6985
|
||||
#define APDU_RESPONSE_REF_DATA_NOT_USABLE 0x6a88
|
||||
|
||||
|
||||
#ifdef HAVE_STARKWARE
|
||||
|
||||
#define STARKWARE_CLA 0xF0
|
||||
@@ -180,4 +189,6 @@ bool handle_eip712_sign(const uint8_t *const apdu_buf);
|
||||
bool handle_eip712_filtering(const uint8_t *const apdu_buf);
|
||||
#endif // HAVE_EIP712_FULL_SUPPORT
|
||||
|
||||
extern uint16_t apdu_response_code;
|
||||
|
||||
#endif // _APDU_CONSTANTS_H_
|
||||
|
||||
@@ -50,6 +50,7 @@ strings_t strings;
|
||||
cx_sha3_t global_sha3;
|
||||
|
||||
uint8_t appState;
|
||||
uint16_t apdu_response_code;
|
||||
bool called_from_swap;
|
||||
pluginType_t pluginType;
|
||||
#ifdef HAVE_STARKWARE
|
||||
@@ -70,7 +71,7 @@ const internalStorage_t N_storage_real;
|
||||
chain_config_t *chainConfig;
|
||||
|
||||
void reset_app_context() {
|
||||
// PRINTF("!!RESET_APP_CONTEXT\n");
|
||||
//PRINTF("!!RESET_APP_CONTEXT\n");
|
||||
appState = APP_STATE_IDLE;
|
||||
called_from_swap = false;
|
||||
pluginType = OLD_INTERNAL;
|
||||
|
||||
Reference in New Issue
Block a user