1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-18 12:28:09 +00:00

src/apps/wallet/sign_tx: add default values for branch_id (zcash)

This commit is contained in:
Pavol Rusnak 2019-02-15 01:48:29 +01:00
parent e81f89288f
commit ae9cdec0d8
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -66,9 +66,11 @@ async def check_tx_fee(tx: SignTx, keychain: seed.Keychain):
tx_ser = TxRequestSerializedType() tx_ser = TxRequestSerializedType()
elif tx.overwintered: elif tx.overwintered:
if tx.version == 3: 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: 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: else:
raise SigningError( raise SigningError(
FailureType.DataError, FailureType.DataError,