Commit b5c382c7 by ken

balance

parent b41c531b
...@@ -26,7 +26,7 @@ const _handleSocketOpen = function(opened_callback) { ...@@ -26,7 +26,7 @@ const _handleSocketOpen = function(opened_callback) {
const req = {event: 'addChannel', channel: symbol + '_depth'}; const req = {event: 'addChannel', channel: symbol + '_depth'};
this.send(JSON.stringify(req)); this.send(JSON.stringify(req));
} }
let accountReq = `{'accesskey':'${APIKEY}','channel':'${accountInfoChannel}','event':'addChannel'}`; let accountReq = `{"accesskey":"${APIKEY}","channel":"${accountInfoChannel}","event":"addChannel"}`;
const sign = crypto.createHmac('sha1', APISECRET).update(accountReq).digest().toString('base64'); const sign = crypto.createHmac('sha1', APISECRET).update(accountReq).digest().toString('base64');
accountReq = accountReq.replace('}', `,'sign':'${sign}'}`); accountReq = accountReq.replace('}', `,'sign':'${sign}'}`);
console.log(accountReq); console.log(accountReq);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment