tfollow-up to #604 - electrum - Electrum Bitcoin wallet (HTM) git clone https://git.parazyd.org/electrum (DIR) Log (DIR) Files (DIR) Refs (DIR) Submodules --- (DIR) commit 48e6dba6848948d856db9c06144024c4b23682dd (DIR) parent fb53fc758d23ac0fe4f07b829cff36effb821afd (HTM) Author: ThomasV <thomasv@gitorious> Date: Wed, 5 Mar 2014 09:35:54 +0100 follow-up to #604 Diffstat: M gui/qt/main_window.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) --- (DIR) diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py t@@ -757,8 +757,9 @@ class ElectrumWindow(QMainWindow): if self.amount_e.is_shortcut: self.amount_e.is_shortcut = False sendable = self.get_sendable_balance() - inputs, total, fee = self.wallet.choose_tx_inputs( sendable, 0, self.get_payment_sources()) - fee = self.wallet.estimated_fee(inputs) + # there is only one output because we are completely spending inputs + inputs, total, fee = self.wallet.choose_tx_inputs( sendable, 0, 1, self.get_payment_sources()) + fee = self.wallet.estimated_fee(inputs, 1) amount = total - fee self.amount_e.setText( self.format_amount(amount) ) self.fee_e.setText( self.format_amount( fee ) ) t@@ -770,7 +771,8 @@ class ElectrumWindow(QMainWindow): if not is_fee: fee = None if amount is None: return - inputs, total, fee = self.wallet.choose_tx_inputs(amount, fee, self.get_payment_sources()) + # assume that there will be 2 outputs (one for change) + inputs, total, fee = self.wallet.choose_tx_inputs(amount, fee, 2, self.get_payment_sources()) if not is_fee: self.fee_e.setText( self.format_amount( fee ) ) if inputs: