From 3fa410fb241426cc850166282116123086e62451 Mon Sep 17 00:00:00 2001 From: Francois Beutin Date: Fri, 8 Jul 2022 12:22:36 +0200 Subject: [PATCH] Add log for exception --- src_features/signTx/logic_signTx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src_features/signTx/logic_signTx.c b/src_features/signTx/logic_signTx.c index 7e44dfa..199ccbb 100644 --- a/src_features/signTx/logic_signTx.c +++ b/src_features/signTx/logic_signTx.c @@ -424,6 +424,7 @@ void finalizeParsing(bool direct) { // User has just validated a swap but ETH received apdus about a non standard plugin / contract if (called_from_swap && !use_standard_UI) { + PRINTF("ERR_SILENT_MODE_CHECK_FAILED, called_from_swap\n"); THROW(ERR_SILENT_MODE_CHECK_FAILED); } @@ -448,6 +449,7 @@ void finalizeParsing(bool direct) { if (called_from_swap) { // Ensure the values are the same that the ones that have been previously validated if (strcasecmp_workaround(strings.common.fullAddress, displayBuffer) != 0) { + PRINTF("ERR_SILENT_MODE_CHECK_FAILED, address check failed\n"); THROW(ERR_SILENT_MODE_CHECK_FAILED); } } else { @@ -466,6 +468,7 @@ void finalizeParsing(bool direct) { if (called_from_swap) { // Ensure the values are the same that the ones that have been previously validated if (strcmp(strings.common.fullAmount, displayBuffer) != 0) { + PRINTF("ERR_SILENT_MODE_CHECK_FAILED, amount check failed\n"); THROW(ERR_SILENT_MODE_CHECK_FAILED); } } else { @@ -483,6 +486,7 @@ void finalizeParsing(bool direct) { if (called_from_swap) { // Ensure the values are the same that the ones that have been previously validated if (strcmp(strings.common.maxFee, displayBuffer) != 0) { + PRINTF("ERR_SILENT_MODE_CHECK_FAILED, fees check failed\n"); THROW(ERR_SILENT_MODE_CHECK_FAILED); } } else {