File tree Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change 21
21
22
22
#define RUN_APPLICATION 1
23
23
24
- #define COLLECTION_NAME_MAX_LEN (sizeof(tokenDefinition_t) - ADDRESS_LENGTH)
24
+ #define COLLECTION_NAME_MAX_LEN 70
25
25
26
26
typedef struct tokenDefinition_t {
27
+ uint8_t address [ADDRESS_LENGTH ]; // must be first item
27
28
#ifdef HAVE_CONTRACT_NAME_IN_DESCRIPTOR
28
29
uint8_t contractName [ADDRESS_LENGTH ];
29
30
#endif
30
- uint8_t address [ADDRESS_LENGTH ];
31
31
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.
35
32
uint8_t decimals ;
36
33
} tokenDefinition_t ;
37
34
@@ -54,9 +51,10 @@ typedef struct txContent_t {
54
51
} txContent_t ;
55
52
56
53
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 ];
59
56
} nftInfo_t ;
57
+
60
58
typedef union extraInfo_t {
61
59
tokenDefinition_t token ;
62
60
nftInfo_t nft ;
Original file line number Diff line number Diff line change 1
1
/* 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_
5
4
6
5
#include "os.h"
7
6
#include "cx.h"
@@ -12,7 +11,8 @@ typedef enum {
12
11
ETH_PLUGIN_INTERFACE_VERSION_1 = 1 ,
13
12
ETH_PLUGIN_INTERFACE_VERSION_2 = 2 ,
14
13
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 ,
16
16
} eth_plugin_interface_version_t ;
17
17
18
18
typedef enum {
@@ -178,4 +178,4 @@ typedef struct ethQueryContractUI_t {
178
178
179
179
} ethQueryContractUI_t ;
180
180
181
- #endif
181
+ #endif // _ETH_PLUGIN_INTERFACE_H_
You can’t perform that action at this time.
0 commit comments