electrum

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

commit 952da14be4a9433011b4496d9159f2423afa02e6
parent 6df95ee706df606d8f8c707dfe7450ec2ca223c5
Author: ThomasV <thomasv@gitorious>
Date:   Sun, 10 Jun 2012 11:30:14 +0200

option to send change back to input address

Diffstat:
Mlib/gui_qt.py | 15++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/lib/gui_qt.py b/lib/gui_qt.py @@ -427,6 +427,11 @@ class ElectrumWindow(QMainWindow): grid.addWidget(QLabel(_('Amount')), 3, 0) grid.addWidget(self.amount_e, 3, 1, 1, 2) + if self.wallet.expert_mode: + self.nochange_cb = QCheckBox('Do not create change address') + grid.addWidget(self.nochange_cb,3,3) + self.nochange_cb.setChecked(False) + self.fee_e = QLineEdit() grid.addWidget(QLabel(_('Fee')), 4, 0) grid.addWidget(self.fee_e, 4, 1, 1, 2) @@ -530,8 +535,15 @@ class ElectrumWindow(QMainWindow): else: password = None + if self.nochange_cb.isChecked(): + inputs, total, fee = self.wallet.choose_tx_inputs( amount, fee ) + change_addr = inputs[0][0] + print "sending change to", change_addr + else: + change_addr = None + try: - tx = self.wallet.mktx( to_address, amount, label, password, fee ) + tx = self.wallet.mktx( to_address, amount, label, password, fee, change_addr ) except BaseException, e: self.show_message(str(e)) return @@ -1166,6 +1178,7 @@ class ElectrumWindow(QMainWindow): self.wallet.save() self.update_receive_tab() self.update_contacts_tab() + self.nochange_cb.setHidden(not self.wallet.expert_mode)