From 7d5771911ce57c1f75a45a61d1e14c21d863747f Mon Sep 17 00:00:00 2001 From: matejcik Date: Fri, 13 Mar 2020 10:27:27 +0100 Subject: [PATCH] core: flip condition for force_bip143 this should be equivalent because Bitcoin does not have force_bip143 set --- core/src/apps/wallet/sign_tx/signing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/apps/wallet/sign_tx/signing.py b/core/src/apps/wallet/sign_tx/signing.py index cbdb276cb5..b8f16f5fb8 100644 --- a/core/src/apps/wallet/sign_tx/signing.py +++ b/core/src/apps/wallet/sign_tx/signing.py @@ -130,7 +130,7 @@ async def check_tx_fee(tx: SignTx, keychain: seed.Keychain, coin: coininfo.CoinI InputScriptType.SPENDADDRESS, InputScriptType.SPENDMULTISIG, ): - if coin.force_bip143 or (not utils.BITCOIN_ONLY and coin.overwintered): + if not utils.BITCOIN_ONLY and (coin.force_bip143 or coin.overwintered): if not txi.amount: raise SigningError( FailureType.DataError, "Expected input with amount" @@ -288,7 +288,7 @@ async def sign_tx(tx: SignTx, keychain: seed.Keychain): tx_ser.signature = None tx_req.serialized = tx_ser - elif coin.force_bip143 or (not utils.BITCOIN_ONLY and coin.overwintered): + elif not utils.BITCOIN_ONLY and (coin.force_bip143 or coin.overwintered): # STAGE_REQUEST_SEGWIT_INPUT txi_sign = await helpers.request_tx_input(tx_req, i_sign, coin) input_check_wallet_path(txi_sign, wallet_path)