This commit is contained in:
Alexandre Paillier
2022-06-15 12:07:14 +02:00
parent faf52a1a1a
commit d1eb4ccc92
5 changed files with 14 additions and 1 deletions

View File

@@ -0,0 +1,3 @@
APP_LOAD_PARAMS += --path "44'/60'"
DEFINES += CHAINID_UPCASE=\"OKC\" CHAINID_COINNAME=\"OKT\" CHAIN_KIND=CHAIN_KIND_OKC CHAIN_ID=66
APPNAME = "OKXChain"

View File

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

View File

@@ -284,6 +284,9 @@ extraInfo_t *getKnownToken(uint8_t *contractAddress) {
case CHAIN_KIND_WETHIO:
numTokens = NUM_TOKENS_WETHIO;
break;
case CHAIN_KIND_OKC:
numTokens = NUM_TOKENS_OKC;
break;
}
for (i = 0; i < numTokens; i++) {
switch (chainConfig->kind) {
@@ -410,6 +413,9 @@ extraInfo_t *getKnownToken(uint8_t *contractAddress) {
case CHAIN_KIND_WETHIO:
currentToken = (tokenDefinition_t *) PIC(&TOKENS_WETHIO[i]);
break;
case CHAIN_KIND_OKC:
currentToken = (tokenDefinition_t *) PIC(&TOKENS_OKC[i]);
break;
}
if (memcmp(currentToken->address, tmpContent.txContent.destination, ADDRESS_LENGTH) == 0) {
return currentToken;

View File

@@ -204,4 +204,6 @@ const tokenDefinition_t const TOKENS_KARDIACHAIN[NUM_TOKENS_KARDIACHAIN] = {};
const tokenDefinition_t const TOKENS_WETHIO[NUM_TOKENS_WETHIO] = {};
const tokenDefinition_t const TOKENS_OKC[NUM_TOKENS_OKC] = {};
#endif

View File

@@ -106,6 +106,7 @@ static const uint8_t LEDGER_SIGNATURE_PUBLIC_KEY[] = {
#define NUM_TOKENS_BTTC 0
#define NUM_TOKENS_KARDIACHAIN 0
#define NUM_TOKENS_WETHIO 0
#define NUM_TOKENS_OKC 0
extern tokenDefinition_t const TOKENS_AKROMA[NUM_TOKENS_AKROMA];
extern tokenDefinition_t const TOKENS_ELLAISM[NUM_TOKENS_ELLAISM];