Skip to content

Commit 0de74c6

Browse files
author
ldg-github-ci
committed
[update] Branch develop | Commit 5203780b6a3e26589aa4a424f713593e6a66e740
1 parent a8af693 commit 0de74c6

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

include/eth_internals.h

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,14 @@
2121

2222
#define RUN_APPLICATION 1
2323

24-
#define COLLECTION_NAME_MAX_LEN (sizeof(tokenDefinition_t) - ADDRESS_LENGTH)
24+
#define COLLECTION_NAME_MAX_LEN 70
2525

2626
typedef struct tokenDefinition_t {
27+
uint8_t address[ADDRESS_LENGTH]; // must be first item
2728
#ifdef HAVE_CONTRACT_NAME_IN_DESCRIPTOR
2829
uint8_t contractName[ADDRESS_LENGTH];
2930
#endif
30-
uint8_t address[ADDRESS_LENGTH];
3131
char ticker[MAX_TICKER_LEN];
32-
char nft_pad[20]; // Adding some padding because the `nftInfo_t` is based on the size of a
33-
// `tokenDefinition_t`. By adding some padding here we give more space to the
34-
// collection name in the `nftInfo_t`. See `nftInfo_t` for more information.
3532
uint8_t decimals;
3633
} tokenDefinition_t;
3734

@@ -54,9 +51,10 @@ typedef struct txContent_t {
5451
} txContent_t;
5552

5653
typedef struct nftInfo_t {
57-
char collectionName[COLLECTION_NAME_MAX_LEN];
58-
char contractAddress[ADDRESS_LENGTH];
54+
uint8_t contractAddress[ADDRESS_LENGTH]; // must be first item
55+
char collectionName[COLLECTION_NAME_MAX_LEN + 1];
5956
} nftInfo_t;
57+
6058
typedef union extraInfo_t {
6159
tokenDefinition_t token;
6260
nftInfo_t nft;

include/eth_plugin_interface.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/* This file is auto-generated, don't edit it */
2-
#ifndef __ETH_PLUGIN_INTERFACE_H__
3-
4-
#define __ETH_PLUGIN_INTERFACE_H__
2+
#ifndef _ETH_PLUGIN_INTERFACE_H_
3+
#define _ETH_PLUGIN_INTERFACE_H_
54

65
#include "os.h"
76
#include "cx.h"
@@ -12,7 +11,8 @@ typedef enum {
1211
ETH_PLUGIN_INTERFACE_VERSION_1 = 1,
1312
ETH_PLUGIN_INTERFACE_VERSION_2 = 2,
1413
ETH_PLUGIN_INTERFACE_VERSION_3 = 3,
15-
ETH_PLUGIN_INTERFACE_VERSION_LATEST = 4,
14+
ETH_PLUGIN_INTERFACE_VERSION_4 = 4,
15+
ETH_PLUGIN_INTERFACE_VERSION_LATEST = 5,
1616
} eth_plugin_interface_version_t;
1717

1818
typedef enum {
@@ -178,4 +178,4 @@ typedef struct ethQueryContractUI_t {
178178

179179
} ethQueryContractUI_t;
180180

181-
#endif
181+
#endif // _ETH_PLUGIN_INTERFACE_H_

0 commit comments

Comments
 (0)