sys.exit("Error: Could not import icons_rc.py, please generate it with: 'pyrcc4 icons.qrc -o lib/icons_rc.py'")
fromwalletimportformat_satoshis
frombitcoinimportTransaction
importbmp,mnemonic,pyqrnative,qrscanner
importexchange_rate
@ -790,6 +791,7 @@ class ElectrumWindow(QMainWindow):
grid.addWidget(QLabel(_('Description')),2,0)
grid.addWidget(self.message_e,2,1,1,3)
grid.addWidget(HelpButton(_('Description of the transaction (not mandatory).')+'\n\n'+_('The description is not sent to the recipient of the funds. It is stored in your wallet file, and displayed in the \'History\' tab.')),2,4)
self.message_e.setEnabled(False)
self.amount_e=QLineEdit()
grid.addWidget(QLabel(_('Amount')),3,0)
@ -805,8 +807,11 @@ class ElectrumWindow(QMainWindow):
_('Bitcoin transactions are in general not free. A transaction fee is paid by the sender of the funds.')+'\n\n'\
+_('The amount of fee can be decided freely by the sender. However, transactions with low fees take more time to be processed.')+'\n\n'\
+_('A suggested fee is automatically added to this field. You may override it. The suggested fee increases with the size of the transaction.')),4,3)
vbox.addWidget(QLabel(_("This transaction is not signed yet.")))
else:
vbox.addWidget(EnterButton(_("Send this transaction"),self.send_raw_transaction))
ifnotdialog.exec_():return
defdo_send_from_file(self):
try:
fileName=QFileDialog.getOpenFileName(QWidget(),_("Select your transaction file"),os.path.expanduser('~'))
iffileName:
withopen(fileName,"r")astransaction_file:
file_content=transaction_file.read()
printfile_content
tx=json.loads(str(file_content))
self.create_send_transaction_window(tx)
except(ValueError,IOError,os.error),reason:
QMessageBox.critical(None,"Unable to read file or no transaction found",_("Electrum was unable to read your transaction file")+"\n"+str(reason))
defdo_send_from_text(self):
tx,ok=QInputDialog.getText(QTextEdit(),_('Send raw transaction'),_('Transaction data in JSON')+':')
try:
tx=json.loads(unicode(tx))
except(ValueError,IOError,os.error),reason:
QMessageBox.critical(None,"Unable to read transaction",_("Electrum was unable to read your transaction:")+"\n"+str(reason))
self.create_send_transaction_window(tx)
defdo_export_privkeys(self):
self.show_message("%s\n%s\n%s"%(_("WARNING: ALL your private keys are secret."),_("Exposing a single private key can compromise your entire wallet!"),_("In particular, DO NOT use 'redeem private key' services proposed by third parties.")))
@ -1979,6 +2151,27 @@ class ElectrumWindow(QMainWindow):
+_('If you restore your wallet from it, a watching-only (deseeded) wallet will be created.')),4,3)
grid_io.setRowStretch(4,1)
tab4=QWidget()
grid_raw=QGridLayout(tab4)
grid_raw.setColumnStretch(0,1)
tabs.addTab(tab4,_('Raw transactions'))
#
#grid_raw.addWidget(QLabel(_("Read raw transaction")), 3, 0)