Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Mix Blockchain (MIX) #38

Merged
merged 1 commit into from
Oct 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,13 @@ else ifeq ($(CHAIN),eosclassic)
APP_LOAD_PARAMS += --path "44'/2018'"
DEFINES += CHAINID_UPCASE=\"EOSCLASSIC\" CHAINID_COINNAME=\"EOSC\" CHAIN_KIND=CHAIN_KIND_EOSCLASSIC CHAIN_ID=20
APPNAME = "EOSClassic"
else ifeq ($(CHAIN),mix)
APP_LOAD_PARAMS += --path "44'/76'"
DEFINES += CHAINID_UPCASE=\"MIX\" CHAINID_COINNAME=\"MIX\" CHAIN_KIND=CHAIN_KIND_MIX CHAIN_ID=76
APPNAME = "Mix"
else
ifeq ($(filter clean,$(MAKECMDGOALS)),)
$(error Unsupported CHAIN - use ethereum, ethereum_classic, expanse, poa, rsk, rsk_testnet, ubiq, wanchain, kusd, musicoin, pirl, akroma, atheios, callisto, ethersocial, ellaism, ether1, ethergem, gochain, eosclassic)
$(error Unsupported CHAIN - use ethereum, ethereum_classic, expanse, poa, rsk, rsk_testnet, ubiq, wanchain, kusd, musicoin, pirl, akroma, atheios, callisto, ethersocial, ellaism, ether1, ethergem, gochain, eosclassic, mix)
endif
endif

Expand Down Expand Up @@ -211,4 +215,4 @@ include $(BOLOS_SDK)/Makefile.rules
dep/%.d: %.c Makefile

listvariants:
@echo VARIANTS CHAIN ethereum ethereum_classic expanse poa rsk rsk_testnet ubiq wanchain kusd pirl akroma atheios callisto ethersocial ether1 gochain # musicoin ellaism ethergem eosclassic
@echo VARIANTS CHAIN ethereum ethereum_classic expanse poa rsk rsk_testnet ubiq wanchain kusd pirl akroma atheios callisto ethersocial ether1 gochain # musicoin ellaism ethergem eosclassic mix
Binary file added blue_app_mix.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 glyphs/blue_badge_mix.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 glyphs/nanos_badge_mix.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 nanos_app_mix.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: 2 additions & 1 deletion src_genericwallet/chainConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ typedef enum chain_kind_e {
CHAIN_KIND_ETHERGEM,
CHAIN_KIND_ATHEIOS,
CHAIN_KIND_GOCHAIN,
CHAIN_KIND_EOSCLASSIC
CHAIN_KIND_EOSCLASSIC,
CHAIN_KIND_MIX
} chain_kind_t;

typedef struct chain_config_s {
Expand Down
6 changes: 6 additions & 0 deletions src_genericwallet/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1517,6 +1517,9 @@ tokenDefinition_t* getKnownToken() {
case CHAIN_KIND_EOSCLASSIC:
numTokens = NUM_TOKENS_EOSCLASSIC;
break;
case CHAIN_KIND_MIX:
numTokens = NUM_TOKENS_MIX;
break;
}
for (i=0; i<numTokens; i++) {
switch(chainConfig->kind) {
Expand Down Expand Up @@ -1577,6 +1580,9 @@ tokenDefinition_t* getKnownToken() {
case CHAIN_KIND_EOSCLASSIC:
currentToken = PIC(&TOKENS_EOSCLASSIC[i]);
break;
case CHAIN_KIND_MIX:
currentToken = PIC(&TOKENS_MIX[i]);
break;
}
if (os_memcmp(currentToken->address, tmpContent.txContent.destination, 20) == 0) {
return currentToken;
Expand Down
2 changes: 2 additions & 0 deletions src_genericwallet/tokens.c
Original file line number Diff line number Diff line change
Expand Up @@ -1137,3 +1137,5 @@ const tokenDefinition_t const TOKENS_ATHEIOS[NUM_TOKENS_ATHEIOS] = {};
const tokenDefinition_t const TOKENS_GOCHAIN[NUM_TOKENS_GOCHAIN] = {};

const tokenDefinition_t const TOKENS_EOSCLASSIC[NUM_TOKENS_EOSCLASSIC] = {};

const tokenDefinition_t const TOKENS_MIX[NUM_TOKENS_MIX] = {};
2 changes: 2 additions & 0 deletions src_genericwallet/tokens.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ typedef struct tokenDefinition_t {
#define NUM_TOKENS_ATHEIOS 0
#define NUM_TOKENS_GOCHAIN 0
#define NUM_TOKENS_EOSCLASSIC 0
#define NUM_TOKENS_MIX 0

extern tokenDefinition_t const TOKENS_AKROMA[NUM_TOKENS_AKROMA];
extern tokenDefinition_t const TOKENS_ELLAISM[NUM_TOKENS_ELLAISM];
Expand All @@ -62,3 +63,4 @@ extern tokenDefinition_t const TOKENS_ETHERGEM[NUM_TOKENS_ETHERGEM];
extern tokenDefinition_t const TOKENS_ATHEIOS[NUM_TOKENS_ATHEIOS];
extern tokenDefinition_t const TOKENS_GOCHAIN[NUM_TOKENS_GOCHAIN];
extern tokenDefinition_t const TOKENS_EOSCLASSIC[NUM_TOKENS_EOSCLASSIC];
extern tokenDefinition_t const TOKENS_MIX[NUM_TOKENS_MIX];