Merge pull request #153 from jingxu85/support-theta-chain2

signed commit with icons
This commit is contained in:
Salvatore Ingala
2021-06-02 16:33:07 +02:00
committed by GitHub
8 changed files with 18 additions and 3 deletions

View File

@@ -196,9 +196,13 @@ else ifeq ($(CHAIN),flare_coston)
APP_LOAD_PARAMS += --path "44'/554'" --path "44'/60'"
DEFINES += CHAINID_UPCASE=\"FLARE\" CHAINID_COINNAME=\"FLR\" CHAIN_KIND=CHAIN_KIND_FLARE CHAIN_ID=16
APPNAME = "Flare Coston"
else ifeq ($(CHAIN),theta)
APP_LOAD_PARAMS += --path "44'/500'"
DEFINES += CHAINID_UPCASE=\"THETA\" CHAINID_COINNAME=\"THETA\" CHAIN_KIND=CHAIN_KIND_THETA CHAIN_ID=500
APPNAME = "Theta"
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)
$(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)
endif
endif
@@ -334,4 +338,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
@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

BIN
icons/blue_app_theta.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 B

BIN
icons/nanos_app_theta.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 B

BIN
icons/nanox_app_theta.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 B

View File

@@ -53,7 +53,8 @@ typedef enum chain_kind_e {
CHAIN_KIND_ARTIS_TAU1,
CHAIN_KIND_WEBCHAIN,
CHAIN_KIND_THUNDERCORE,
CHAIN_KIND_FLARE
CHAIN_KIND_FLARE,
CHAIN_KIND_THETA
} chain_kind_t;
typedef struct chain_config_s {

View File

@@ -265,6 +265,9 @@ tokenDefinition_t *getKnownToken(uint8_t *contractAddress) {
case CHAIN_KIND_FLARE:
numTokens = NUM_TOKENS_FLARE;
break;
case CHAIN_KIND_THETA:
numTokens = NUM_TOKENS_THETA;
break;
}
for (i = 0; i < numTokens; i++) {
switch (chainConfig->kind) {
@@ -361,6 +364,9 @@ tokenDefinition_t *getKnownToken(uint8_t *contractAddress) {
case CHAIN_KIND_FLARE:
currentToken = (tokenDefinition_t *) PIC(&TOKENS_FLARE[i]);
break
case CHAIN_KIND_THETA:
currentToken = (tokenDefinition_t *) PIC(&TOKENS_THETA[i]);
break;
}
if (memcmp(currentToken->address, tmpContent.txContent.destination, 20) == 0) {
return currentToken;

View File

@@ -4564,4 +4564,6 @@ const tokenDefinition_t const TOKENS_THUNDERCORE[NUM_TOKENS_THUNDERCORE] = {};
const tokenDefinition_t const TOKENS_FLARE[NUM_TOKENS_FLARE] = {};
const tokenDefinition_t const TOKENS_THETA[NUM_TOKENS_THETA] = {};
#endif

View File

@@ -72,6 +72,7 @@ extern tokenDefinition_t const TOKENS_EXTRA[NUM_TOKENS_EXTRA];
#define NUM_TOKENS_WEBCHAIN 0
#define NUM_TOKENS_THUNDERCORE 0
#define NUM_TOKENS_FLARE 0
#define NUM_TOKENS_THETA 0
extern tokenDefinition_t const TOKENS_AKROMA[NUM_TOKENS_AKROMA];
extern tokenDefinition_t const TOKENS_ELLAISM[NUM_TOKENS_ELLAISM];
@@ -104,6 +105,7 @@ extern tokenDefinition_t const TOKENS_ARTIS_TAU1[NUM_TOKENS_ARTIS_TAU1];
extern tokenDefinition_t const TOKENS_WEBCHAIN[NUM_TOKENS_WEBCHAIN];
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];
#endif /* HAVE_TOKENS_LIST */