From 1b24fc2eca3180446e70ca5762e45ad017e557b7 Mon Sep 17 00:00:00 2001 From: Lucas PASCAL Date: Fri, 14 Jan 2022 13:48:05 +0100 Subject: [PATCH 1/3] [fix] Get printable amount handle should not parse configuration for ticker and decimal if the amount is a fee --- src/handle_get_printable_amount.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/handle_get_printable_amount.c b/src/handle_get_printable_amount.c index 689b62e..13acc28 100644 --- a/src/handle_get_printable_amount.c +++ b/src/handle_get_printable_amount.c @@ -15,13 +15,6 @@ int handle_get_printable_amount(get_printable_amount_parameters_t* params, chain PRINTF("Amount is too big, 32 bytes max but buffer has %u bytes", params->amount_length); return 0; } - if (!parse_swap_config(params->coin_configuration, - params->coin_configuration_length, - ticker, - &decimals)) { - PRINTF("Error while parsing config\n"); - return 0; - } // If the amount is a fee, its value is nominated in ETH even if we're doing an ERC20 swap if (params->is_fee) { @@ -30,6 +23,15 @@ int handle_get_printable_amount(get_printable_amount_parameters_t* params, chain ticker[ticker_len] = ' '; ticker[ticker_len + 1] = '\0'; decimals = WEI_TO_ETHER; + } else { + // If the amount is *not* a fee, decimals and ticker are built from the given config + if (!parse_swap_config(params->coin_configuration, + params->coin_configuration_length, + ticker, + &decimals)) { + PRINTF("Error while parsing config\n"); + return 0; + } } amountToString(params->amount, From 1f1e472904b507b466f7b294cb1d4732fb2719b6 Mon Sep 17 00:00:00 2001 From: Lucas PASCAL Date: Mon, 31 Jan 2022 10:24:00 +0100 Subject: [PATCH 2/3] [add] Bump version for test release --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0a1a209..62a7372 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ APP_LOAD_PARAMS += --path "1517992542'/1101353413'" APPVERSION_M=1 APPVERSION_N=9 APPVERSION_P=17 -APPVERSION=$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P) +APPVERSION=$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)-exchangefix APP_LOAD_FLAGS= --appFlags 0x240 --dep Ethereum:$(APPVERSION) ifeq ($(CHAIN),) From 1e988e09041547eeffec5630443a069230511ab2 Mon Sep 17 00:00:00 2001 From: Lucas PASCAL Date: Tue, 15 Feb 2022 11:46:14 +0100 Subject: [PATCH 3/3] [revert] Removing temporary application name variant --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 62a7372..0a1a209 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ APP_LOAD_PARAMS += --path "1517992542'/1101353413'" APPVERSION_M=1 APPVERSION_N=9 APPVERSION_P=17 -APPVERSION=$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)-exchangefix +APPVERSION=$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P) APP_LOAD_FLAGS= --appFlags 0x240 --dep Ethereum:$(APPVERSION) ifeq ($(CHAIN),)