Skip to content

Commit

Permalink
test to find error
Browse files Browse the repository at this point in the history
  • Loading branch information
abenso committed Jan 24, 2025
1 parent 7d9ce24 commit da80886
Show file tree
Hide file tree
Showing 14 changed files with 43 additions and 15 deletions.
4 changes: 3 additions & 1 deletion app/src/plan/action_dutch_auction_end.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ parser_error_t action_dutch_auction_end_getItem(const parser_context_t *ctx,

char bufferUI[DUTCH_AUCTION_END_DISPLAY_MAX_LEN] = {0};

snprintf(outKey, outKeyLen, "Action_%d", actionIdx);
snprintf(outKey, outKeyLen, "Action_");
uint16_t written_value_key = strlen(outKey);
snprintf(outKey + written_value_key, outKeyLen - written_value_key, "%d", actionIdx);
CHECK_ERROR(action_dutch_auction_end_printValue(ctx, action_dutch_auction_end, bufferUI, sizeof(bufferUI)));
pageString(outVal, outValLen, bufferUI, pageIdx, pageCount);

Expand Down
4 changes: 3 additions & 1 deletion app/src/plan/action_dutch_auction_schedule.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ parser_error_t action_dutch_auction_schedule_getItem(

char bufferUI[DUTCH_AUCTION_SCHEDULE_DISPLAY_MAX_LEN] = {0};

snprintf(outKey, outKeyLen, "Action_%d", actionIdx);
snprintf(outKey, outKeyLen, "Action_");
uint16_t written_value_key = strlen(outKey);
snprintf(outKey + written_value_key, outKeyLen - written_value_key, "%d", actionIdx);
CHECK_ERROR(action_dutch_auction_schedule_printValue(ctx, action_dutch_auction_schedule, bufferUI, sizeof(bufferUI)));
pageString(outVal, outValLen, bufferUI, pageIdx, pageCount);

Expand Down
4 changes: 3 additions & 1 deletion app/src/plan/action_dutch_auction_withdraw.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ parser_error_t action_dutch_auction_withdraw_getItem(

char bufferUI[DUTCH_AUCTION_WITHDRAW_DISPLAY_MAX_LEN] = {0};

snprintf(outKey, outKeyLen, "Action_%d", actionIdx);
snprintf(outKey, outKeyLen, "Action_");
uint16_t written_value_key = strlen(outKey);
snprintf(outKey + written_value_key, outKeyLen - written_value_key, "%d", actionIdx);
CHECK_ERROR(action_dutch_auction_withdraw_printValue(ctx, action_dutch_auction_withdraw, bufferUI, sizeof(bufferUI)));
pageString(outVal, outValLen, bufferUI, pageIdx, pageCount);

Expand Down
4 changes: 3 additions & 1 deletion app/src/plan/delegate.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ parser_error_t delegate_getItem(const parser_context_t *ctx, const delegate_plan

char bufferUI[DELEGATE_DISPLAY_MAX_LEN] = {0};

snprintf(outKey, outKeyLen, "Action_%d", actionIdx);
snprintf(outKey, outKeyLen, "Action_");
uint16_t written_value_key = strlen(outKey);
snprintf(outKey + written_value_key, outKeyLen - written_value_key, "%d", actionIdx);
CHECK_ERROR(delegate_printValue(ctx, delegate, bufferUI, sizeof(bufferUI)));
pageString(outVal, outValLen, bufferUI, pageIdx, pageCount);

Expand Down
4 changes: 3 additions & 1 deletion app/src/plan/delegator_vote.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ parser_error_t delegator_vote_getItem(const parser_context_t *ctx, const delegat

char bufferUI[DELEGATE_DISPLAY_MAX_LEN] = {0};

snprintf(outKey, outKeyLen, "Action_%d", actionIdx);
snprintf(outKey, outKeyLen, "Action_");
uint16_t written_value_key = strlen(outKey);
snprintf(outKey + written_value_key, outKeyLen - written_value_key, "%d", actionIdx);
CHECK_ERROR(delegator_vote_printValue(ctx, delegator_vote, bufferUI, sizeof(bufferUI)));
pageString(outVal, outValLen, bufferUI, pageIdx, pageCount);

Expand Down
4 changes: 3 additions & 1 deletion app/src/plan/ics20_withdrawal.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ parser_error_t ics20_withdrawal_getItem(const parser_context_t *ctx, const ics20

char bufferUI[ICS20_WITHDRAWAL_DISPLAY_MAX_LEN] = {0};

snprintf(outKey, outKeyLen, "Action_%d", actionIdx);
snprintf(outKey, outKeyLen, "Action_");
uint16_t written_value_key = strlen(outKey);
snprintf(outKey + written_value_key, outKeyLen - written_value_key, "%d", actionIdx);
CHECK_ERROR(ics20_withdrawal_printValue(ctx, ics20_withdrawal, bufferUI, sizeof(bufferUI)));
pageString(outVal, outValLen, bufferUI, pageIdx, pageCount);

Expand Down
4 changes: 3 additions & 1 deletion app/src/plan/output.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ parser_error_t output_getItem(const parser_context_t *ctx, const output_plan_t *

char bufferUI[OUTPUT_DISPLAY_MAX_LEN] = {0};

snprintf(outKey, outKeyLen, "Action_%d", actionIdx);
snprintf(outKey, outKeyLen, "Action_");
uint16_t written_value_key = strlen(outKey);
snprintf(outKey + written_value_key, outKeyLen - written_value_key, "%d", actionIdx);
CHECK_ERROR(output_printValue(ctx, output, bufferUI, sizeof(bufferUI)));
pageString(outVal, outValLen, bufferUI, pageIdx, pageCount);

Expand Down
4 changes: 3 additions & 1 deletion app/src/plan/position_close.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ parser_error_t position_close_getItem(const parser_context_t *ctx, const positio

char bufferUI[POSITION_CLOSE_DISPLAY_MAX_LEN] = {0};

snprintf(outKey, outKeyLen, "Action_%d", actionIdx);
snprintf(outKey, outKeyLen, "Action_");
uint16_t written_value_key = strlen(outKey);
snprintf(outKey + written_value_key, outKeyLen - written_value_key, "%d", actionIdx);
CHECK_ERROR(position_close_printValue(ctx, position_close, bufferUI, sizeof(bufferUI)));
pageString(outVal, outValLen, bufferUI, pageIdx, pageCount);

Expand Down
4 changes: 3 additions & 1 deletion app/src/plan/position_open.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ parser_error_t position_open_getItem(const parser_context_t *ctx, const position

char bufferUI[POSITION_OPEN_DISPLAY_MAX_LEN] = {0};

snprintf(outKey, outKeyLen, "Action_%d", actionIdx);
snprintf(outKey, outKeyLen, "Action_");
uint16_t written_value_key = strlen(outKey);
snprintf(outKey + written_value_key, outKeyLen - written_value_key, "%d", actionIdx);
CHECK_ERROR(position_open_printValue(ctx, position_open, bufferUI, sizeof(bufferUI)));
pageString(outVal, outValLen, bufferUI, pageIdx, pageCount);

Expand Down
4 changes: 3 additions & 1 deletion app/src/plan/position_withdraw.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ parser_error_t position_withdraw_getItem(const parser_context_t *ctx, const posi

char bufferUI[POSITION_WITHDRAW_DISPLAY_MAX_LEN] = {0};

snprintf(outKey, outKeyLen, "Action_%d", actionIdx);
snprintf(outKey, outKeyLen, "Action_");
uint16_t written_value_key = strlen(outKey);
snprintf(outKey + written_value_key, outKeyLen - written_value_key, "%d", actionIdx);
CHECK_ERROR(position_withdraw_printValue(ctx, position_withdraw, bufferUI, sizeof(bufferUI)));
pageString(outVal, outValLen, bufferUI, pageIdx, pageCount);

Expand Down
6 changes: 4 additions & 2 deletions app/src/plan/spend.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ parser_error_t spend_printValue(const parser_context_t *ctx, const spend_plan_t
// example: Spend 100 USDC to penumbra1k0zzug62gpz60sejdvu9q7mq…

// add action title
snprintf(outVal, outValLen, "%s", "Spend ");
snprintf(outVal, outValLen, "Spend ");
uint16_t written_value = strlen(outVal);

// add value
Expand Down Expand Up @@ -115,7 +115,9 @@ parser_error_t spend_getItem(const parser_context_t *ctx, const spend_plan_t *sp

char bufferUI[SPEND_DISPLAY_MAX_LEN] = {0};

snprintf(outKey, outKeyLen, "Action_%d", actionIdx);
snprintf(outKey, outKeyLen, "Action_");
uint16_t written_value_key = strlen(outKey);
snprintf(outKey + written_value_key, outKeyLen - written_value_key, "%d", actionIdx);
CHECK_ERROR(spend_printValue(ctx, spend, bufferUI, sizeof(bufferUI)));
pageString(outVal, outValLen, bufferUI, pageIdx, pageCount);

Expand Down
4 changes: 3 additions & 1 deletion app/src/plan/swap.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ parser_error_t swap_getItem(const parser_context_t *ctx, const swap_plan_t *swap

char bufferUI[SWAP_DISPLAY_MAX_LEN] = {0};

snprintf(outKey, outKeyLen, "Action_%d", actionIdx);
snprintf(outKey, outKeyLen, "Action_");
uint16_t written_value_key = strlen(outKey);
snprintf(outKey + written_value_key, outKeyLen - written_value_key, "%d", actionIdx);
CHECK_ERROR(swap_printValue(ctx, swap, bufferUI, sizeof(bufferUI)));
pageString(outVal, outValLen, bufferUI, pageIdx, pageCount);

Expand Down
4 changes: 3 additions & 1 deletion app/src/plan/undelegate.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ parser_error_t undelegate_getItem(const parser_context_t *ctx, const undelegate_

char bufferUI[UNDELEGATE_DISPLAY_MAX_LEN] = {0};

snprintf(outKey, outKeyLen, "Action_%d", actionIdx);
snprintf(outKey, outKeyLen, "Action_");
uint16_t written_value_key = strlen(outKey);
snprintf(outKey + written_value_key, outKeyLen - written_value_key, "%d", actionIdx);
CHECK_ERROR(undelegate_printValue(ctx, undelegate, bufferUI, sizeof(bufferUI)));
pageString(outVal, outValLen, bufferUI, pageIdx, pageCount);

Expand Down
4 changes: 3 additions & 1 deletion app/src/plan/undelegate_claim.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ parser_error_t undelegate_claim_getItem(const parser_context_t *ctx, const undel

char bufferUI[UNDELEGATE_DISPLAY_MAX_LEN] = {0};

snprintf(outKey, outKeyLen, "Action_%d", actionIdx);
snprintf(outKey, outKeyLen, "Action_");
uint16_t written_value_key = strlen(outKey);
snprintf(outKey + written_value_key, outKeyLen - written_value_key, "%d", actionIdx);
CHECK_ERROR(undelegate_claim_printValue(ctx, undelegate, bufferUI, sizeof(bufferUI)));
pageString(outVal, outValLen, bufferUI, pageIdx, pageCount);

Expand Down

0 comments on commit da80886

Please sign in to comment.