Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosala committed Jun 26, 2022
1 parent 3fc8dec commit 4fc7818
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 386 deletions.
1 change: 1 addition & 0 deletions app/src/common/parser_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ typedef enum {
parser_tx_nesting_not_supported,
parser_tx_nesting_limit_reached,
parser_tx_call_vec_too_large,
parser_junction_limit,
} parser_error_t;

typedef struct {
Expand Down
1 change: 0 additions & 1 deletion app/src/substrate/substrate_coin.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ typedef enum {

#define MENU_MAIN_APP_LINE1 "Nodle"
#define MENU_MAIN_APP_LINE2 "Ready"
#define MENU_MAIN_APP_LINE2_SECRET "NODL RECOVERY"
#define APPVERSION_LINE1 "Nodle"
#define APPVERSION_LINE2 "v" APPVERSION

Expand Down
16 changes: 0 additions & 16 deletions app/src/substrate/substrate_functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,11 @@ parser_error_t _readCallImpl(parser_context_t* c, pd_Call_t* v, pd_MethodNested_
parser_error_t _readBalance(parser_context_t* c, pd_Balance_t* v);
parser_error_t _readBytes(parser_context_t* c, pd_Bytes_t* v);
parser_error_t _readCall(parser_context_t* c, pd_Call_t* v);
parser_error_t _readHeader(parser_context_t* c, pd_Header_t* v);
parser_error_t _readBalanceOf(parser_context_t* c, pd_BalanceOf_t* v);
parser_error_t _readProposal(parser_context_t* c, pd_Proposal_t* v);
parser_error_t _readVecCall(parser_context_t* c, pd_VecCall_t* v);
parser_error_t _readH256(parser_context_t* c, pd_H256_t* v);
parser_error_t _readHash(parser_context_t* c, pd_Hash_t* v);
parser_error_t _readVecHeader(parser_context_t* c, pd_VecHeader_t* v);
parser_error_t _readVecu8(parser_context_t* c, pd_Vecu8_t* v);

// Common toString functions
Expand Down Expand Up @@ -125,13 +123,6 @@ parser_error_t _toStringCall(
uint8_t pageIdx,
uint8_t* pageCount);

parser_error_t _toStringHeader(
const pd_Header_t* v,
char* outValue,
uint16_t outValueLen,
uint8_t pageIdx,
uint8_t* pageCount);

parser_error_t _toStringBalanceOf(
const pd_BalanceOf_t* v,
char* outValue,
Expand Down Expand Up @@ -167,13 +158,6 @@ parser_error_t _toStringHash(
uint8_t pageIdx,
uint8_t* pageCount);

parser_error_t _toStringVecHeader(
const pd_VecHeader_t* v,
char* outValue,
uint16_t outValueLen,
uint8_t pageIdx,
uint8_t* pageCount);

parser_error_t _toStringVecu8(
const pd_Vecu8_t* v,
char* outValue,
Expand Down
88 changes: 0 additions & 88 deletions app/src/substrate/substrate_functions_V1.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,10 @@ extern "C" {
// Read functions
parser_error_t _readAccountId_V1(parser_context_t* c, pd_AccountId_V1_t* v);
parser_error_t _readBoundedVecu8_V1(parser_context_t* c, pd_BoundedVecu8_V1_t* v);
parser_error_t _readBoxCallOrHashOfT_V1(parser_context_t* c, pd_BoxCallOrHashOfT_V1_t* v);
parser_error_t _readBoxPalletsOrigin_V1(parser_context_t* c, pd_BoxPalletsOrigin_V1_t* v);
parser_error_t _readClassId_V1(parser_context_t* c, pd_ClassId_V1_t* v);
parser_error_t _readCompactAccountIndex_V1(parser_context_t* c, pd_CompactAccountIndex_V1_t* v);
parser_error_t _readDestroyWitness_V1(parser_context_t* c, pd_DestroyWitness_V1_t* v);
parser_error_t _readInstanceId_V1(parser_context_t* c, pd_InstanceId_V1_t* v);
parser_error_t _readKeyValue_V1(parser_context_t* c, pd_KeyValue_V1_t* v);
parser_error_t _readKey_V1(parser_context_t* c, pd_Key_V1_t* v);
parser_error_t _readKeys_V1(parser_context_t* c, pd_Keys_V1_t* v);
parser_error_t _readLookupasStaticLookupSource_V1(parser_context_t* c, pd_LookupasStaticLookupSource_V1_t* v);
parser_error_t _readMemberCount_V1(parser_context_t* c, pd_MemberCount_V1_t* v);
Expand All @@ -45,20 +41,13 @@ parser_error_t _readOptionClassId_V1(parser_context_t* c, pd_OptionClassId_V1_t*
parser_error_t _readOptionInstanceId_V1(parser_context_t* c, pd_OptionInstanceId_V1_t* v);
parser_error_t _readOptionLookupasStaticLookupSource_V1(parser_context_t* c, pd_OptionLookupasStaticLookupSource_V1_t* v);
parser_error_t _readOptionTimepoint_V1(parser_context_t* c, pd_OptionTimepoint_V1_t* v);
parser_error_t _readOptionschedulePeriodBlockNumber_V1(parser_context_t* c, pd_OptionschedulePeriodBlockNumber_V1_t* v);
parser_error_t _readParachainInherentData_V1(parser_context_t* c, pd_ParachainInherentData_V1_t* v);
parser_error_t _readPerbill_V1(parser_context_t* c, pd_Perbill_V1_t* v);
parser_error_t _readTimepoint_V1(parser_context_t* c, pd_Timepoint_V1_t* v);
parser_error_t _readUpwardMessage_V1(parser_context_t* c, pd_UpwardMessage_V1_t* v);
parser_error_t _readVecAccountId_V1(parser_context_t* c, pd_VecAccountId_V1_t* v);
parser_error_t _readVecInstanceId_V1(parser_context_t* c, pd_VecInstanceId_V1_t* v);
parser_error_t _readVecKeyValue_V1(parser_context_t* c, pd_VecKeyValue_V1_t* v);
parser_error_t _readVecKey_V1(parser_context_t* c, pd_VecKey_V1_t* v);
parser_error_t _readVecVestingScheduleOf_V1(parser_context_t* c, pd_VecVestingScheduleOf_V1_t* v);
parser_error_t _readVestingScheduleOf_V1(parser_context_t* c, pd_VestingScheduleOf_V1_t* v);
parser_error_t _readWeight_V1(parser_context_t* c, pd_Weight_V1_t* v);
parser_error_t _readschedulePeriodBlockNumber_V1(parser_context_t* c, pd_schedulePeriodBlockNumber_V1_t* v);
parser_error_t _readschedulePriority_V1(parser_context_t* c, pd_schedulePriority_V1_t* v);

// toString functions
parser_error_t _toStringAccountId_V1(
Expand All @@ -75,20 +64,6 @@ parser_error_t _toStringBoundedVecu8_V1(
uint8_t pageIdx,
uint8_t* pageCount);

parser_error_t _toStringBoxCallOrHashOfT_V1(
const pd_BoxCallOrHashOfT_V1_t* v,
char* outValue,
uint16_t outValueLen,
uint8_t pageIdx,
uint8_t* pageCount);

parser_error_t _toStringBoxPalletsOrigin_V1(
const pd_BoxPalletsOrigin_V1_t* v,
char* outValue,
uint16_t outValueLen,
uint8_t pageIdx,
uint8_t* pageCount);

parser_error_t _toStringClassId_V1(
const pd_ClassId_V1_t* v,
char* outValue,
Expand Down Expand Up @@ -117,20 +92,6 @@ parser_error_t _toStringInstanceId_V1(
uint8_t pageIdx,
uint8_t* pageCount);

parser_error_t _toStringKeyValue_V1(
const pd_KeyValue_V1_t* v,
char* outValue,
uint16_t outValueLen,
uint8_t pageIdx,
uint8_t* pageCount);

parser_error_t _toStringKey_V1(
const pd_Key_V1_t* v,
char* outValue,
uint16_t outValueLen,
uint8_t pageIdx,
uint8_t* pageCount);

parser_error_t _toStringKeys_V1(
const pd_Keys_V1_t* v,
char* outValue,
Expand Down Expand Up @@ -194,20 +155,6 @@ parser_error_t _toStringOptionTimepoint_V1(
uint8_t pageIdx,
uint8_t* pageCount);

parser_error_t _toStringOptionschedulePeriodBlockNumber_V1(
const pd_OptionschedulePeriodBlockNumber_V1_t* v,
char* outValue,
uint16_t outValueLen,
uint8_t pageIdx,
uint8_t* pageCount);

parser_error_t _toStringParachainInherentData_V1(
const pd_ParachainInherentData_V1_t* v,
char* outValue,
uint16_t outValueLen,
uint8_t pageIdx,
uint8_t* pageCount);

parser_error_t _toStringPerbill_V1(
const pd_Perbill_V1_t* v,
char* outValue,
Expand All @@ -222,13 +169,6 @@ parser_error_t _toStringTimepoint_V1(
uint8_t pageIdx,
uint8_t* pageCount);

parser_error_t _toStringUpwardMessage_V1(
const pd_UpwardMessage_V1_t* v,
char* outValue,
uint16_t outValueLen,
uint8_t pageIdx,
uint8_t* pageCount);

parser_error_t _toStringVecAccountId_V1(
const pd_VecAccountId_V1_t* v,
char* outValue,
Expand All @@ -243,20 +183,6 @@ parser_error_t _toStringVecInstanceId_V1(
uint8_t pageIdx,
uint8_t* pageCount);

parser_error_t _toStringVecKeyValue_V1(
const pd_VecKeyValue_V1_t* v,
char* outValue,
uint16_t outValueLen,
uint8_t pageIdx,
uint8_t* pageCount);

parser_error_t _toStringVecKey_V1(
const pd_VecKey_V1_t* v,
char* outValue,
uint16_t outValueLen,
uint8_t pageIdx,
uint8_t* pageCount);

parser_error_t _toStringVecVestingScheduleOf_V1(
const pd_VecVestingScheduleOf_V1_t* v,
char* outValue,
Expand All @@ -278,20 +204,6 @@ parser_error_t _toStringWeight_V1(
uint8_t pageIdx,
uint8_t* pageCount);

parser_error_t _toStringschedulePeriodBlockNumber_V1(
const pd_schedulePeriodBlockNumber_V1_t* v,
char* outValue,
uint16_t outValueLen,
uint8_t pageIdx,
uint8_t* pageCount);

parser_error_t _toStringschedulePriority_V1(
const pd_schedulePriority_V1_t* v,
char* outValue,
uint16_t outValueLen,
uint8_t pageIdx,
uint8_t* pageCount);

#ifdef __cplusplus
}
#endif
29 changes: 0 additions & 29 deletions app/src/substrate/substrate_types.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,6 @@ parser_error_t _readCall(parser_context_t* c, pd_Call_t* v)
return parser_ok;
}

parser_error_t _readHeader(parser_context_t* c, pd_Header_t* v)
{
return parser_not_supported;
}

parser_error_t _readBalanceOf(parser_context_t* c, pd_BalanceOf_t* v)
{
return _readBalance(c, &v->value);
Expand Down Expand Up @@ -194,10 +189,6 @@ parser_error_t _readHash(parser_context_t* c, pd_Hash_t* v) {
GEN_DEF_READARRAY(32)
}

parser_error_t _readVecHeader(parser_context_t* c, pd_VecHeader_t* v) {
GEN_DEF_READVECTOR(Header)
}

parser_error_t _readVecu8(parser_context_t* c, pd_Vecu8_t* v) {
GEN_DEF_READVECTOR(u8)
}
Expand Down Expand Up @@ -449,17 +440,6 @@ parser_error_t _toStringCall(
return parser_display_idx_out_of_range;
}

parser_error_t _toStringHeader(
const pd_Header_t* v,
char* outValue,
uint16_t outValueLen,
uint8_t pageIdx,
uint8_t* pageCount)
{
CLEAN_AND_CHECK()
return parser_print_not_supported;
}

parser_error_t _toStringBalanceOf(
const pd_BalanceOf_t* v,
char* outValue,
Expand Down Expand Up @@ -559,15 +539,6 @@ parser_error_t _toStringHash(
GEN_DEF_TOSTRING_ARRAY(32)
}

parser_error_t _toStringVecHeader(
const pd_VecHeader_t* v,
char* outValue,
uint16_t outValueLen,
uint8_t pageIdx,
uint8_t* pageCount) {
GEN_DEF_TOSTRING_VECTOR(Header)
}

parser_error_t _toStringVecu8(
const pd_Vecu8_t* v,
char* outValue,
Expand Down
11 changes: 0 additions & 11 deletions app/src/substrate/substrate_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,6 @@ typedef struct {
pd_NestCallIdx_t nestCallIdx;
} pd_Call_t;

typedef struct {
// TODO: Not implemented
uint8_t _NOT_IMPLEMENTED__DO_NOT_USE;
} pd_Header_t;

typedef struct {
pd_Balance_t value;
} pd_BalanceOf_t;
Expand All @@ -123,12 +118,6 @@ typedef struct {
const uint8_t* _ptr;
} pd_Hash_t;

typedef struct {
uint64_t _len;
const uint8_t* _ptr;
uint64_t _lenBuffer;
} pd_VecHeader_t;

typedef struct {
uint64_t _len;
const uint8_t* _ptr;
Expand Down
Loading

0 comments on commit 4fc7818

Please sign in to comment.