1
0

fix tx signing with watching only wallets

This commit is contained in:
ThomasV
2013-11-12 11:14:16 +01:00
parent df76aac2db
commit 7ead6d18f2
4 changed files with 22 additions and 12 deletions

View File

@@ -910,14 +910,16 @@ class ElectrumWindow(QMainWindow):
else:
QMessageBox.warning(self, _('Error'), msg, _('OK'))
else:
filename = label + '.txn' if label else 'unsigned_%s.txn' % (time.mktime(time.gmtime()))
try:
fileName = self.getSaveFileName(_("Select a transaction filename"), filename, "*.txn")
with open(fileName,'w') as f:
f.write(json.dumps(tx.as_dict(),indent=4) + '\n')
QMessageBox.information(self, _('Unsigned transaction created'), _("Unsigned transaction was saved to file:") + " " +fileName, _('OK'))
except Exception:
QMessageBox.warning(self, _('Error'), _('Could not write transaction to file'), _('OK'))
self.show_transaction(tx)
#filename = label + '.txn' if label else 'unsigned_%s.txn' % (time.mktime(time.gmtime()))
#try:
# fileName = self.getSaveFileName(_("Select a transaction filename"), filename, "*.txn")
# with open(fileName,'w') as f:
# f.write(json.dumps(tx.as_dict(),indent=4) + '\n')
# QMessageBox.information(self, _('Unsigned transaction created'), _("Unsigned transaction was saved to file:") + " " +fileName, _('OK'))
#except Exception:
# QMessageBox.warning(self, _('Error'), _('Could not write transaction to file'), _('OK'))
# add recipient to addressbook
if to_address not in self.wallet.addressbook and not self.wallet.is_mine(to_address):