@haven-fi/solauto-sdk 1.0.330 → 1.0.331
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.
@@ -64,7 +64,7 @@ async function getSwitchboardPrices(mints) {
|
|
64
64
|
const results = await (0, generalUtils_1.retryWithExponentialBackoff)(async () => {
|
65
65
|
const res = await crossbar.simulateSolanaFeeds("mainnet", mints.map((x) => switchboardConstants_1.SWITCHBOARD_PRICE_FEED_IDS[x.toString()]));
|
66
66
|
const prices = res.flatMap((x) => x.results[0]);
|
67
|
-
if (prices.find((x) => x ===
|
67
|
+
if (prices.find((x) => !x || x === -Infinity)) {
|
68
68
|
throw new Error("Unable to fetch Switchboard prices");
|
69
69
|
}
|
70
70
|
return prices;
|
package/package.json
CHANGED
@@ -115,7 +115,7 @@ export async function getSwitchboardPrices(
|
|
115
115
|
);
|
116
116
|
|
117
117
|
const prices = res.flatMap((x) => x.results[0]);
|
118
|
-
if (prices.find((x) => x ===
|
118
|
+
if (prices.find((x) => !x || x === -Infinity)) {
|
119
119
|
throw new Error("Unable to fetch Switchboard prices");
|
120
120
|
}
|
121
121
|
|