From 477046bd43250bad25157ae91d06f878dcad765a Mon Sep 17 00:00:00 2001 From: Alexandre Paillier Date: Wed, 13 Apr 2022 17:02:33 +0200 Subject: [PATCH] Removed unused byte type --- src_features/signMessageEIP712/eip712.h | 22 ------------------- .../signMessageEIP712/sol_typenames.c | 8 +++---- 2 files changed, 3 insertions(+), 27 deletions(-) diff --git a/src_features/signMessageEIP712/eip712.h b/src_features/signMessageEIP712/eip712.h index c77b182..7b17f8f 100644 --- a/src_features/signMessageEIP712/eip712.h +++ b/src_features/signMessageEIP712/eip712.h @@ -23,7 +23,6 @@ typedef enum TYPE_SOL_ADDRESS, TYPE_SOL_BOOL, TYPE_SOL_STRING, - TYPE_SOL_BYTE, TYPE_SOL_BYTES_FIX, TYPE_SOL_BYTES_DYN, TYPES_COUNT @@ -68,27 +67,6 @@ typedef enum #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) -typedef struct -{ - uint16_t length; - char *str; -} t_string; - -typedef struct -{ - uint16_t size; - uint8_t *ptr; -} t_array; - -typedef struct -{ - t_string type; - t_string key; - uint8_t bytesize; - t_array array_levels; -} t_struct_field; - - // TODO: Move these into a new file const char *get_struct_name(const uint8_t *ptr, uint8_t *const length); const uint8_t *get_struct_fields_array(const uint8_t *ptr, diff --git a/src_features/signMessageEIP712/sol_typenames.c b/src_features/signMessageEIP712/sol_typenames.c index 09f8d2c..25c704f 100644 --- a/src_features/signMessageEIP712/sol_typenames.c +++ b/src_features/signMessageEIP712/sol_typenames.c @@ -46,8 +46,7 @@ bool init_sol_typenames(void) "address", // 2 "bool", // 3 "string", // 4 - "byte", // 5 - "bytes" // 6 + "bytes" // 5 }; // \ref TYPES_COUNT - 1 since we don't include \ref TYPE_CUSTOM const uint8_t enum_to_idx[TYPES_COUNT - 1][IDX_COUNT] = { @@ -56,9 +55,8 @@ bool init_sol_typenames(void) { TYPE_SOL_ADDRESS, 2 }, { TYPE_SOL_BOOL, 3 }, { TYPE_SOL_STRING, 4 }, - { TYPE_SOL_BYTE, 5 }, - { TYPE_SOL_BYTES_FIX, 6 }, - { TYPE_SOL_BYTES_DYN, 6 } + { TYPE_SOL_BYTES_FIX, 5 }, + { TYPE_SOL_BYTES_DYN, 5 } }; uint8_t *typename_len_ptr; char *typename_ptr;