diff --git a/src/crypto.c b/src/crypto.c index 3a8287f..ab22a19 100644 --- a/src/crypto.c +++ b/src/crypto.c @@ -39,11 +39,11 @@ bool crypto_validate_public_key(const uint32_t *bip32_path, uint8_t chain_code[32] = {0}; int error = bip32_derive_get_pubkey_256(CX_CURVE_256K1, - bip32_path, - bip32_path_len, - raw_pubkey, - chain_code, - CX_SHA512); + bip32_path, + bip32_path_len, + raw_pubkey, + chain_code, + CX_SHA512); if (error != CX_OK) { return false; @@ -95,7 +95,7 @@ int crypto_sign_message(void) { txin, public_key.W + 1, G_context.tx_info.sighash); - + size_t sig_len = sizeof(G_context.tx_info.signature); error = cx_ecschnorr_sign_no_throw(&private_key, CX_ECSCHNORR_BIP0340 | CX_RND_TRNG, diff --git a/src/handler/get_public_key.c b/src/handler/get_public_key.c index 09dec53..fd574eb 100644 --- a/src/handler/get_public_key.c +++ b/src/handler/get_public_key.c @@ -69,12 +69,12 @@ int handler_get_public_key(buffer_t *cdata, bool display) { } int error = bip32_derive_get_pubkey_256(CX_CURVE_256K1, - G_context.bip32_path, - G_context.bip32_path_len, - raw_pubkey, - G_context.pk_info.chain_code, - CX_SHA512); - + G_context.bip32_path, + G_context.bip32_path_len, + raw_pubkey, + G_context.pk_info.chain_code, + CX_SHA512); + if (error != CX_OK) { return io_send_sw(error); } diff --git a/src/handler/get_version.c b/src/handler/get_version.c index 1bcae5c..f516582 100644 --- a/src/handler/get_version.c +++ b/src/handler/get_version.c @@ -42,8 +42,9 @@ int handler_get_version() { _Static_assert(PATCH_VERSION >= 0 && PATCH_VERSION <= UINT8_MAX, "PATCH version must be between 0 and 255!"); - return io_send_response_pointer( - (uint8_t[APPVERSION_LEN]){(uint8_t) MAJOR_VERSION, (uint8_t) MINOR_VERSION, (uint8_t) PATCH_VERSION}, - APPVERSION_LEN, - SW_OK); + return io_send_response_pointer((uint8_t[APPVERSION_LEN]){(uint8_t) MAJOR_VERSION, + (uint8_t) MINOR_VERSION, + (uint8_t) PATCH_VERSION}, + APPVERSION_LEN, + SW_OK); } diff --git a/src/ui/bagl_display.c b/src/ui/bagl_display.c index 635c338..d0ef16d 100644 --- a/src/ui/bagl_display.c +++ b/src/ui/bagl_display.c @@ -185,9 +185,9 @@ int ui_display_transaction() { memset(g_amount, 0, sizeof(g_amount)); char amount[30] = {0}; if (!format_fpu64_trimmed(amount, - sizeof(amount), - G_context.tx_info.transaction.tx_outputs[0].value, - EXPONENT_SMALLEST_UNIT)) { + sizeof(amount), + G_context.tx_info.transaction.tx_outputs[0].value, + EXPONENT_SMALLEST_UNIT)) { return io_send_sw(SW_DISPLAY_AMOUNT_FAIL); } snprintf(g_amount, sizeof(g_amount), "KAS %.*s", sizeof(amount), amount); diff --git a/src/ui/nbgl_display_transaction.c b/src/ui/nbgl_display_transaction.c index 07a09fb..103626e 100755 --- a/src/ui/nbgl_display_transaction.c +++ b/src/ui/nbgl_display_transaction.c @@ -116,9 +116,9 @@ int ui_display_transaction() { memset(g_amount, 0, sizeof(g_amount)); char amount[30] = {0}; if (!format_fpu64_trimmed(amount, - sizeof(amount), - G_context.tx_info.transaction.tx_outputs[0].value, - EXPONENT_SMALLEST_UNIT)) { + sizeof(amount), + G_context.tx_info.transaction.tx_outputs[0].value, + EXPONENT_SMALLEST_UNIT)) { return io_send_sw(SW_DISPLAY_AMOUNT_FAIL); } snprintf(g_amount, sizeof(g_amount), "KAS %.*s", sizeof(amount), amount);