Skip to content

Commit

Permalink
Merge pull request #742 from LedgerHQ/feat/apa/harmonize_tlv_handling
Browse files Browse the repository at this point in the history
Harmonize TLV handling
  • Loading branch information
apaillier-ledger authored Feb 26, 2025
2 parents 6bb28cd + ad975c4 commit 1aaaeba
Show file tree
Hide file tree
Showing 16 changed files with 926 additions and 882 deletions.
8 changes: 4 additions & 4 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
#include "swap_entrypoints.h"
#include "commands_712.h"
#include "challenge.h"
#include "trusted_name.h"
#include "cmd_trusted_name.h"
#include "crypto_helpers.h"
#include "manage_asset_info.h"
#include "network_dynamic.h"
#include "cmd_network_info.h"
#ifdef HAVE_DYN_MEM_ALLOC
#include "mem.h"
#endif
Expand Down Expand Up @@ -235,7 +235,7 @@ static uint16_t handleApdu(command_t *cmd, uint32_t *flags, uint32_t *tx) {
break;

case INS_ENS_PROVIDE_INFO:
sw = handle_provide_trusted_name(cmd->p1, cmd->data, cmd->lc);
sw = handle_trusted_name(cmd->p1, cmd->data, cmd->lc);
break;
#endif // HAVE_TRUSTED_NAME

Expand All @@ -257,7 +257,7 @@ static uint16_t handleApdu(command_t *cmd, uint32_t *flags, uint32_t *tx) {

#ifdef HAVE_DYNAMIC_NETWORKS
case INS_PROVIDE_NETWORK_CONFIGURATION:
sw = handleNetworkConfiguration(cmd->p1, cmd->p2, cmd->data, cmd->lc, tx);
sw = handle_network_info(cmd->p1, cmd->p2, cmd->data, cmd->lc, tx);
break;
#endif // HAVE_DYNAMIC_NETWORKS

Expand Down
2 changes: 1 addition & 1 deletion src/network.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "os_utils.h"
#include "os_pic.h"
#include "network.h"
#include "network_dynamic.h"
#include "network_info.h"
#include "shared_context.h"
#include "common_utils.h"

Expand Down
4 changes: 2 additions & 2 deletions src/network.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#define MAX_NETWORK_LEN 32 // 31 characters + '\0'

typedef struct network_info_s {
const char name[MAX_NETWORK_LEN];
const char ticker[MAX_TICKER_LEN];
char name[MAX_NETWORK_LEN];
char ticker[MAX_TICKER_LEN];
uint64_t chain_id;
#ifdef HAVE_NBGL
nbgl_icon_details_t icon;
Expand Down
Loading

0 comments on commit 1aaaeba

Please sign in to comment.