From ae9cdec0d8053dbc15640ad920b2bfc29e0c843d Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Fri, 15 Feb 2019 01:48:29 +0100 Subject: [PATCH] src/apps/wallet/sign_tx: add default values for branch_id (zcash) --- src/apps/wallet/sign_tx/signing.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/apps/wallet/sign_tx/signing.py b/src/apps/wallet/sign_tx/signing.py index 474ab0de12..b7d09e3549 100644 --- a/src/apps/wallet/sign_tx/signing.py +++ b/src/apps/wallet/sign_tx/signing.py @@ -66,9 +66,11 @@ async def check_tx_fee(tx: SignTx, keychain: seed.Keychain): tx_ser = TxRequestSerializedType() elif tx.overwintered: if tx.version == 3: - hash143 = zcash.Zip143(tx.branch_id) # ZIP-0143 transaction hashing + branch_id = tx.branch_id or 0x5BA81B19 # Overwinter + hash143 = zcash.Zip143(branch_id) # ZIP-0143 transaction hashing elif tx.version == 4: - hash143 = zcash.Zip243(tx.branch_id) # ZIP-0243 transaction hashing + branch_id = tx.branch_id or 0x76B809BB # Sapling + hash143 = zcash.Zip243(branch_id) # ZIP-0243 transaction hashing else: raise SigningError( FailureType.DataError,