From 10ce81b5d11e084406d6d42ab23f4f8fb9351ea8 Mon Sep 17 00:00:00 2001 From: Eduard Klementiev Date: Mon, 25 Oct 2021 15:34:19 +0300 Subject: [PATCH] fix(python/trezorctl): fix operator precedence issue for ethereum sign-tx command --- python/.changelog.d/1867.fixed | 1 + python/src/trezorlib/cli/ethereum.py | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 python/.changelog.d/1867.fixed diff --git a/python/.changelog.d/1867.fixed b/python/.changelog.d/1867.fixed new file mode 100644 index 000000000..721be4e30 --- /dev/null +++ b/python/.changelog.d/1867.fixed @@ -0,0 +1 @@ +fix operator precedence issue for ethereum sign-tx command diff --git a/python/src/trezorlib/cli/ethereum.py b/python/src/trezorlib/cli/ethereum.py index 1a1e4ed74..54e77de25 100644 --- a/python/src/trezorlib/cli/ethereum.py +++ b/python/src/trezorlib/cli/ethereum.py @@ -268,8 +268,7 @@ def sign_tx( (not is_eip1559 and gas_price is None) or any(x is None for x in (gas_limit, nonce)) or publish - and not w3.isConnected() - ): + ) and not w3.isConnected(): click.echo("Failed to connect to Ethereum node.") click.echo( "If you want to sign offline, make sure you provide --gas-price, "