Browse Source

gui: load tx from blockchain

283
ThomasV 11 years ago
parent
commit
df4b47849d
  1. 15
      gui/qt/main_window.py

15
gui/qt/main_window.py

@ -426,6 +426,9 @@ class ElectrumWindow(QMainWindow):
raw_transaction_text = raw_transaction_menu.addAction(_("&From text"))
raw_transaction_text.triggered.connect(self.do_process_from_text)
raw_transaction_text = raw_transaction_menu.addAction(_("&From the blockchain"))
raw_transaction_text.triggered.connect(self.do_process_from_txid)
help_menu = menubar.addMenu(_("&Help"))
show_about = help_menu.addAction(_("&About"))
@ -1887,6 +1890,18 @@ class ElectrumWindow(QMainWindow):
if tx:
self.show_transaction(tx)
def do_process_from_txid(self):
from electrum import transaction
txid, ok = QInputDialog.getText(self, _('Lookup transaction'), _('Transaction ID') + ':')
if ok and txid:
r = self.network.synchronous_get([ ('blockchain.transaction.get',[str(txid)]) ])[0]
if r:
tx = transaction.Transaction(r)
if tx:
self.show_transaction(tx)
else:
self.show_message("unknown transaction")
def do_process_from_csvReader(self, csvReader):
outputs = []
try:

Loading…
Cancel
Save