@defisaver/positions-sdk 2.1.151-midnight-1-dev → 2.1.151-midnight-3-dev

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.
@@ -1120,16 +1120,12 @@ const MORPHO_MIDNIGHT_TENOR_WSTETH_WETH_965_20261225_ETH = () => createTenorWstE
1120
1120
  '0x646f7959780a1555f7696aad335a197fe45710f73f0bcf70f26712923249af4b');
1121
1121
  exports.MORPHO_MIDNIGHT_TENOR_WSTETH_WETH_965_20261225_ETH = MORPHO_MIDNIGHT_TENOR_WSTETH_WETH_965_20261225_ETH;
1122
1122
  /**
1123
- * Collaterals `@defisaver/tokens` does not carry yet. Their markets are defined and verified above, but
1124
- * withheld from the map below, because an unknown asset resolves to the `?` proto and renders an unnamed
1125
- * collateral at a NaN price.
1126
- *
1127
- * Emptying this array releases every one of them — including maturities added later, since the filter is
1128
- * on the collateral rather than a list of market versions. It is the only place they are held back.
1123
+ * Collaterals we deliberately do not list. Their markets are defined and verified above — they are real
1124
+ * markets — but withheld from the map below, so nothing in the app offers, prices or routes to them.
1129
1125
  */
1130
- const COLLATERALS_PENDING_TOKEN_SUPPORT = [STRUSD_ETH, WSRUSD_ETH, REUSD_ETH, SIUSD_ETH];
1131
- const isPendingTokenSupport = (market) => market.collaterals.some((collateral) => !collateral.hidden
1132
- && COLLATERALS_PENDING_TOKEN_SUPPORT.some((token) => token.toLowerCase() === collateral.token.toLowerCase()));
1126
+ const EXCLUDED_COLLATERALS = [STRUSD_ETH, WSRUSD_ETH, REUSD_ETH, SIUSD_ETH, USD3_ETH];
1127
+ const isExcludedMarket = (market) => market.collaterals.some((collateral) => !collateral.hidden
1128
+ && EXCLUDED_COLLATERALS.some((token) => token.toLowerCase() === collateral.token.toLowerCase()));
1133
1129
  const allMorphoMidnightMarkets = (networkId) => ({
1134
1130
  // BASE — Morpho-curated
1135
1131
  [types_1.MorphoMidnightVersions.MorphoMidnightCbBTCUSDC_860_20260731_Base]: (0, exports.MORPHO_MIDNIGHT_CBBTC_USDC_860_20260731)(networkId),
@@ -1212,9 +1208,9 @@ const allMorphoMidnightMarkets = (networkId) => ({
1212
1208
  });
1213
1209
  const MorphoMidnightMarkets = (networkId) => {
1214
1210
  const all = allMorphoMidnightMarkets(networkId);
1215
- if (!COLLATERALS_PENDING_TOKEN_SUPPORT.length)
1211
+ if (!EXCLUDED_COLLATERALS.length)
1216
1212
  return all;
1217
- return Object.fromEntries(Object.entries(all).filter(([, market]) => !isPendingTokenSupport(market)));
1213
+ return Object.fromEntries(Object.entries(all).filter(([, market]) => !isExcludedMarket(market)));
1218
1214
  };
1219
1215
  exports.MorphoMidnightMarkets = MorphoMidnightMarkets;
1220
1216
  const TENOR_MARKET_IDS = new Set(Object.values((0, exports.MorphoMidnightMarkets)(types_1.NetworkNumber.Base))
@@ -1041,16 +1041,12 @@ export const MORPHO_MIDNIGHT_TENOR_WSTETH_WETH_965_20261127_ETH = () => createTe
1041
1041
  export const MORPHO_MIDNIGHT_TENOR_WSTETH_WETH_965_20261225_ETH = () => createTenorWstETHWethEthMarket(MorphoMidnightVersions.MorphoMidnightTenorWstETHWETH_20261225_Eth, 'tenor-wsteth-weth-20261225', 1798210800, // 2026-12-25T15:00:00Z
1042
1042
  '0x646f7959780a1555f7696aad335a197fe45710f73f0bcf70f26712923249af4b');
1043
1043
  /**
1044
- * Collaterals `@defisaver/tokens` does not carry yet. Their markets are defined and verified above, but
1045
- * withheld from the map below, because an unknown asset resolves to the `?` proto and renders an unnamed
1046
- * collateral at a NaN price.
1047
- *
1048
- * Emptying this array releases every one of them — including maturities added later, since the filter is
1049
- * on the collateral rather than a list of market versions. It is the only place they are held back.
1044
+ * Collaterals we deliberately do not list. Their markets are defined and verified above — they are real
1045
+ * markets — but withheld from the map below, so nothing in the app offers, prices or routes to them.
1050
1046
  */
1051
- const COLLATERALS_PENDING_TOKEN_SUPPORT = [STRUSD_ETH, WSRUSD_ETH, REUSD_ETH, SIUSD_ETH];
1052
- const isPendingTokenSupport = (market) => market.collaterals.some((collateral) => !collateral.hidden
1053
- && COLLATERALS_PENDING_TOKEN_SUPPORT.some((token) => token.toLowerCase() === collateral.token.toLowerCase()));
1047
+ const EXCLUDED_COLLATERALS = [STRUSD_ETH, WSRUSD_ETH, REUSD_ETH, SIUSD_ETH, USD3_ETH];
1048
+ const isExcludedMarket = (market) => market.collaterals.some((collateral) => !collateral.hidden
1049
+ && EXCLUDED_COLLATERALS.some((token) => token.toLowerCase() === collateral.token.toLowerCase()));
1054
1050
  const allMorphoMidnightMarkets = (networkId) => ({
1055
1051
  // BASE — Morpho-curated
1056
1052
  [MorphoMidnightVersions.MorphoMidnightCbBTCUSDC_860_20260731_Base]: MORPHO_MIDNIGHT_CBBTC_USDC_860_20260731(networkId),
@@ -1133,9 +1129,9 @@ const allMorphoMidnightMarkets = (networkId) => ({
1133
1129
  });
1134
1130
  export const MorphoMidnightMarkets = (networkId) => {
1135
1131
  const all = allMorphoMidnightMarkets(networkId);
1136
- if (!COLLATERALS_PENDING_TOKEN_SUPPORT.length)
1132
+ if (!EXCLUDED_COLLATERALS.length)
1137
1133
  return all;
1138
- return Object.fromEntries(Object.entries(all).filter(([, market]) => !isPendingTokenSupport(market)));
1134
+ return Object.fromEntries(Object.entries(all).filter(([, market]) => !isExcludedMarket(market)));
1139
1135
  };
1140
1136
  const TENOR_MARKET_IDS = new Set(Object.values(MorphoMidnightMarkets(NetworkNumber.Base))
1141
1137
  .filter((market) => market.curator === 'Tenor')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defisaver/positions-sdk",
3
- "version": "2.1.151-midnight-1-dev",
3
+ "version": "2.1.151-midnight-3-dev",
4
4
  "description": "",
5
5
  "main": "./cjs/index.js",
6
6
  "module": "./esm/index.js",
@@ -1376,18 +1376,14 @@ export const MORPHO_MIDNIGHT_TENOR_WSTETH_WETH_965_20261225_ETH = () => createTe
1376
1376
  );
1377
1377
 
1378
1378
  /**
1379
- * Collaterals `@defisaver/tokens` does not carry yet. Their markets are defined and verified above, but
1380
- * withheld from the map below, because an unknown asset resolves to the `?` proto and renders an unnamed
1381
- * collateral at a NaN price.
1382
- *
1383
- * Emptying this array releases every one of them — including maturities added later, since the filter is
1384
- * on the collateral rather than a list of market versions. It is the only place they are held back.
1379
+ * Collaterals we deliberately do not list. Their markets are defined and verified above — they are real
1380
+ * markets — but withheld from the map below, so nothing in the app offers, prices or routes to them.
1385
1381
  */
1386
- const COLLATERALS_PENDING_TOKEN_SUPPORT: string[] = [STRUSD_ETH, WSRUSD_ETH, REUSD_ETH, SIUSD_ETH];
1382
+ const EXCLUDED_COLLATERALS: string[] = [STRUSD_ETH, WSRUSD_ETH, REUSD_ETH, SIUSD_ETH, USD3_ETH];
1387
1383
 
1388
- const isPendingTokenSupport = (market: MorphoMidnightMarketData): boolean => market.collaterals.some(
1384
+ const isExcludedMarket = (market: MorphoMidnightMarketData): boolean => market.collaterals.some(
1389
1385
  (collateral) => !collateral.hidden
1390
- && COLLATERALS_PENDING_TOKEN_SUPPORT.some((token) => token.toLowerCase() === collateral.token.toLowerCase()),
1386
+ && EXCLUDED_COLLATERALS.some((token) => token.toLowerCase() === collateral.token.toLowerCase()),
1391
1387
  );
1392
1388
 
1393
1389
  const allMorphoMidnightMarkets = (networkId: NetworkNumber) => ({
@@ -1473,9 +1469,9 @@ const allMorphoMidnightMarkets = (networkId: NetworkNumber) => ({
1473
1469
 
1474
1470
  export const MorphoMidnightMarkets = (networkId: NetworkNumber) => {
1475
1471
  const all = allMorphoMidnightMarkets(networkId);
1476
- if (!COLLATERALS_PENDING_TOKEN_SUPPORT.length) return all;
1472
+ if (!EXCLUDED_COLLATERALS.length) return all;
1477
1473
  return Object.fromEntries(
1478
- Object.entries(all).filter(([, market]) => !isPendingTokenSupport(market)),
1474
+ Object.entries(all).filter(([, market]) => !isExcludedMarket(market)),
1479
1475
  ) as typeof all;
1480
1476
  };
1481
1477