Merge branch '2.0'
This commit is contained in:
@@ -3,7 +3,7 @@ from PyQt4.QtCore import *
|
||||
import PyQt4.QtCore as QtCore
|
||||
|
||||
from electrum.i18n import _
|
||||
from electrum import Wallet, mnemonic
|
||||
from electrum import Wallet
|
||||
|
||||
from seed_dialog import SeedDialog
|
||||
from network_dialog import NetworkDialog
|
||||
@@ -259,13 +259,13 @@ class InstallWizard(QDialog):
|
||||
if not action:
|
||||
return
|
||||
|
||||
wallet = Wallet(self.storage)
|
||||
gap = self.config.get('gap_limit', 5)
|
||||
if gap != 5:
|
||||
wallet.gap_limit = gap
|
||||
wallet.storage.put('gap_limit', gap, True)
|
||||
#gap = self.config.get('gap_limit', 5)
|
||||
#if gap != 5:
|
||||
# wallet.gap_limit = gap
|
||||
# wallet.storage.put('gap_limit', gap, True)
|
||||
|
||||
if action == 'create':
|
||||
wallet = Wallet(self.storage)
|
||||
wallet.init_seed(None)
|
||||
if not self.show_seed(wallet):
|
||||
return
|
||||
@@ -277,23 +277,14 @@ class InstallWizard(QDialog):
|
||||
wallet.synchronize() # generate first addresses offline
|
||||
self.waiting_dialog(create)
|
||||
|
||||
|
||||
elif action == 'restore':
|
||||
seed = self.seed_dialog()
|
||||
if not seed:
|
||||
return
|
||||
try:
|
||||
wallet.init_seed(seed)
|
||||
except Exception:
|
||||
import traceback
|
||||
traceback.print_exc(file=sys.stdout)
|
||||
QMessageBox.warning(None, _('Error'), _('Incorrect seed'), _('OK'))
|
||||
return
|
||||
|
||||
wallet = Wallet.from_seed(seed, self.storage)
|
||||
ok, old_password, password = self.password_dialog(wallet)
|
||||
wallet.save_seed(password)
|
||||
|
||||
|
||||
elif action == 'watching':
|
||||
mpk = self.mpk_dialog()
|
||||
if not mpk:
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user