1
0

Merge pull request #4148 from SomberNight/hw_wallet_output_ismine_der

trezor/keepkey/dbb: provide derivation info for all is_mine txn outputs
This commit is contained in:
ThomasV
2018-03-22 12:18:59 +01:00
committed by GitHub
4 changed files with 144 additions and 86 deletions

View File

@@ -377,7 +377,8 @@ class Ledger_KeyStore(Hardware_KeyStore):
for _type, address, amount in tx.outputs():
assert _type == TYPE_ADDRESS
info = tx.output_info.get(address)
if (info is not None) and (len(tx.outputs()) != 1):
if (info is not None) and len(tx.outputs()) > 1 \
and info[0][0] == 1: # "is on 'change' branch"
index, xpubs, m = info
changePath = self.get_derivation()[2:] + "/%d/%d"%index
changeAmount = amount