|
@ -6,7 +6,7 @@ from electrum.bitcoin import (b58_address_to_hash160, xpub_from_pubkey, |
|
|
from electrum import constants |
|
|
from electrum import constants |
|
|
from electrum.i18n import _ |
|
|
from electrum.i18n import _ |
|
|
from electrum.plugins import BasePlugin, Device |
|
|
from electrum.plugins import BasePlugin, Device |
|
|
from electrum.transaction import deserialize |
|
|
from electrum.transaction import deserialize, Transaction |
|
|
from electrum.keystore import Hardware_KeyStore, is_xpubkey, parse_xpubkey |
|
|
from electrum.keystore import Hardware_KeyStore, is_xpubkey, parse_xpubkey |
|
|
|
|
|
|
|
|
from ..hw_wallet import HW_PluginBase |
|
|
from ..hw_wallet import HW_PluginBase |
|
@ -63,6 +63,8 @@ class TrezorKeyStore(Hardware_KeyStore): |
|
|
for txin in tx.inputs(): |
|
|
for txin in tx.inputs(): |
|
|
pubkeys, x_pubkeys = tx.get_sorted_pubkeys(txin) |
|
|
pubkeys, x_pubkeys = tx.get_sorted_pubkeys(txin) |
|
|
tx_hash = txin['prevout_hash'] |
|
|
tx_hash = txin['prevout_hash'] |
|
|
|
|
|
if txin.get('prev_tx') is None and not Transaction.is_segwit_input(txin): |
|
|
|
|
|
raise Exception(_('Offline signing with {} is not supported for legacy inputs.').format(self.device)) |
|
|
prev_tx[tx_hash] = txin['prev_tx'] |
|
|
prev_tx[tx_hash] = txin['prev_tx'] |
|
|
for x_pubkey in x_pubkeys: |
|
|
for x_pubkey in x_pubkeys: |
|
|
if not is_xpubkey(x_pubkey): |
|
|
if not is_xpubkey(x_pubkey): |
|
|