commit 0f0cee422e1b9def25f0b8e3d21022b1cc7f2770
parent 27299092dfddc484b942fc661fc815d12741583a
Author: SomberNight <somber.night@protonmail.com>
Date: Wed, 30 Jan 2019 12:03:52 +0100
trezor and clones: sign tx version too
Diffstat:
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/electrum/plugins/keepkey/keepkey.py b/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)
diff --git a/electrum/plugins/safe_t/safe_t.py b/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)
diff --git a/electrum/plugins/trezor/trezor.py b/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)