From dc8bedd75b24f3913759c7a16bc980a5d59761cd Mon Sep 17 00:00:00 2001 From: ThomasV Date: Mon, 7 Mar 2016 06:38:52 +0100 Subject: [PATCH] trustedcoin: fix get_max_amount --- RELEASE-NOTES | 4 ++++ plugins/trustedcoin/trustedcoin.py | 7 +++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index c4ca6a786..6bc570676 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -1,3 +1,7 @@ +# Release 2.6.2 (bugfixes) + * fix Trustedcoin restore from seed (bug #1704) + * small improvements to kivy GUI + # Release 2.6.1 (bugfixes) * fix broadcast command (bug #1688) * fix tx dialog (bug #1690) diff --git a/plugins/trustedcoin/trustedcoin.py b/plugins/trustedcoin/trustedcoin.py index 86ff3aaef..deaabdd33 100644 --- a/plugins/trustedcoin/trustedcoin.py +++ b/plugins/trustedcoin/trustedcoin.py @@ -211,20 +211,19 @@ class Wallet_2fa(Multisig_Wallet): def can_sign_without_server(self): return self.master_private_keys.get('x2/') is not None - def get_max_amount(self, config, inputs, fee): + def get_max_amount(self, config, inputs, recipient, fee): from electrum.transaction import Transaction sendable = sum(map(lambda x:x['value'], inputs)) for i in inputs: self.add_input_info(i) - dummy_address = self.dummy_address() xf = self.extra_fee() if xf and sendable >= xf: billing_address = self.billing_info['billing_address'] sendable -= xf - outputs = [(TYPE_ADDRESS, dummy_address, sendable), + outputs = [(TYPE_ADDRESS, recipient, sendable), (TYPE_ADDRESS, billing_address, xf)] else: - outputs = [(TYPE_ADDRESS, dummy_address, sendable)] + outputs = [(TYPE_ADDRESS, recipient, sendable)] dummy_tx = Transaction.from_io(inputs, outputs) if fee is None: