electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 4fcfc6d4190d6e7322d6f81248d4a5841791c903
parent 1b346b1aeb5fb8b784956e3f31c0ac2355c56fe8
Author: ThomasV <thomasv@gitorious>
Date:   Thu, 11 Sep 2014 08:43:09 +0200

use own address to create dummy transactions

Diffstat:
Mgui/qt/main_window.py | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py @@ -206,7 +206,8 @@ class ElectrumWindow(QMainWindow): self.wallet = wallet self.update_wallet_format() - + # address used to create a dummy transaction and estimate transaction fee + self.dummy_address = self.wallet.addresses(False)[0] self.invoices = self.wallet.storage.get('invoices', {}) self.accounts_expanded = self.wallet.storage.get('accounts_expanded',{}) self.current_account = self.wallet.storage.get("current_account", None) @@ -926,7 +927,8 @@ class ElectrumWindow(QMainWindow): sendable = self.get_sendable_balance() inputs = self.get_coins() for i in inputs: self.wallet.add_input_info(i) - output = ('address', self.payto_e.payto_address, sendable) if self.payto_e.payto_address else ('op_return', 'dummy_tx', sendable) + addr = self.payto_e.payto_address if self.payto_e.payto_address else self.dummy_address + output = ('address', addr, sendable) dummy_tx = Transaction(inputs, [output]) fee = self.wallet.estimated_fee(dummy_tx) self.amount_e.setAmount(sendable-fee) @@ -944,7 +946,8 @@ class ElectrumWindow(QMainWindow): self.not_enough_funds = False else: if not outputs: - outputs = [('op_return', 'dummy_tx', amount)] + addr = self.payto_e.payto_address if self.payto_e.payto_address else self.dummy_address + outputs = [('address', addr, amount)] tx = self.wallet.make_unsigned_transaction(outputs, fee, coins = self.get_coins()) self.not_enough_funds = (tx is None) if not is_fee: