Comparing version 0.7.0 to 0.7.1
@@ -7,8 +7,8 @@ "use strict"; | ||
exports.default = { | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"git": { | ||
"short": "8404ff0", | ||
"long": "8404ff0c49544ff3381cede3c4e209c13904aa71", | ||
"short": "a9faa34", | ||
"long": "a9faa34df17560414c1f6b31bfd56577b42dfd0c", | ||
"branch": "master" | ||
} | ||
}; |
@@ -127,3 +127,3 @@ 'use strict'; | ||
if (entity.hasOwnProperty(field)) { | ||
if (_typeof(entity[field]) === 'object') { | ||
if (entity[field] && _typeof(entity[field]) === 'object') { | ||
if (entity[field].url) { | ||
@@ -137,2 +137,14 @@ entity[field] = entityCache[entity[field].url] || entity[field]; | ||
// Domain specific, fixup level 1 in all cached listings with orderbooks | ||
Object.values(entityCache).forEach(function (e) { | ||
if (e.orderbook && e.orderbook.levels && e.orderbook.levels.length > 0) { | ||
if (e.quotes && e.quotes.bidPrice) { | ||
e.orderbook.levels[0].bidPrice = e.quotes.bidPrice; | ||
} | ||
if (e.quotes && e.quotes.askPrice) { | ||
e.orderbook.levels[0].askPrice = e.quotes.askPrice; | ||
} | ||
} | ||
}); | ||
// entityToResource mapping | ||
@@ -162,14 +174,2 @@ Object.values(entities).forEach(function (entity) { | ||
// Domain specific, fixup level 1 in all cached listings with orderbooks | ||
Object.values(entityCache).forEach(function (e) { | ||
if (e.orderbook && e.orderbook.levels && e.orderbook.levels.length > 0) { | ||
if (e.quotes && e.quotes.bidPrice) { | ||
e.orderbook.levels[0].bidPrice = e.quotes.bidPrice; | ||
} | ||
if (e.quotes && e.quotes.askPrice) { | ||
e.orderbook.levels[0].askPrice = e.quotes.askPrice; | ||
} | ||
} | ||
}); | ||
// fetch all resources to notify subscribers for | ||
@@ -176,0 +176,0 @@ var resourcesToNotify = Object.create(null); // in lieu of Set |
{ | ||
"name": "six-sdk", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"description": "SIX Javascript SDK", | ||
@@ -5,0 +5,0 @@ "main": "lib", |
# About | ||
Javascript SDK for api.six.se | ||
<!-- TODO: add Contact info --> | ||
@@ -9,3 +8,3 @@ ## Usage | ||
// for testing you can get token with: | ||
// Six._internal.authenticateWithCredentials(client_id,client_secreat) | ||
// Six._internal.authenticateWithCredentials(client_id,client_secret) | ||
var TOKEN = 'token-authenticated-in-backend' | ||
@@ -12,0 +11,0 @@ |
Sorry, the diff of this file is not supported yet
191325
222