Commit d407e1cf by ken

balance

parent 34b6f65a
......@@ -54,12 +54,12 @@ const _subscribe = function(callback, opened_callback = false) {
function subscribe() {
_subscribe((data) => {
if (data.channel === accountInfoChannel) {
console.log(data);
const coins = data.data.coins;
const balances = {};
for (const coin of coins) {
balances[coin.enName] = {"onOrder": coin.freez, "available": coin.available};
}
console.log(balances);
redisClient.hset("balance", "zb", balances);
} else {
const depth = data;
......
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