Skip to content

Commit

Permalink
Review
Browse files Browse the repository at this point in the history
  • Loading branch information
fbeutin-ledger committed Apr 21, 2023
1 parent 52fb822 commit cb54087
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 20 deletions.
1 change: 1 addition & 0 deletions src/handle_get_pubkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "globals.h"
#include "handle_get_pubkey.h"
#include "sol/printer.h"
#include "ui_api.h"

static uint8_t G_publicKey[PUBKEY_LENGTH];
char G_publicKeyStr[BASE58_PUBKEY_LENGTH];
Expand Down
2 changes: 0 additions & 2 deletions src/handle_get_pubkey.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,3 @@ void reset_getpubkey_globals(void);
void handle_get_pubkey(volatile unsigned int *flags, volatile unsigned int *tx);

uint8_t set_result_get_pubkey(void);

void ui_get_public_key(void);
2 changes: 1 addition & 1 deletion src/handle_sign_message.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "io.h"
#include "menu.h"
#include "utils.h"
#include "handle_swap_sign_transaction.h"

Expand All @@ -10,6 +9,7 @@
#include "sol/transaction_summary.h"

#include "handle_sign_message.h"
#include "ui_api.h"

static int scan_header_for_signer(const uint32_t *derivation_path,
uint32_t derivation_path_length,
Expand Down
2 changes: 0 additions & 2 deletions src/handle_sign_message.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@
void handle_sign_message_parse_message(volatile unsigned int *tx);

void handle_sign_message_ui(volatile unsigned int *flags);

void start_sign_tx_ui(size_t num_summary_steps);
3 changes: 1 addition & 2 deletions src/handle_sign_offchain_message.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include "os.h"
#include "ux.h"
#include "cx.h"
#include "menu.h"
#include "utils.h"
#include "sol/parser.h"
#include "sol/printer.h"
Expand All @@ -12,7 +11,7 @@
#include "globals.h"
#include "apdu.h"
#include "handle_sign_offchain_message.h"

#include "ui_api.h"

// Store locally the derived public key content
static Pubkey G_publicKey;
Expand Down
2 changes: 0 additions & 2 deletions src/handle_sign_offchain_message.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@
#include "globals.h"

void handle_sign_offchain_message(volatile unsigned int *flags, volatile unsigned int *tx);

void start_sign_offchain_message_ui(bool is_ascii, size_t num_summary_steps);
4 changes: 2 additions & 2 deletions src/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
#include "ux.h"

#include "apdu.h"
#include "menu.h"
#include "ui_api.h"
#include "io.h"

// override point, but nothing more to do
void io_seproxyhal_display(const bagl_element_t *element) {
io_seproxyhal_display_default((bagl_element_t *) element);
io_seproxyhal_display_default(element);
}

uint8_t io_event(uint8_t channel) {
Expand Down
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "handle_sign_message.h"
#include "handle_sign_offchain_message.h"
#include "apdu.h"
#include "menu.h"
#include "ui_api.h"

// Swap feature
#include "swap_lib_calls.h"
Expand Down
6 changes: 0 additions & 6 deletions src/menu.h

This file was deleted.

4 changes: 3 additions & 1 deletion src/ui/menu_bagl.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#ifdef HAVE_BAGL

#include "menu.h"
#include "ux.h"
#include "os.h"
#include "globals.h"
#include "glyphs.h"
#include "ui_api.h"

void display_settings(void);
void switch_allow_blind_sign_data(void);
Expand Down
11 changes: 11 additions & 0 deletions src/ui/ui_api.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#pragma once

#include "os.h"

void ui_idle(void);

void ui_get_public_key(void);

void start_sign_tx_ui(size_t num_summary_steps);

void start_sign_offchain_message_ui(bool is_ascii, size_t num_summary_steps);
1 change: 0 additions & 1 deletion src/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include <stdbool.h>
#include <stdlib.h>
#include "utils.h"
#include "menu.h"

void get_public_key(uint8_t *publicKeyArray, const uint32_t *derivationPath, size_t pathLength) {
cx_ecfp_private_key_t privateKey;
Expand Down

0 comments on commit cb54087

Please sign in to comment.