Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
rolandpo committed Nov 20, 2023
1 parent 23689e9 commit 611e3da
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
9 changes: 5 additions & 4 deletions src/handle_query_contract_ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,11 @@ static bool set_beneficiary_ui(ethQueryContractUI_t *msg, origin_parameters_t *c

// Get the string representation of the address stored in `context->beneficiary`. Put it in
// `msg->msg`.
return getEthAddressStringFromBinary((uint8_t *) context->beneficiary,
msg->msg + 2, // +2 here because we've already prefixed with '0x'.
msg->pluginSharedRW->sha3,
chainid);
return getEthAddressStringFromBinary(
(uint8_t *) context->beneficiary,
msg->msg + 2, // +2 here because we've already prefixed with '0x'.
msg->pluginSharedRW->sha3,
chainid);
}

// Helper function that returns the enum corresponding to the screen that should
Expand Down
4 changes: 0 additions & 4 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,9 @@
* limitations under the License.
********************************************************************************/

#include <stdbool.h>
#include <stdint.h>
#include <string.h>

#include "cx.h"
#include "origin_plugin.h"
#include "os.h"

// List of selectors supported by this plugin.
// EDIT THIS: Adapt the variable names and change the `0x` values to match your
Expand Down
7 changes: 7 additions & 0 deletions src/origin_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,13 @@ typedef struct origin_parameters_t {
// * 32. Do not remove this check.
_Static_assert(sizeof(origin_parameters_t) <= 5 * 32, "Structure of parameters too big.");

void handle_provide_parameter(void *parameters);
void handle_query_contract_ui(void *parameters);
void handle_init_contract(void *parameters);
void handle_finalize(void *parameters);
void handle_provide_token(void *parameters);
void handle_query_contract_id(void *parameters);

static inline bool check_token_sent(origin_parameters_t *context) {
if (ADDRESS_IS_OETH(context->contract_address_sent)) {
context->decimals_sent = OETH_DECIMALS;
Expand Down

0 comments on commit 611e3da

Please sign in to comment.