Skip to content

Commit 2b59d08

Browse files
Merge pull request #1022 from LedgerHQ/address-verif-improvements
Address verif improvements
2 parents 2d34c12 + 4d10500 commit 2b59d08

File tree

7 files changed

+385
-47
lines changed

7 files changed

+385
-47
lines changed

lib_nbgl/include/nbgl_content.h

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ typedef enum {
143143
ENS_ALIAS, ///< alias comes from ENS
144144
ADDRESS_BOOK_ALIAS, ///< alias comes from Address Book
145145
QR_CODE_ALIAS, ///< alias is an address to be displayed as a QR Code
146-
INFO_LIST_ALIAS ///< alias is list of infos
146+
INFO_LIST_ALIAS, ///< alias is list of infos
147+
TAG_VALUE_LIST_ALIAS
147148
} nbgl_contentValueAliasType_t;
148149

149150
/**
@@ -158,8 +159,12 @@ typedef struct {
158159
///< the QR Code
159160
const char
160161
*backText; ///< used as title of the popping page, if not NULL, otherwise "item" is used
161-
const struct nbgl_contentInfoList_s *infolist; ///< if aliasType is INFO_LIST_ALIAS
162-
nbgl_contentValueAliasType_t aliasType; ///< type of alias
162+
union {
163+
const struct nbgl_contentInfoList_s *infolist; ///< if aliasType is INFO_LIST_ALIAS
164+
const struct nbgl_contentTagValueList_s
165+
*tagValuelist; ///< if aliasType is TAG_VALUE_LIST_ALIAS
166+
};
167+
nbgl_contentValueAliasType_t aliasType; ///< type of alias
163168
} nbgl_contentValueExt_t;
164169

165170
/**
@@ -204,7 +209,7 @@ typedef void (*nbgl_contentActionCallback_t)(int token, uint8_t index, int page)
204209
/**
205210
* @brief This structure contains a list of [tag,value] pairs
206211
*/
207-
typedef struct {
212+
typedef struct nbgl_contentTagValueList_s {
208213
const nbgl_contentTagValue_t
209214
*pairs; ///< array of [tag,value] pairs (nbPairs items). If NULL, callback is used instead
210215
nbgl_contentTagValueCallback_t callback; ///< function to call to retrieve a given pair

0 commit comments

Comments
 (0)