Browse Source

trezor and clones: sign tx version too

sqlite_db
SomberNight 6 years ago
parent
commit
0f0cee422e
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 3
      electrum/plugins/keepkey/keepkey.py
  2. 3
      electrum/plugins/safe_t/safe_t.py
  3. 2
      electrum/plugins/trezor/trezor.py

3
electrum/plugins/keepkey/keepkey.py

@ -289,7 +289,8 @@ class KeepKeyPlugin(HW_PluginBase):
client = self.get_client(keystore)
inputs = self.tx_inputs(tx, True)
outputs = self.tx_outputs(keystore.get_derivation(), tx)
signatures = client.sign_tx(self.get_coin_name(), inputs, outputs, lock_time=tx.locktime)[0]
signatures = client.sign_tx(self.get_coin_name(), inputs, outputs,
lock_time=tx.locktime, version=tx.version)[0]
signatures = [(bh2u(x) + '01') for x in signatures]
tx.update_signatures(signatures)

3
electrum/plugins/safe_t/safe_t.py

@ -306,7 +306,8 @@ class SafeTPlugin(HW_PluginBase):
client = self.get_client(keystore)
inputs = self.tx_inputs(tx, True)
outputs = self.tx_outputs(keystore.get_derivation(), tx)
signatures = client.sign_tx(self.get_coin_name(), inputs, outputs, lock_time=tx.locktime)[0]
signatures = client.sign_tx(self.get_coin_name(), inputs, outputs,
lock_time=tx.locktime, version=tx.version)[0]
signatures = [(bh2u(x) + '01') for x in signatures]
tx.update_signatures(signatures)

2
electrum/plugins/trezor/trezor.py

@ -310,7 +310,7 @@ class TrezorPlugin(HW_PluginBase):
client = self.get_client(keystore)
inputs = self.tx_inputs(tx, xpub_path, True)
outputs = self.tx_outputs(keystore.get_derivation(), tx)
details = SignTx(lock_time=tx.locktime)
details = SignTx(lock_time=tx.locktime, version=tx.version)
signatures, _ = client.sign_tx(self.get_coin_name(), inputs, outputs, details=details, prev_txes=prev_tx)
signatures = [(bh2u(x) + '01') for x in signatures]
tx.update_signatures(signatures)

Loading…
Cancel
Save