Skip to content

Commit

Permalink
🔨 Code refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
nagdahimanshu committed Apr 30, 2024
1 parent 972ea4a commit c36356e
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/handle_provide_parameter.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "plugin.h"

uint16_t counter = 0;

static void handle_claim_regular_account(ethPluginProvideParameter_t *msg, context_t *context) {
switch (context->next_param) {
case PROOF: // _proof
Expand Down Expand Up @@ -96,7 +98,6 @@ static void handle_reward_create_position(ethPluginProvideParameter_t *msg, cont
}
}

uint16_t counter = 0;
static void handle_lock_ids_array(ethPluginProvideParameter_t *msg, context_t *context) {
switch (context->next_param) {
case OFFSET:
Expand All @@ -119,19 +120,11 @@ static void handle_lock_ids_array(ethPluginProvideParameter_t *msg, context_t *c
msg->parameter,
INT256_LENGTH);
if (context->lisk.body.reward.lock_ids_len > 1) {
context->next_param = LOCK_ID_NEXT;
counter++;
} else {
context->next_param = NONE;
}
break;
case LOCK_ID_NEXT:
copy_parameter(context->lisk.body.reward.lock_id[counter].value,
msg->parameter,
INT256_LENGTH);
counter++;
context->next_param = LOCK_ID;
break;
case NONE:
break;
default:
Expand Down

0 comments on commit c36356e

Please sign in to comment.