diff --git a/Makefile b/Makefile index 6b88b48..612610d 100755 --- a/Makefile +++ b/Makefile @@ -211,9 +211,13 @@ else ifeq ($(CHAIN),bsc) APP_LOAD_PARAMS += --path "44'/60'" DEFINES += CHAINID_UPCASE=\"BSC\" CHAINID_COINNAME=\"BNB\" CHAIN_KIND=CHAIN_KIND_BSC CHAIN_ID=56 APPNAME = "Binance Smart Chain" +else ifeq ($(CHAIN),songbird) +APP_LOAD_PARAMS += --path "44'/554'" --path "44'/60'" +DEFINES += CHAINID_UPCASE=\"SONGBIRD\" CHAINID_COINNAME=\"SGB\" CHAIN_KIND=CHAIN_KIND_SONGBIRD CHAIN_ID=19 +APPNAME = "Songbird" else ifeq ($(filter clean,$(MAKECMDGOALS)),) -$(error Unsupported CHAIN - use ethereum, ropsten, ethereum_classic, expanse, poa, artis_sigma1, artis_tau1, rsk, rsk_testnet, ubiq, wanchain, kusd, musicoin, pirl, akroma, atheios, callisto, ethersocial, ellaism, ether1, ethergem, gochain, mix, reosc, hpb, tomochain, tobalaba, dexon, volta, ewc, webchain, thundercore, flare, flare_coston, theta) +$(error Unsupported CHAIN - use ethereum, ropsten, ethereum_classic, expanse, poa, artis_sigma1, artis_tau1, rsk, rsk_testnet, ubiq, wanchain, kusd, musicoin, pirl, akroma, atheios, callisto, ethersocial, ellaism, ether1, ethergem, gochain, mix, reosc, hpb, tomochain, tobalaba, dexon, volta, ewc, webchain, thundercore, flare, flare_coston, theta, bsc, songbird) endif endif @@ -384,4 +388,4 @@ include $(BOLOS_SDK)/Makefile.rules dep/%.d: %.c Makefile listvariants: - @echo VARIANTS CHAIN ethereum ropsten ethereum_classic expanse poa rsk rsk_testnet ubiq wanchain pirl akroma atheios callisto ethersocial ether1 gochain musicoin ethergem mix ellaism reosc hpb tomochain dexon volta ewc thundercore flare flare_coston theta bsc + @echo VARIANTS CHAIN ethereum ropsten ethereum_classic expanse poa rsk rsk_testnet ubiq wanchain pirl akroma atheios callisto ethersocial ether1 gochain musicoin ethergem mix ellaism reosc hpb tomochain dexon volta ewc thundercore flare flare_coston theta bsc songbird diff --git a/icons/nanos_app_songbird.gif b/icons/nanos_app_songbird.gif new file mode 100644 index 0000000..302030b Binary files /dev/null and b/icons/nanos_app_songbird.gif differ diff --git a/icons/nanox_app_songbird.gif b/icons/nanox_app_songbird.gif new file mode 100644 index 0000000..1361a68 Binary files /dev/null and b/icons/nanox_app_songbird.gif differ diff --git a/icons/songbird.png b/icons/songbird.png new file mode 100644 index 0000000..0fd35ec Binary files /dev/null and b/icons/songbird.png differ diff --git a/src/chainConfig.h b/src/chainConfig.h index a845018..8be7e9e 100644 --- a/src/chainConfig.h +++ b/src/chainConfig.h @@ -55,7 +55,8 @@ typedef enum chain_kind_e { CHAIN_KIND_THUNDERCORE, CHAIN_KIND_FLARE, CHAIN_KIND_THETA, - CHAIN_KIND_BSC + CHAIN_KIND_BSC, + CHAIN_KIND_SONGBIRD } chain_kind_t; typedef struct chain_config_s { diff --git a/src/main.c b/src/main.c index ca26b41..e93aec7 100644 --- a/src/main.c +++ b/src/main.c @@ -256,6 +256,9 @@ tokenDefinition_t *getKnownToken(uint8_t *contractAddress) { case CHAIN_KIND_BSC: numTokens = NUM_TOKENS_BSC; break; + case CHAIN_KIND_SONGBIRD: + numTokens = NUM_TOKENS_SONGBIRD; + break; } for (i = 0; i < numTokens; i++) { switch (chainConfig->kind) { @@ -351,12 +354,16 @@ tokenDefinition_t *getKnownToken(uint8_t *contractAddress) { break; case CHAIN_KIND_FLARE: currentToken = (tokenDefinition_t *) PIC(&TOKENS_FLARE[i]); - break case CHAIN_KIND_THETA : currentToken = - (tokenDefinition_t *) PIC(&TOKENS_THETA[i]); + break; + case CHAIN_KIND_THETA: + currentToken = (tokenDefinition_t *) PIC(&TOKENS_THETA[i]); break; case CHAIN_KIND_BSC: currentToken = (tokenDefinition_t *) PIC(&TOKENS_BSC[i]); break; + case CHAIN_KIND_SONGBIRD: + currentToken = (tokenDefinition_t *) PIC(&TOKENS_SONGBIRD[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 63667e8..880d87e 100644 --- a/src/tokens.c +++ b/src/tokens.c @@ -4568,4 +4568,6 @@ const tokenDefinition_t const TOKENS_THETA[NUM_TOKENS_THETA] = {}; const tokenDefinition_t const TOKENS_BSC[NUM_TOKENS_BSC] = {}; +const tokenDefinition_t const TOKENS_SONGBIRD[NUM_TOKENS_SONGBIRD] = {}; + #endif diff --git a/src/tokens.h b/src/tokens.h index 3573cd3..e31444f 100644 --- a/src/tokens.h +++ b/src/tokens.h @@ -97,6 +97,7 @@ static const uint8_t LEDGER_SIGNATURE_PUBLIC_KEY[] = { #define NUM_TOKENS_FLARE 0 #define NUM_TOKENS_THETA 0 #define NUM_TOKENS_BSC 0 +#define NUM_TOKENS_SONGBIRD 0 extern tokenDefinition_t const TOKENS_AKROMA[NUM_TOKENS_AKROMA]; extern tokenDefinition_t const TOKENS_ELLAISM[NUM_TOKENS_ELLAISM]; @@ -131,6 +132,7 @@ extern tokenDefinition_t const TOKENS_THUNDERCORE[NUM_TOKENS_THUNDERCORE]; extern tokenDefinition_t const TOKENS_FLARE[NUM_TOKENS_FLARE]; extern tokenDefinition_t const TOKENS_THETA[NUM_TOKENS_THETA]; extern tokenDefinition_t const TOKENS_BSC[NUM_TOKENS_BSC]; +extern tokenDefinition_t const TOKENS_SONGBIRD[NUM_TOKENS_SONGBIRD]; #endif /* HAVE_TOKENS_LIST */