|
@ -25,7 +25,7 @@ from decimal import Decimal |
|
|
import thread |
|
|
import thread |
|
|
|
|
|
|
|
|
from wallet import format_satoshis |
|
|
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'] |
|
|
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'] |
|
|
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.set_path(options.wallet_path) |
|
|
wallet.read() |
|
|
wallet.read() |
|
|
wallet.remote_url = options.remote_url |
|
|
wallet.remote_url = options.remote_url |
|
|
interface = wallet.interface = new_interface(wallet) |
|
|
|
|
|
|
|
|
|
|
|
if len(args)==0: |
|
|
if len(args)==0: |
|
|
url = None |
|
|
url = None |
|
@ -71,13 +70,14 @@ if __name__ == '__main__': |
|
|
print "unknown gui", options.gui |
|
|
print "unknown gui", options.gui |
|
|
exit(1) |
|
|
exit(1) |
|
|
|
|
|
|
|
|
thread.start_new_thread(loop_interfaces_thread, (wallet,)) |
|
|
|
|
|
gui = gui.ElectrumGui(wallet) |
|
|
gui = gui.ElectrumGui(wallet) |
|
|
|
|
|
thread.start_new_thread(loop_interfaces_thread, (wallet,)) |
|
|
|
|
|
|
|
|
try: |
|
|
try: |
|
|
found = wallet.file_exists |
|
|
found = wallet.file_exists |
|
|
if not found: |
|
|
if not found: |
|
|
found = gui.restore_or_create() |
|
|
found = gui.restore_or_create() |
|
|
|
|
|
|
|
|
except BaseException, e: |
|
|
except BaseException, e: |
|
|
import traceback |
|
|
import traceback |
|
|
traceback.print_exc(file=sys.stdout) |
|
|
traceback.print_exc(file=sys.stdout) |
|
@ -165,9 +165,7 @@ if __name__ == '__main__': |
|
|
|
|
|
|
|
|
# open session |
|
|
# open session |
|
|
if cmd not in offline_commands: |
|
|
if cmd not in offline_commands: |
|
|
addresses = wallet.all_addresses() |
|
|
wallet.start_interface() |
|
|
version = wallet.electrum_version |
|
|
|
|
|
interface.start_session(addresses, version) |
|
|
|
|
|
thread.start_new_thread(wallet.run, ()) |
|
|
thread.start_new_thread(wallet.run, ()) |
|
|
wallet.update() |
|
|
wallet.update() |
|
|
wallet.save() |
|
|
wallet.save() |
|
|