electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 3f64e4d1f8dfea9396a2e746801f46ea41df8064
parent bccdab758b2c5f24fc023a4b9c77914fad6a964c
Author: ThomasV <thomasv@electrum.org>
Date:   Thu, 20 Oct 2016 08:23:10 +0200

fix #1988

Diffstat:
Mplugins/ledger/ledger.py | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/plugins/ledger/ledger.py b/plugins/ledger/ledger.py @@ -299,11 +299,12 @@ class Ledger_KeyStore(Hardware_KeyStore): if not p2shTransaction: if len(tx.outputs()) > 2: # should never happen self.give_error("Transaction with more than 2 outputs not supported") - for i, (_type, address, amount) in enumerate(tx.outputs()): + for _type, address, amount in tx.outputs(): assert _type == TYPE_ADDRESS - change, index = tx.output_info[i] - if change: - changePath = "%s/%d/%d" % (self.get_derivation()[2:], change, index) + info = tx.output_info.get(address) + if info is not None: + index, xpubs, m = info + changePath = self.get_derivation()[2:] + "/%d/%d"%index changeAmount = amount else: output = address