start_interface method
This commit is contained in:
@@ -25,7 +25,7 @@ from decimal import Decimal
|
||||
import thread
|
||||
|
||||
from wallet import format_satoshis
|
||||
from interface import loop_interfaces_thread, new_interface
|
||||
from interface import loop_interfaces_thread
|
||||
|
||||
known_commands = ['help', 'validateaddress', 'balance', 'contacts', 'create', 'restore', 'payto', 'sendtx', 'password', 'addresses', 'history', 'label', 'mktx','seed','import','signmessage','verifymessage','eval']
|
||||
offline_commands = ['password', 'mktx', 'history', 'label', 'contacts', 'help', 'validateaddress', 'signmessage', 'verifymessage', 'eval', 'create', 'addresses', 'import', 'seed']
|
||||
@@ -50,7 +50,6 @@ if __name__ == '__main__':
|
||||
wallet.set_path(options.wallet_path)
|
||||
wallet.read()
|
||||
wallet.remote_url = options.remote_url
|
||||
interface = wallet.interface = new_interface(wallet)
|
||||
|
||||
if len(args)==0:
|
||||
url = None
|
||||
@@ -71,13 +70,14 @@ if __name__ == '__main__':
|
||||
print "unknown gui", options.gui
|
||||
exit(1)
|
||||
|
||||
thread.start_new_thread(loop_interfaces_thread, (wallet,))
|
||||
gui = gui.ElectrumGui(wallet)
|
||||
thread.start_new_thread(loop_interfaces_thread, (wallet,))
|
||||
|
||||
try:
|
||||
found = wallet.file_exists
|
||||
if not found:
|
||||
found = gui.restore_or_create()
|
||||
|
||||
except BaseException, e:
|
||||
import traceback
|
||||
traceback.print_exc(file=sys.stdout)
|
||||
@@ -165,9 +165,7 @@ if __name__ == '__main__':
|
||||
|
||||
# open session
|
||||
if cmd not in offline_commands:
|
||||
addresses = wallet.all_addresses()
|
||||
version = wallet.electrum_version
|
||||
interface.start_session(addresses, version)
|
||||
wallet.start_interface()
|
||||
thread.start_new_thread(wallet.run, ())
|
||||
wallet.update()
|
||||
wallet.save()
|
||||
|
||||
Reference in New Issue
Block a user