From 64a218eea04a8a7693c777ffed01858bb1d65644 Mon Sep 17 00:00:00 2001 From: Tomas Susanka Date: Mon, 28 Oct 2019 15:35:58 +0000 Subject: [PATCH] bitcoin: simplify if expression --- core/src/apps/wallet/sign_tx/addresses.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/apps/wallet/sign_tx/addresses.py b/core/src/apps/wallet/sign_tx/addresses.py index 9bb13fd55..3bd83db1a 100644 --- a/core/src/apps/wallet/sign_tx/addresses.py +++ b/core/src/apps/wallet/sign_tx/addresses.py @@ -219,7 +219,7 @@ def validate_full_path( if path[1] > 20 and path[1] != coin.slip44 | HARDENED: return False - if (path[2] > 20 and path[2] < HARDENED) or path[2] > 20 | HARDENED: + if (20 < path[2] < HARDENED) or path[2] > 20 | HARDENED: return False if path[3] not in (0, 1, 0 | HARDENED, 1 | HARDENED, 2 | HARDENED): return False