Skip to content

Commit

Permalink
fix build issues + lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Z4karia committed Jun 3, 2024
1 parent 3626abe commit 9b1e707
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ SortIncludes: false
SpaceAfterCStyleCast: true
AllowShortCaseLabelsOnASingleLine: false
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortFunctionsOnASingleLine: None
BinPackArguments: false
Expand Down
1 change: 0 additions & 1 deletion src/handle_init_contract.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "stakekit_plugin.h"
#include "utils.h"

// Called once to init.
void handle_init_contract(void *parameters) {
Expand Down
11 changes: 6 additions & 5 deletions src/handle_query_contract_ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ static bool set_send_value_ui(ethQueryContractUI_t *msg, plugin_parameters_t *co

if (msg->pluginSharedRO == NULL) {
PRINTF("Error: msg->pluginSharedRO is NULL\n");
return;
return false;
}
if (msg->pluginSharedRO->txContent == NULL) {
PRINTF("Error: msg->pluginSharedRO->txContent is NULL\n");
return;
return false;
}

// Convert to string.
Expand Down Expand Up @@ -194,7 +194,7 @@ static void set_receive_2_ui(ethQueryContractUI_t *msg, plugin_parameters_t *con
// Utility function to print an address to the UI.
static bool print_address(ethQueryContractUI_t *msg, uint8_t *address) {
if (msg == NULL || msg->msgLength <= MIN_MSG_LENGTH) {
return;
return false;
}
// Prefix the address with `0x`.
msg->msg[0] = '0';
Expand Down Expand Up @@ -325,14 +325,15 @@ static bool set_smart_contract_ui(ethQueryContractUI_t *msg, plugin_parameters_t

if (msg->pluginSharedRO == NULL) {
PRINTF("Error: msg->pluginSharedRO is NULL\n");
return;
return false;
}
if (msg->pluginSharedRO->txContent == NULL) {
PRINTF("Error: msg->pluginSharedRO->txContent is NULL\n");
return;
return false;
}

return print_address(msg, msg->pluginSharedRO->txContent->destination);
}

// Set UI for unbound nonce boolean screen.
// Each methods sets the title and the message to be displayed on the screen.
Expand Down

0 comments on commit 9b1e707

Please sign in to comment.