gui fix: send tx dialog

This commit is contained in:
ThomasV 2014-04-02 13:18:00 +02:00
parent df540cb241
commit 53b872acdf
1 changed files with 6 additions and 5 deletions

View File

@ -178,6 +178,7 @@ class ElectrumWindow(QMainWindow):
self.connect(self, QtCore.SIGNAL('update_status'), self.update_status) self.connect(self, QtCore.SIGNAL('update_status'), self.update_status)
self.connect(self, QtCore.SIGNAL('banner_signal'), lambda: self.console.showMessage(self.network.banner) ) self.connect(self, QtCore.SIGNAL('banner_signal'), lambda: self.console.showMessage(self.network.banner) )
self.connect(self, QtCore.SIGNAL('transaction_signal'), lambda: self.notify_transactions() ) self.connect(self, QtCore.SIGNAL('transaction_signal'), lambda: self.notify_transactions() )
self.connect(self, QtCore.SIGNAL('send_tx2'), self.send_tx2)
self.history_list.setFocus(True) self.history_list.setFocus(True)
@ -888,12 +889,11 @@ class ElectrumWindow(QMainWindow):
keypairs = {} keypairs = {}
self.wallet.add_keypairs_from_wallet(tx, keypairs, password) self.wallet.add_keypairs_from_wallet(tx, keypairs, password)
self.wallet.sign_transaction(tx, keypairs, password) self.wallet.sign_transaction(tx, keypairs, password)
self.signed_tx = tx self.signed_tx_data = (tx, fee, label)
self.emit(SIGNAL('send_tx2')) self.emit(SIGNAL('send_tx2'))
# sign the tx # sign the tx
dialog = self.waiting_dialog('Signing..') self.tx_wait_dialog = self.waiting_dialog('Signing..')
self.connect(self, QtCore.SIGNAL('send_tx2'), lambda: self.send_tx2(self.signed_tx, fee, label, dialog, password))
threading.Thread(target=sign_thread).start() threading.Thread(target=sign_thread).start()
# add recipient to addressbook # add recipient to addressbook
@ -901,8 +901,9 @@ class ElectrumWindow(QMainWindow):
self.wallet.addressbook.append(to_address) self.wallet.addressbook.append(to_address)
def send_tx2(self, tx, fee, label, dialog, password): def send_tx2(self):
dialog.accept() tx, fee, label = self.signed_tx_data
self.tx_wait_dialog.accept()
if tx.error: if tx.error:
self.show_message(tx.error) self.show_message(tx.error)