This commit is contained in:
Alexandre Paillier
2022-06-15 13:32:50 +02:00
parent d1eb4ccc92
commit 785cfdc2ea
6 changed files with 16 additions and 1 deletions

View File

@@ -64,7 +64,8 @@ typedef enum chain_kind_e {
CHAIN_KIND_BTTC,
CHAIN_KIND_KARDIACHAIN,
CHAIN_KIND_WETHIO,
CHAIN_KIND_OKC
CHAIN_KIND_OKC,
CHAIN_KIND_CUBE
} chain_kind_t;
typedef struct chain_config_s {

View File

@@ -287,6 +287,9 @@ extraInfo_t *getKnownToken(uint8_t *contractAddress) {
case CHAIN_KIND_OKC:
numTokens = NUM_TOKENS_OKC;
break;
case CHAIN_KIND_CUBE:
numTokens = NUM_TOKENS_CUBE;
break;
}
for (i = 0; i < numTokens; i++) {
switch (chainConfig->kind) {
@@ -416,6 +419,9 @@ extraInfo_t *getKnownToken(uint8_t *contractAddress) {
case CHAIN_KIND_OKC:
currentToken = (tokenDefinition_t *) PIC(&TOKENS_OKC[i]);
break;
case CHAIN_KIND_CUBE:
currentToken = (tokenDefinition_t *) PIC(&TOKENS_CUBE[i]);
break;
}
if (memcmp(currentToken->address, tmpContent.txContent.destination, ADDRESS_LENGTH) == 0) {
return currentToken;

View File

@@ -206,4 +206,6 @@ const tokenDefinition_t const TOKENS_WETHIO[NUM_TOKENS_WETHIO] = {};
const tokenDefinition_t const TOKENS_OKC[NUM_TOKENS_OKC] = {};
const tokenDefinition_t const TOKENS_CUBE[NUM_TOKENS_CUBE] = {};
#endif

View File

@@ -107,6 +107,7 @@ static const uint8_t LEDGER_SIGNATURE_PUBLIC_KEY[] = {
#define NUM_TOKENS_KARDIACHAIN 0
#define NUM_TOKENS_WETHIO 0
#define NUM_TOKENS_OKC 0
#define NUM_TOKENS_CUBE 0
extern tokenDefinition_t const TOKENS_AKROMA[NUM_TOKENS_AKROMA];
extern tokenDefinition_t const TOKENS_ELLAISM[NUM_TOKENS_ELLAISM];
@@ -149,6 +150,7 @@ extern tokenDefinition_t const TOKENS_MOONBEAM[NUM_TOKENS_MOONBEAM];
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];
#endif /* HAVE_TOKENS_LIST */