From efd4961f5e031cefb9da3d54eac05dfcf170c064 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Vejpustek?= Date: Mon, 24 Mar 2025 13:45:06 +0100 Subject: [PATCH] refactor(core): comment ethereum recovery id [no changelog] --- core/src/apps/ethereum/sign_tx.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/apps/ethereum/sign_tx.py b/core/src/apps/ethereum/sign_tx.py index 4c3b45c371..0a8b41d2ee 100644 --- a/core/src/apps/ethereum/sign_tx.py +++ b/core/src/apps/ethereum/sign_tx.py @@ -267,9 +267,11 @@ def _sign_digest( ) req = EthereumTxRequest() - req.signature_v = signature[0] if msg.chain_id <= MAX_CHAIN_ID: - req.signature_v += 35 + 2 * msg.chain_id + req.signature_v = signature[0] + 35 + 2 * msg.chain_id + else: + # https://github.com/trezor/trezor-core/pull/311 + req.signature_v = signature[0] req.signature_r = signature[1:33] req.signature_s = signature[33:]