Browse Source

trezor: don't try to sign non-ismine inputs

progress towards coinjoin

related https://github.com/spesmilo/electrum/issues/8868
master
SomberNight 2 years ago
parent
commit
87214c004e
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
  1. 2
      electrum/plugins/trezor/trezor.py
  2. 1
      electrum/transaction.py
  3. 1
      electrum/wallet.py

2
electrum/plugins/trezor/trezor.py

@ -352,7 +352,7 @@ class TrezorPlugin(HW_PluginBase):
assert isinstance(tx, PartialTransaction)
assert isinstance(txin, PartialTxInput)
assert keystore
if txin.is_complete():
if txin.is_complete() or not txin.is_mine:
txinputtype.script_type = InputScriptType.EXTERNAL
assert txin.scriptpubkey
txinputtype.script_pubkey = txin.scriptpubkey

1
electrum/transaction.py

@ -1389,6 +1389,7 @@ class PartialTxInput(TxInput, PSBTSection):
self._unknown = {} # type: Dict[bytes, bytes]
self._script_descriptor = None # type: Optional[Descriptor]
self.is_mine = False # type: bool # whether the wallet considers the input to be ismine
self._trusted_value_sats = None # type: Optional[int]
self._trusted_address = None # type: Optional[str]
self._is_p2sh_segwit = None # type: Optional[bool] # None means unknown

1
electrum/wallet.py

@ -2443,6 +2443,7 @@ class Abstract_Wallet(ABC, Logger, EventListener):
self.lnworker.swap_manager.add_txin_info(txin)
return
txin.script_descriptor = self.get_script_descriptor_for_address(address)
txin.is_mine = True
self._add_txinout_derivation_info(txin, address, only_der_suffix=only_der_suffix)
txin.block_height = self.adb.get_tx_height(txin.prevout.txid.hex()).height

Loading…
Cancel
Save