mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-14 03:30:02 +00:00
bip143: all inputs (not only segwit ones) are added to bip143
This commit is contained in:
parent
26265ca511
commit
4fdc389a22
@ -64,6 +64,8 @@ async def check_tx_fee(tx: SignTx, root):
|
||||
txi = await request_tx_input(tx_req, i)
|
||||
wallet_path = input_extract_wallet_path(txi, wallet_path)
|
||||
write_tx_input_check(h_first, txi)
|
||||
bip143.add_prevouts(txi)
|
||||
bip143.add_sequence(txi)
|
||||
if (txi.script_type == InputScriptType.SPENDWITNESS or
|
||||
txi.script_type == InputScriptType.SPENDP2SHWITNESS):
|
||||
if not coin.segwit:
|
||||
@ -73,8 +75,6 @@ async def check_tx_fee(tx: SignTx, root):
|
||||
raise SigningError(FailureType.DataError,
|
||||
'Segwit input without amount')
|
||||
segwit[i] = True
|
||||
bip143.add_prevouts(txi)
|
||||
bip143.add_sequence(txi)
|
||||
total_in += txi.amount
|
||||
elif txi.script_type == InputScriptType.SPENDADDRESS:
|
||||
segwit[i] = False
|
||||
|
Loading…
Reference in New Issue
Block a user