Files
app-ethereum/src_common/network.h
Salvatore Ingala f2ec9b296e Small improvements in app size
Signed-off-by: Edouard Merle <edouard.merle@ledger.fr>
2021-11-17 10:45:35 +01:00

20 lines
692 B
C

#include <stdint.h>
#include "tokens.h"
#include "shared_context.h"
#define MAX_NETWORK_TICKER_LEN 8
typedef struct network_info_s {
const char name[NETWORK_STRING_MAX_SIZE];
const char ticker[MAX_NETWORK_TICKER_LEN];
uint64_t chain_id;
} network_info_t;
// Returns the current chain id. Defaults to 0 if txType was not found.
uint64_t get_chain_id(void);
// Returns a pointer to the network struct, or NULL if there is none.
network_info_t *get_network(void);
// Returns a pointer to the network name, or NULL if there is none.
char *get_network_name(void);
// Returns a pointer to the network ticker, or chainConfig->coinName if there is none.
char *get_network_ticker(void);