fix #2279: jsonrpc wallet

This commit is contained in:
ThomasV 2017-03-11 10:26:26 +01:00
parent 2b0a7bcd73
commit 0e49274eae
1 changed files with 3 additions and 3 deletions

View File

@ -116,8 +116,7 @@ class Daemon(DaemonThread):
self.gui = None
self.wallets = {}
# Setup JSONRPC server
default_wallet = None
self.cmd_runner = Commands(self.config, default_wallet, self.network)
self.cmd_runner = Commands(self.config, None, self.network)
self.init_server(config, fd)
def init_server(self, config, fd):
@ -153,7 +152,8 @@ class Daemon(DaemonThread):
response = "Daemon already running"
elif sub == 'load_wallet':
path = config.get_wallet_path()
self.load_wallet(path, config.get('password'))
wallet = self.load_wallet(path, config.get('password'))
self.cmd_runner.wallet = wallet
response = True
elif sub == 'close_wallet':
path = config.get_wallet_path()