1
0

ledger: support hiding outputs on 'receive' branch

so if change is on the 'receive' branch, user won't be prompted to confirm it
This commit is contained in:
SomberNight
2018-06-15 20:48:57 +02:00
parent 529cb3602c
commit 79f4a8bae9
4 changed files with 31 additions and 27 deletions

View File

@@ -75,3 +75,15 @@ class HW_PluginBase(BasePlugin):
if type(keystore) != self.keystore_class:
return False
return True
def is_any_tx_output_on_change_branch(tx):
if not hasattr(tx, 'output_info'):
return False
for _type, address, amount in tx.outputs():
info = tx.output_info.get(address)
if info is not None:
index, xpubs, m = info
if index[0] == 1:
return True
return False