diff --git a/app/src/substrate_dispatch_V2.c b/app/src/substrate_dispatch_V2.c index 231aad4..260a4e3 100644 --- a/app/src/substrate_dispatch_V2.c +++ b/app/src/substrate_dispatch_V2.c @@ -1210,7 +1210,7 @@ __Z_INLINE parser_error_t _readMethod_bounties_propose_bounty_V2( __Z_INLINE parser_error_t _readMethod_bounties_approve_bounty_V2( parser_context_t *c, pd_bounties_approve_bounty_V2_t *m) { - CHECK_ERROR(_readCompactu32(c, &m->bounty_id)) + CHECK_ERROR(_readCompactBountyIndex_V2(c, &m->bounty_id)) return parser_ok; } @@ -6293,7 +6293,7 @@ parser_error_t _getMethod_ItemValue_V2( switch (itemIdx) { case 0: /* bounties_approve_bounty_V2 - bounty_id */; - return _toStringCompactu32( + return _toStringCompactBountyIndex_V2( &m->basic.bounties_approve_bounty_V2.bounty_id, outValue, outValueLen, pageIdx, pageCount); diff --git a/app/src/substrate_functions_V2.h b/app/src/substrate_functions_V2.h index 3bec343..29ff3aa 100644 --- a/app/src/substrate_functions_V2.h +++ b/app/src/substrate_functions_V2.h @@ -121,6 +121,7 @@ parser_error_t _readschedulePeriodBlockNumber_V2(parser_context_t* c, pd_schedul parser_error_t _readschedulePriority_V2(parser_context_t* c, pd_schedulePriority_V2_t* v); parser_error_t _readAccountIdLookupOfT_V2(parser_context_t* c, pd_AccountIdLookupOfT_V2_t* v); parser_error_t _readOptionCompactu128_V2(parser_context_t* c, pd_OptionCompactu128_V2_t* v); +parser_error_t _readCompactBountyIndex_V2(parser_context_t* c, pd_CompactBountyIndex_V2_t* v); // toString functions parser_error_t _toStringAccountId_V2( @@ -158,6 +159,13 @@ parser_error_t _toStringAccountVote_V2( uint8_t pageIdx, uint8_t* pageCount); +parser_error_t _toStringCompactBountyIndex_V2( + const pd_CompactBountyIndex_V2_t* v, + char* outValue, + uint16_t outValueLen, + uint8_t pageIdx, + uint8_t* pageCount); + parser_error_t _toStringAuthorityIdasRuntimeAppPublicSignature_V2( const pd_AuthorityIdasRuntimeAppPublicSignature_V2_t* v, char* outValue, diff --git a/app/src/substrate_methods_V2.h b/app/src/substrate_methods_V2.h index 971948c..087af58 100644 --- a/app/src/substrate_methods_V2.h +++ b/app/src/substrate_methods_V2.h @@ -880,7 +880,7 @@ typedef struct { #define PD_CALL_BOUNTIES_APPROVE_BOUNTY_V2 1 typedef struct { - pd_Compactu32_t bounty_id; + pd_CompactBountyIndex_V2_t bounty_id; } pd_bounties_approve_bounty_V2_t; #define PD_CALL_BOUNTIES_PROPOSE_CURATOR_V2 2 diff --git a/app/src/substrate_types_V2.c b/app/src/substrate_types_V2.c index 468ef01..efd37f0 100644 --- a/app/src/substrate_types_V2.c +++ b/app/src/substrate_types_V2.c @@ -49,6 +49,11 @@ parser_error_t _readAccountVoteStandard_V2(parser_context_t* c, pd_AccountVoteSt return parser_ok; } +parser_error_t _readCompactBountyIndex_V2(parser_context_t* c, pd_CompactBountyIndex_V2_t* v) +{ + return _readCompactInt(c, v); +} + parser_error_t _readAccountVote_V2(parser_context_t* c, pd_AccountVote_V2_t* v) { CHECK_INPUT() @@ -1340,6 +1345,16 @@ parser_error_t _toStringLookupSource_V2( return parser_ok; } +parser_error_t _toStringCompactBountyIndex_V2( + const pd_CompactBountyIndex_V2_t* v, + char* outValue, + uint16_t outValueLen, + uint8_t pageIdx, + uint8_t* pageCount) +{ + return _toStringCompactInt(v, 0, "", "", outValue, outValueLen, pageIdx, pageCount); +} + parser_error_t _toStringLeasePeriodOfT_V2( const pd_LeasePeriodOfT_V2_t* v, char* outValue, diff --git a/app/src/substrate_types_V2.h b/app/src/substrate_types_V2.h index 4a6933e..6eae2c3 100644 --- a/app/src/substrate_types_V2.h +++ b/app/src/substrate_types_V2.h @@ -30,6 +30,8 @@ typedef struct { const uint8_t* _ptr; } pd_AccountId_V2_t; +typedef compactInt_t pd_CompactBountyIndex_V2_t; + typedef struct { uint8_t value; union {