mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-24 15:28:10 +00:00
src/apps/wallet: more work on zcash overwinter
This commit is contained in:
parent
7f36185ab3
commit
cfa73b276e
@ -64,6 +64,7 @@ class Bip143:
|
|||||||
write_uint32(h_preimage, tx.lock_time) # nLockTime
|
write_uint32(h_preimage, tx.lock_time) # nLockTime
|
||||||
if tx.overwintered:
|
if tx.overwintered:
|
||||||
write_uint32(h_preimage, tx.expiry) # expiryHeight
|
write_uint32(h_preimage, tx.expiry) # expiryHeight
|
||||||
|
write_varint(h_preimage, 0) # nJoinSplit
|
||||||
write_uint32(h_preimage, sighash) # nHashType
|
write_uint32(h_preimage, sighash) # nHashType
|
||||||
|
|
||||||
return get_tx_hash(h_preimage, True)
|
return get_tx_hash(h_preimage, True)
|
||||||
|
@ -287,7 +287,8 @@ async def sign_tx(tx: SignTx, root: bip32.HDNode):
|
|||||||
|
|
||||||
write_uint32(h_sign, tx.lock_time)
|
write_uint32(h_sign, tx.lock_time)
|
||||||
if tx.overwintered:
|
if tx.overwintered:
|
||||||
write_uint32(h_sign, tx.expiry)
|
write_uint32(h_sign, tx.expiry) # expiryHeight
|
||||||
|
write_varint(h_sign, 0) # nJoinSplit
|
||||||
|
|
||||||
write_uint32(h_sign, get_hash_type(coin))
|
write_uint32(h_sign, get_hash_type(coin))
|
||||||
|
|
||||||
@ -378,7 +379,8 @@ async def sign_tx(tx: SignTx, root: bip32.HDNode):
|
|||||||
|
|
||||||
write_uint32(tx_ser.serialized_tx, tx.lock_time)
|
write_uint32(tx_ser.serialized_tx, tx.lock_time)
|
||||||
if tx.overwintered:
|
if tx.overwintered:
|
||||||
write_uint32(tx_ser.serialized_tx, tx.expiry)
|
write_uint32(tx_ser.serialized_tx, tx.expiry) # expiryHeight
|
||||||
|
write_varint(tx_ser.serialized_tx, 0) # nJoinSplit
|
||||||
|
|
||||||
await request_tx_finish(tx_req)
|
await request_tx_finish(tx_req)
|
||||||
|
|
||||||
@ -415,6 +417,9 @@ async def get_prevtx_output_value(coin: CoinInfo, tx_req: TxRequest, prev_hash:
|
|||||||
|
|
||||||
write_uint32(txh, tx.lock_time)
|
write_uint32(txh, tx.lock_time)
|
||||||
|
|
||||||
|
if tx.overwintered:
|
||||||
|
write_uint32(txh, tx.expiry)
|
||||||
|
|
||||||
ofs = 0
|
ofs = 0
|
||||||
while ofs < tx.extra_data_len:
|
while ofs < tx.extra_data_len:
|
||||||
size = min(1024, tx.extra_data_len - ofs)
|
size = min(1024, tx.extra_data_len - ofs)
|
||||||
|
Loading…
Reference in New Issue
Block a user