Browse Source

daemon/rpc: include "jsonrpc" key in rpc responses

fixes #6612
patch-4
SomberNight 4 years ago
parent
commit
a81b0ecc59
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 5
      electrum/daemon.py

5
electrum/daemon.py

@ -196,7 +196,10 @@ class AuthenticatedServer(Logger):
except Exception as e: except Exception as e:
self.logger.exception("invalid request") self.logger.exception("invalid request")
return web.Response(text='Invalid Request', status=500) return web.Response(text='Invalid Request', status=500)
response = {'id': _id} response = {
'id': _id,
'jsonrpc': '2.0',
}
try: try:
if isinstance(params, dict): if isinstance(params, dict):
response['result'] = await f(**params) response['result'] = await f(**params)

Loading…
Cancel
Save