mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-18 02:22:01 +00:00
src/apps/wallet/sign_tx: don't append bip115 replay protection script if no arguments provided
This commit is contained in:
parent
2b66deb3d6
commit
6d5a8645fd
@ -43,6 +43,8 @@ def output_script_p2sh(scripthash: bytes) -> bytearray:
|
|||||||
|
|
||||||
|
|
||||||
def script_replay_protection_bip115(block_hash: bytes, block_height: bytes) -> bytearray:
|
def script_replay_protection_bip115(block_hash: bytes, block_height: bytes) -> bytearray:
|
||||||
|
if block_hash is None or block_height is None:
|
||||||
|
return bytearray()
|
||||||
block_height_size = len(block_height) # size in bytes of block_height (should be 3)
|
block_height_size = len(block_height) # size in bytes of block_height (should be 3)
|
||||||
s = bytearray(38)
|
s = bytearray(38)
|
||||||
s[0] = 0x20 # 32 bytes for block hash
|
s[0] = 0x20 # 32 bytes for block hash
|
||||||
|
Loading…
Reference in New Issue
Block a user