Skip to content

Commit

Permalink
adding id4good
Browse files Browse the repository at this point in the history
  • Loading branch information
tjulien-ledger authored and apaillier-ledger committed Nov 16, 2022
1 parent 5cf1e1e commit 7951400
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 1 deletion.
Binary file added icons/nanos_app_id4good.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/nanox_app_id4good.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions makefile_conf/chain/id4good.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
APP_LOAD_PARAMS += "44'/161803'"
DEFINES += CHAINID_UPCASE=\"ID4GOOD\" CHAINID_COINNAME=\"A4G\" CHAIN_KIND=CHAIN_KIND_ID4GOOD CHAIN_ID=846000
APPNAME = "ID4Good"
3 changes: 2 additions & 1 deletion src/chainConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ typedef enum chain_kind_e {
CHAIN_KIND_METER,
CHAIN_KIND_MULTIVAC,
CHAIN_KIND_TECRA,
CHAIN_KIND_APOTHEMNETWORK
CHAIN_KIND_APOTHEMNETWORK,
CHAIN_KIND_ID4GOOD
} chain_kind_t;

typedef struct chain_config_s {
Expand Down
6 changes: 6 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,9 @@ extraInfo_t *getKnownToken(uint8_t *contractAddress) {
case CHAIN_KIND_APOTHEMNETWORK:
numTokens = NUM_TOKENS_APOTHEMNETWORK;
break;
case CHAIN_KIND_ID4GOOD:
numTokens = NUM_TOKENS_ID4GOOD;
break;
}
for (i = 0; i < numTokens; i++) {
switch (chainConfig->kind) {
Expand Down Expand Up @@ -447,6 +450,9 @@ extraInfo_t *getKnownToken(uint8_t *contractAddress) {
case CHAIN_KIND_APOTHEMNETWORK:
currentToken = (tokenDefinition_t *) PIC(&TOKENS_APOTHEMNETWORK[i]);
break;
case CHAIN_KIND_ID4GOOD:
currentToken = (tokenDefinition_t *) PIC(&TOKENS_ID4GOOD[i]);
break;
}
if (memcmp(currentToken->address, tmpContent.txContent.destination, ADDRESS_LENGTH) == 0) {
return currentToken;
Expand Down

0 comments on commit 7951400

Please sign in to comment.