@fileverse-dev/formulajs 4.4.15 → 4.4.16
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/lib/browser/formula.js +40 -28
- package/lib/browser/formula.min.js +2 -2
- package/lib/browser/formula.min.js.map +1 -1
- package/lib/cjs/index.cjs +8 -2
- package/lib/esm/index.mjs +8 -2
- package/package.json +1 -1
package/lib/cjs/index.cjs
CHANGED
|
@@ -17870,7 +17870,7 @@ async function COINGECKO() {
|
|
|
17870
17870
|
const out = {};
|
|
17871
17871
|
for (const [token, prices] of Object.entries(json))
|
|
17872
17872
|
for (const [cur, val] of Object.entries(prices))
|
|
17873
|
-
out[`${token.
|
|
17873
|
+
out[`${token.toUpperCase()}_${cur.toUpperCase()}`] = val;
|
|
17874
17874
|
return [out]
|
|
17875
17875
|
}
|
|
17876
17876
|
|
|
@@ -18667,7 +18667,13 @@ async function DUNE() {
|
|
|
18667
18667
|
});
|
|
18668
18668
|
|
|
18669
18669
|
const res = await fetch(finalUrl, { method: "GET", headers: HEADERS });
|
|
18670
|
-
if (!res.ok)
|
|
18670
|
+
if (!res.ok) {
|
|
18671
|
+
if(res.status === 400){
|
|
18672
|
+
const data = await res.json();
|
|
18673
|
+
throw new ValidationError(data.message)
|
|
18674
|
+
}
|
|
18675
|
+
throw new NetworkError(SERVICES_API_KEY.DuneSim, res.status);
|
|
18676
|
+
}
|
|
18671
18677
|
|
|
18672
18678
|
const json = await res.json();
|
|
18673
18679
|
const data =
|
package/lib/esm/index.mjs
CHANGED
|
@@ -17868,7 +17868,7 @@ async function COINGECKO() {
|
|
|
17868
17868
|
const out = {};
|
|
17869
17869
|
for (const [token, prices] of Object.entries(json))
|
|
17870
17870
|
for (const [cur, val] of Object.entries(prices))
|
|
17871
|
-
out[`${token.
|
|
17871
|
+
out[`${token.toUpperCase()}_${cur.toUpperCase()}`] = val;
|
|
17872
17872
|
return [out]
|
|
17873
17873
|
}
|
|
17874
17874
|
|
|
@@ -18665,7 +18665,13 @@ async function DUNE() {
|
|
|
18665
18665
|
});
|
|
18666
18666
|
|
|
18667
18667
|
const res = await fetch(finalUrl, { method: "GET", headers: HEADERS });
|
|
18668
|
-
if (!res.ok)
|
|
18668
|
+
if (!res.ok) {
|
|
18669
|
+
if(res.status === 400){
|
|
18670
|
+
const data = await res.json();
|
|
18671
|
+
throw new ValidationError(data.message)
|
|
18672
|
+
}
|
|
18673
|
+
throw new NetworkError(SERVICES_API_KEY.DuneSim, res.status);
|
|
18674
|
+
}
|
|
18669
18675
|
|
|
18670
18676
|
const json = await res.json();
|
|
18671
18677
|
const data =
|