@glacislabs/stablegenie-zerodelta 4.11.0 → 4.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-5WTRI2KO.js → chunk-A7ADZJXA.js} +4 -2
- package/dist/{chunk-TNAW2SWI.js → chunk-MA2VYFG3.js} +537 -121
- package/dist/core/index.cjs +4 -2
- package/dist/core/index.js +1 -1
- package/dist/index.cjs +539 -121
- package/dist/index.js +2 -2
- package/dist/mount.cjs +539 -121
- package/dist/mount.js +2 -2
- package/dist/standalone.global.js +73 -40
- package/package.json +1 -1
|
@@ -1724,7 +1724,7 @@ var CHANNEL_HEADER = "x-zd-channel";
|
|
|
1724
1724
|
var CHANNEL_VERSION_HEADER = "x-zd-channel-version";
|
|
1725
1725
|
var CHANNEL_ORIGIN_HEADER = "x-zd-channel-origin";
|
|
1726
1726
|
var WIDGET_CHANNEL = "widget";
|
|
1727
|
-
var WIDGET_VERSION = "4.
|
|
1727
|
+
var WIDGET_VERSION = "4.12.0" ;
|
|
1728
1728
|
var MAX_CHANNEL_VERSION_LEN = 32;
|
|
1729
1729
|
function sanitizeVersion(raw) {
|
|
1730
1730
|
const v = String(raw).trim();
|
|
@@ -1995,6 +1995,7 @@ function createApiClient(cfg) {
|
|
|
1995
1995
|
const missing = wanted.filter((s) => !nowFresh(priceCache.get(s) ?? null));
|
|
1996
1996
|
if (missing.length) {
|
|
1997
1997
|
let prices = {};
|
|
1998
|
+
let answered = true;
|
|
1998
1999
|
try {
|
|
1999
2000
|
const snapshot = await apiRequest(`/prices?symbols=${encodeURIComponent(missing.join(","))}`, {
|
|
2000
2001
|
timeoutMs: 8e3
|
|
@@ -2002,9 +2003,10 @@ function createApiClient(cfg) {
|
|
|
2002
2003
|
prices = snapshot && typeof snapshot === "object" && !snapshot.stale && snapshot.prices && typeof snapshot.prices === "object" ? snapshot.prices : {};
|
|
2003
2004
|
} catch {
|
|
2004
2005
|
prices = {};
|
|
2006
|
+
answered = false;
|
|
2005
2007
|
}
|
|
2006
2008
|
const at = Date.now();
|
|
2007
|
-
for (const s of missing) {
|
|
2009
|
+
for (const s of answered ? missing : []) {
|
|
2008
2010
|
const n = Number(prices[s]);
|
|
2009
2011
|
priceCache.set(s, { at, value: Number.isFinite(n) && n > 0 ? n : null });
|
|
2010
2012
|
}
|