fix #2279: jsonrpc wallet
This commit is contained in:
parent
2b0a7bcd73
commit
0e49274eae
|
@ -116,8 +116,7 @@ class Daemon(DaemonThread):
|
||||||
self.gui = None
|
self.gui = None
|
||||||
self.wallets = {}
|
self.wallets = {}
|
||||||
# Setup JSONRPC server
|
# Setup JSONRPC server
|
||||||
default_wallet = None
|
self.cmd_runner = Commands(self.config, None, self.network)
|
||||||
self.cmd_runner = Commands(self.config, default_wallet, self.network)
|
|
||||||
self.init_server(config, fd)
|
self.init_server(config, fd)
|
||||||
|
|
||||||
def init_server(self, config, fd):
|
def init_server(self, config, fd):
|
||||||
|
@ -153,7 +152,8 @@ class Daemon(DaemonThread):
|
||||||
response = "Daemon already running"
|
response = "Daemon already running"
|
||||||
elif sub == 'load_wallet':
|
elif sub == 'load_wallet':
|
||||||
path = config.get_wallet_path()
|
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
|
response = True
|
||||||
elif sub == 'close_wallet':
|
elif sub == 'close_wallet':
|
||||||
path = config.get_wallet_path()
|
path = config.get_wallet_path()
|
||||||
|
|
Loading…
Reference in New Issue