@1delta/margin-fetcher 0.0.233 → 0.0.234
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/index.js
CHANGED
|
@@ -30651,6 +30651,7 @@ var priceLensAbi = [
|
|
|
30651
30651
|
|
|
30652
30652
|
// src/prices/oracle-prices/fetchers/euler.ts
|
|
30653
30653
|
var MAX_VIRTUAL_ADDRESS = 65535;
|
|
30654
|
+
var MAX_SANE_PRICE_USD = 1e7;
|
|
30654
30655
|
function isUsdUnitOfAccount(addr) {
|
|
30655
30656
|
const numeric = parseInt(addr, 16);
|
|
30656
30657
|
return numeric <= MAX_VIRTUAL_ADDRESS;
|
|
@@ -30757,6 +30758,7 @@ function parseEulerV2Results(data, meta, context) {
|
|
|
30757
30758
|
priceUSD = priceInUoA * uoaUSD;
|
|
30758
30759
|
}
|
|
30759
30760
|
if (isNaN(priceUSD) || priceUSD === 0) return;
|
|
30761
|
+
if (priceUSD > MAX_SANE_PRICE_USD) return;
|
|
30760
30762
|
entries.push({
|
|
30761
30763
|
asset,
|
|
30762
30764
|
price: priceInUoA,
|