File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -18,3 +18,20 @@ const nbgl_icon_details_t *get_network_icon_from_chain_id(const uint64_t *chain_
1818 }
1919 return NULL ;
2020}
21+
22+ /**
23+ * Get the network small icon from a given chain ID
24+ *
25+ * Loops onto the generated \ref g_network_small_icons array until a chain ID matches.
26+ *
27+ * @param[in] chain_id network's chain ID
28+ * @return the network small icon if found, \ref NULL otherwise
29+ */
30+ const nbgl_icon_details_t * get_network_small_icon_from_chain_id (const uint64_t * chain_id ) {
31+ for (size_t i = 0 ; i < ARRAYLEN (g_network_small_icons ); ++ i ) {
32+ if ((uint64_t ) PIC (g_network_small_icons [i ].chain_id ) == * chain_id ) {
33+ return PIC (g_network_small_icons [i ].icon );
34+ }
35+ }
36+ return NULL ;
37+ }
Original file line number Diff line number Diff line change 55#include "nbgl_types.h"
66
77const nbgl_icon_details_t * get_network_icon_from_chain_id (const uint64_t * chain_id );
8+ const nbgl_icon_details_t * get_network_small_icon_from_chain_id (const uint64_t * chain_id );
89
910#endif // NETWORK_ICONS_H_
You can’t perform that action at this time.
0 commit comments