transaction: rm hardcoded sighash magic numbers
This commit is contained in:
@@ -7,7 +7,7 @@ from electrum.bip32 import BIP32Node, convert_bip32_path_to_list_of_uint32 as pa
|
||||
from electrum import constants
|
||||
from electrum.i18n import _
|
||||
from electrum.plugin import Device, runs_in_hwd_thread
|
||||
from electrum.transaction import Transaction, PartialTransaction, PartialTxInput, PartialTxOutput
|
||||
from electrum.transaction import Transaction, PartialTransaction, PartialTxInput, PartialTxOutput, Sighash
|
||||
from electrum.keystore import Hardware_KeyStore
|
||||
from electrum.base_wizard import ScriptTypeNotSupported, HWD_SETUP_NEW_WALLET
|
||||
from electrum.logging import get_logger
|
||||
@@ -370,7 +370,8 @@ class TrezorPlugin(HW_PluginBase):
|
||||
amount_unit=self.get_trezor_amount_unit(),
|
||||
serialize=False,
|
||||
prev_txes=prev_tx)
|
||||
signatures = [(bh2u(x) + '01') for x in signatures]
|
||||
sighash = Sighash.to_sigbytes(Sighash.ALL).hex()
|
||||
signatures = [(bh2u(x) + sighash) for x in signatures]
|
||||
tx.update_signatures(signatures)
|
||||
|
||||
@runs_in_hwd_thread
|
||||
|
||||
Reference in New Issue
Block a user