@gmx-io/sdk 1.0.3 → 1.0.5
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.
|
@@ -49,6 +49,11 @@ async function buildMarketsValuesRequest(chainId, { marketsAddresses, marketsDat
|
|
|
49
49
|
const request = {};
|
|
50
50
|
for (const marketAddress of marketsAddresses || []) {
|
|
51
51
|
const market = (0, objects_1.getByKey)(marketsData, marketAddress);
|
|
52
|
+
if (!market) {
|
|
53
|
+
// eslint-disable-next-line no-console
|
|
54
|
+
console.warn(`No market data found for ${marketAddress}, skipping market values request`);
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
52
57
|
const marketPrices = (0, markets_1.getContractMarketPrices)(tokensData, market);
|
|
53
58
|
if (!marketPrices) {
|
|
54
59
|
// eslint-disable-next-line no-console
|
|
@@ -45,6 +45,11 @@ export async function buildMarketsValuesRequest(chainId, { marketsAddresses, mar
|
|
|
45
45
|
const request = {};
|
|
46
46
|
for (const marketAddress of marketsAddresses || []) {
|
|
47
47
|
const market = getByKey(marketsData, marketAddress);
|
|
48
|
+
if (!market) {
|
|
49
|
+
// eslint-disable-next-line no-console
|
|
50
|
+
console.warn(`No market data found for ${marketAddress}, skipping market values request`);
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
48
53
|
const marketPrices = getContractMarketPrices(tokensData, market);
|
|
49
54
|
if (!marketPrices) {
|
|
50
55
|
// eslint-disable-next-line no-console
|