strip spaces from txid dialog output
This commit is contained in:
parent
6c69849be9
commit
3e4d332a4c
|
@ -2349,15 +2349,13 @@ class ElectrumWindow(QMainWindow):
|
||||||
file_content = f.read()
|
file_content = f.read()
|
||||||
except (ValueError, IOError, os.error), reason:
|
except (ValueError, IOError, os.error), reason:
|
||||||
QMessageBox.critical(None, _("Unable to read file or no transaction found"), _("Electrum was unable to open your transaction file") + "\n" + str(reason))
|
QMessageBox.critical(None, _("Unable to read file or no transaction found"), _("Electrum was unable to open your transaction file") + "\n" + str(reason))
|
||||||
|
|
||||||
return self.tx_from_text(file_content)
|
return self.tx_from_text(file_content)
|
||||||
|
|
||||||
|
|
||||||
def do_process_from_text(self):
|
def do_process_from_text(self):
|
||||||
text = text_dialog(self, _('Input raw transaction'), _("Transaction:"), _("Load transaction"))
|
text = text_dialog(self, _('Input raw transaction'), _("Transaction:"), _("Load transaction"))
|
||||||
if not text:
|
if not text:
|
||||||
return
|
return
|
||||||
tx = self.tx_from_text(text)
|
tx = self.tx_from_text()
|
||||||
if tx:
|
if tx:
|
||||||
self.show_transaction(tx)
|
self.show_transaction(tx)
|
||||||
|
|
||||||
|
@ -2370,8 +2368,9 @@ class ElectrumWindow(QMainWindow):
|
||||||
from electrum import transaction
|
from electrum import transaction
|
||||||
txid, ok = QInputDialog.getText(self, _('Lookup transaction'), _('Transaction ID') + ':')
|
txid, ok = QInputDialog.getText(self, _('Lookup transaction'), _('Transaction ID') + ':')
|
||||||
if ok and txid:
|
if ok and txid:
|
||||||
|
txid = str(txid).strip()
|
||||||
try:
|
try:
|
||||||
r = self.network.synchronous_get(('blockchain.transaction.get',[str(txid)]))
|
r = self.network.synchronous_get(('blockchain.transaction.get',[txid]))
|
||||||
except BaseException as e:
|
except BaseException as e:
|
||||||
self.show_message(str(e))
|
self.show_message(str(e))
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue