Skip to content

Commit

Permalink
fix error list
Browse files Browse the repository at this point in the history
  • Loading branch information
abenso committed Jan 23, 2025
1 parent 833000b commit c92cd10
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions app/rust/src/parser/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ pub enum ParserError {
EffectHashError,
UndelegateClaimPlanError,
DelegatorVotePlanError,
PositionClosePlanError,
PositionOpenPlanError,
PositionWithdrawPlanError,
DutchAuctionSchedulePlanError,
DutchAuctionEndPlanError,
Expand Down
2 changes: 2 additions & 0 deletions app/src/common/parser_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ typedef enum {
parser_effect_hash_error,
parser_undelegate_claim_plan_error,
parser_delegator_vote_plan_error,
parser_position_close_plan_error,
parser_position_open_plan_error,
parser_position_withdraw_plan_error,
parser_action_dutch_auction_schedule_plan_error,
parser_action_dutch_auction_end_plan_error,
Expand Down
4 changes: 4 additions & 0 deletions app/src/parser_impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,10 @@ const char *parser_getErrorDescription(parser_error_t err) {
return "Undelegate claim plan error";
case parser_delegator_vote_plan_error:
return "Delegator vote plan error";
case parser_position_open_plan_error:
return "Position open plan error";
case parser_position_close_plan_error:
return "Position close plan error";
case parser_position_withdraw_plan_error:
return "Position withdraw plan error";

Expand Down
2 changes: 1 addition & 1 deletion app/src/plan/position_close.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ parser_error_t decode_position_close_plan(const bytes_t *data, position_close_pl
ASSET_ID_LEN);

if (!pb_decode(&stream, penumbra_core_component_dex_v1_PositionClose_fields, &position_close_pb)) {
return parser_output_plan_error;
return parser_position_close_plan_error;
}

position_close->has_position_id = position_close_pb.has_position_id;
Expand Down
2 changes: 1 addition & 1 deletion app/src/plan/position_open.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ parser_error_t decode_position_open_plan(const bytes_t *data, position_open_plan
&position_open->position.phi.pair.asset_2.inner, ASSET_ID_LEN);

if (!pb_decode(&stream, penumbra_core_component_dex_v1_PositionOpen_fields, &position_open_pb)) {
return parser_output_plan_error;
return parser_position_open_plan_error;
}

position_open->has_position = position_open_pb.has_position;
Expand Down
2 changes: 1 addition & 1 deletion app/src/plan/undelegate_claim.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ parser_error_t decode_undelegate_claim_plan(const bytes_t *data, undelegate_clai
&undelegate_claim_claim->balance_blinding, 32);

if (!pb_decode(&stream, penumbra_core_component_stake_v1_UndelegateClaimPlan_fields, &undelegate_claim_plan)) {
return parser_undelegate_plan_error;
return parser_undelegate_claim_plan_error;
}

undelegate_claim_claim->has_validator_identity = undelegate_claim_plan.has_validator_identity;
Expand Down

0 comments on commit c92cd10

Please sign in to comment.