Skip to content

Commit

Permalink
fix function types
Browse files Browse the repository at this point in the history
  • Loading branch information
Z4karia committed Jun 3, 2024
1 parent 11e5903 commit 22a57ff
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/handle_query_contract_ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,15 @@ static bool set_send_value_ui(ethQueryContractUI_t *msg, plugin_parameters_t *co

// Set UI for "Send 2" screen.
// Each methods sets the title and the message to be displayed on the screen.
static void set_send_2_ui(ethQueryContractUI_t *msg, plugin_parameters_t *context) {
static bool set_send_2_ui(ethQueryContractUI_t *msg, plugin_parameters_t *context) {
switch (context->selectorIndex) {
case LIDO_CLAIM_WITHDRAWALS:
strlcpy(msg->title, "Request ID", msg->titleLength);
break;
default:
PRINTF("Unhandled selector Index: %d\n", context->selectorIndex);
msg->result = ETH_PLUGIN_RESULT_ERROR;
return;
return false;
}

amountToString(context->contract_address, // Location of the 2nd request ID.
Expand All @@ -132,6 +132,7 @@ static void set_send_2_ui(ethQueryContractUI_t *msg, plugin_parameters_t *contex
context->ticker_sent,
msg->msg,
msg->msgLength);
return true;
}

// Set UI for "Receive" screen.
Expand Down Expand Up @@ -172,15 +173,15 @@ static bool set_receive_ui(ethQueryContractUI_t *msg, plugin_parameters_t *conte

// Set UI for "Receive 2" screen.
// Each methods sets the title and the message to be displayed on the screen.
static void set_receive_2_ui(ethQueryContractUI_t *msg, plugin_parameters_t *context) {
static bool set_receive_2_ui(ethQueryContractUI_t *msg, plugin_parameters_t *context) {
switch (context->selectorIndex) {
case LIDO_CLAIM_WITHDRAWALS:
strlcpy(msg->title, "Hint", msg->titleLength);
break;
default:
PRINTF("Unhandled selector Index: %d\n", context->selectorIndex);
msg->result = ETH_PLUGIN_RESULT_ERROR;
return;
return false;
}

amountToString(context->recipient, // Location of the 2nd hint.
Expand All @@ -189,6 +190,7 @@ static void set_receive_2_ui(ethQueryContractUI_t *msg, plugin_parameters_t *con
context->ticker_sent,
msg->msg,
msg->msgLength);
return true;
}

// Utility function to print an address to the UI.
Expand Down

0 comments on commit 22a57ff

Please sign in to comment.