From b483804ff453395f57a6ec63d136d7590467e218 Mon Sep 17 00:00:00 2001 From: Alexandre Paillier Date: Wed, 15 Jun 2022 13:33:40 +0200 Subject: [PATCH] adding astar&shiden --- icons/nanos_app_astar.gif | Bin 0 -> 100 bytes icons/nanos_app_shiden.gif | Bin 0 -> 95 bytes icons/nanox_app_astar.gif | Bin 0 -> 77 bytes icons/nanox_app_shiden.gif | Bin 0 -> 72 bytes makefile_conf/chain/astar.mk | 3 +++ makefile_conf/chain/shiden.mk | 3 +++ src/chainConfig.h | 4 +++- src/main.c | 12 ++++++++++++ src/tokens.c | 4 ++++ src/tokens.h | 4 ++++ src_common/network.c | 4 +++- 11 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 icons/nanos_app_astar.gif create mode 100644 icons/nanos_app_shiden.gif create mode 100644 icons/nanox_app_astar.gif create mode 100644 icons/nanox_app_shiden.gif create mode 100644 makefile_conf/chain/astar.mk create mode 100644 makefile_conf/chain/shiden.mk diff --git a/icons/nanos_app_astar.gif b/icons/nanos_app_astar.gif new file mode 100644 index 0000000000000000000000000000000000000000..d656968c04da929083d73ee442b276d1ee1ef21b GIT binary patch literal 100 zcmZ?wbhEHb6krfwXkcLY|NlP&1B2p!Za>$MU}whwS0g9P7F>dtc!FLRTfpB%kTMH%#&t^k{|b?8-g--GPz88UXNJ9Nz!{ literal 0 HcmV?d00001 diff --git a/icons/nanos_app_shiden.gif b/icons/nanos_app_shiden.gif new file mode 100644 index 0000000000000000000000000000000000000000..c3b91d475f6fe19b06bc9b40d9a087dd6924b3ee GIT binary patch literal 95 zcmZ?wbhEHb6krfwXkcLY|NlP&1B2p!Za>$MU}whwS0gP$p8QV literal 0 HcmV?d00001 diff --git a/icons/nanox_app_astar.gif b/icons/nanox_app_astar.gif new file mode 100644 index 0000000000000000000000000000000000000000..827e926ac00ff317e4065994b548feab555ffa62 GIT binary patch literal 77 zcmZ?wbhEHbkind) { @@ -422,6 +428,12 @@ extraInfo_t *getKnownToken(uint8_t *contractAddress) { case CHAIN_KIND_CUBE: currentToken = (tokenDefinition_t *) PIC(&TOKENS_CUBE[i]); break; + case CHAIN_KIND_SHIDEN: + currentToken = (tokenDefinition_t *) PIC(&TOKENS_SHIDEN[i]); + break; + case CHAIN_KIND_ASTAR: + currentToken = (tokenDefinition_t *) PIC(&TOKENS_ASTAR[i]); + break; } if (memcmp(currentToken->address, tmpContent.txContent.destination, ADDRESS_LENGTH) == 0) { return currentToken; diff --git a/src/tokens.c b/src/tokens.c index 37f228a..b26771c 100644 --- a/src/tokens.c +++ b/src/tokens.c @@ -208,4 +208,8 @@ const tokenDefinition_t const TOKENS_OKC[NUM_TOKENS_OKC] = {}; const tokenDefinition_t const TOKENS_CUBE[NUM_TOKENS_CUBE] = {}; +const tokenDefinition_t const TOKENS_ASTAR[NUM_TOKENS_ASTAR] = {}; + +const tokenDefinition_t const TOKENS_SHIDEN[NUM_TOKENS_SHIDEN] = {}; + #endif diff --git a/src/tokens.h b/src/tokens.h index 2ed3323..318edad 100644 --- a/src/tokens.h +++ b/src/tokens.h @@ -108,6 +108,8 @@ static const uint8_t LEDGER_SIGNATURE_PUBLIC_KEY[] = { #define NUM_TOKENS_WETHIO 0 #define NUM_TOKENS_OKC 0 #define NUM_TOKENS_CUBE 0 +#define NUM_TOKENS_ASTAR 0 +#define NUM_TOKENS_SHIDEN 0 extern tokenDefinition_t const TOKENS_AKROMA[NUM_TOKENS_AKROMA]; extern tokenDefinition_t const TOKENS_ELLAISM[NUM_TOKENS_ELLAISM]; @@ -151,6 +153,8 @@ extern tokenDefinition_t const TOKENS_BTTC[NUM_TOKENS_BTTC]; extern tokenDefinition_t const TOKENS_KARDIACHAIN[NUM_TOKENS_KARDIACHAIN]; extern tokenDefinition_t const TOKENS_WETHIO[NUM_TOKENS_WETHIO]; extern tokenDefinition_t const TOKENS_CUBE[NUM_TOKENS_CUBE]; +extern tokenDefinition_t const TOKENS_ASTAR[NUM_TOKENS_ASTAR]; +extern tokenDefinition_t const TOKENS_SHIDEN[NUM_TOKENS_SHIDEN]; #endif /* HAVE_TOKENS_LIST */ diff --git a/src_common/network.c b/src_common/network.c index 29b2182..2d090b9 100644 --- a/src_common/network.c +++ b/src_common/network.c @@ -25,7 +25,9 @@ const network_info_t NETWORK_MAPPING[] = { {.chain_id = 44787, .name = "Celo Alfajores", .ticker = "aCELO "}, {.chain_id = 62320, .name = "Celo Baklava", .ticker = "bCELO "}, {.chain_id = 11297108109, .name = "Palm Network", .ticker = "PALM "}, - {.chain_id = 1818, .name = "Cube", .ticker = "CUBE "}}; + {.chain_id = 1818, .name = "Cube", .ticker = "CUBE "}, + {.chain_id = 336, .name = "Shiden", .ticker = "SDN "}, + {.chain_id = 592, .name = "Astar", .ticker = "ASTR "}}; uint64_t get_chain_id(void) { uint64_t chain_id = 0;