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

@@ -15,6 +15,7 @@ from electrum.wallet import Standard_Wallet
from electrum.base_wizard import ScriptTypeNotSupported
from ..hw_wallet import HW_PluginBase
from ..hw_wallet.plugin import is_any_tx_output_on_change_branch
# TREZOR initialization methods
@@ -393,18 +394,9 @@ class KeepKeyPlugin(HW_PluginBase):
txoutputtype.address = address
return txoutputtype
def is_any_output_on_change_branch():
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
outputs = []
has_change = False
any_output_on_change_branch = is_any_output_on_change_branch()
any_output_on_change_branch = is_any_tx_output_on_change_branch(tx)
for _type, address, amount in tx.outputs():
use_create_by_derivation = False