diff --git a/core/src/apps/wallet/sign_tx/bitcoin.py b/core/src/apps/wallet/sign_tx/bitcoin.py index 878a44498..764927cec 100644 --- a/core/src/apps/wallet/sign_tx/bitcoin.py +++ b/core/src/apps/wallet/sign_tx/bitcoin.py @@ -349,7 +349,7 @@ class Bitcoin: FailureType.ProcessError, "Transaction has changed during signing" ) - # if multisig, check if signing with a key that is included in multisig + # if multisig, do a sanity check to ensure we are signing with a key that is included in the multisig if txi_sign.multisig: multisig.multisig_pubkey_index(txi_sign.multisig, key_sign_pub) diff --git a/core/src/apps/wallet/sign_tx/bitcoinlike.py b/core/src/apps/wallet/sign_tx/bitcoinlike.py index 871d2416c..b59ea666b 100644 --- a/core/src/apps/wallet/sign_tx/bitcoinlike.py +++ b/core/src/apps/wallet/sign_tx/bitcoinlike.py @@ -58,7 +58,7 @@ class Bitcoinlike(Bitcoin): key_sign = self.keychain.derive(txi_sign.address_n, self.coin.curve_name) key_sign_pub = key_sign.public_key() - self.hash143_hash = self.hash143.preimage_hash( + hash143_hash = self.hash143.preimage_hash( self.coin, self.tx, txi_sign, @@ -66,11 +66,11 @@ class Bitcoinlike(Bitcoin): self.get_hash_type(), ) - # if multisig, check if signing with a key that is included in multisig + # if multisig, do a sanity check to ensure we are signing with a key that is included in the multisig if txi_sign.multisig: multisig.multisig_pubkey_index(txi_sign.multisig, key_sign_pub) - signature = ecdsa_sign(key_sign, self.hash143_hash) + signature = ecdsa_sign(key_sign, hash143_hash) # serialize input with correct signature gc.collect() diff --git a/core/src/apps/wallet/sign_tx/zcash.py b/core/src/apps/wallet/sign_tx/zcash.py index 1c8497f83..3803795d4 100644 --- a/core/src/apps/wallet/sign_tx/zcash.py +++ b/core/src/apps/wallet/sign_tx/zcash.py @@ -120,9 +120,6 @@ class Zip143(Bip143): class Zip243(Zip143): - def __init__(self, branch_id: int) -> None: - super().__init__(branch_id) - def preimage_hash( self, coin: CoinInfo,