@metamask-previews/perps-controller 12.2.0-preview-4165cebcf → 12.2.0-preview-264a60683

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/CHANGELOG.md CHANGED
@@ -33,6 +33,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
33
33
 
34
34
  ### Fixed
35
35
 
36
+ - Keep selectively allowlisted HIP-3 markets aligned with their volume, open-interest, funding, and previous-price contexts ([#9971](https://github.com/MetaMask/core/pull/9971))
37
+ - Display tiny nonzero funding rates as `<0.0001%` or `-<0.0001%` instead of `0.0000%` ([#9971](https://github.com/MetaMask/core/pull/9971))
36
38
  - Ignore missing optional MYX constructors when a consumer excludes the MYX module from its bundle ([#9942](https://github.com/MetaMask/core/pull/9942))
37
39
  - Consume rejected HyperLiquid candle unsubscriptions so cleanup cannot emit an unhandled promise rejection ([#9939](https://github.com/MetaMask/core/pull/9939))
38
40
 
@@ -8502,11 +8502,15 @@ async function _HyperLiquidProvider_excludeNonUsdcCollateralResults(results) {
8502
8502
  results.forEach((result) => {
8503
8503
  if (result.success && result.meta?.universe) {
8504
8504
  const marketsFromDex = result.meta.universe;
8505
- const filteredMarkets = result.dex === null
8506
- ? marketsFromDex
8507
- : marketsFromDex.filter((asset) => (0, marketUtils_js_1.shouldIncludeMarket)(asset.name, result.dex, __classPrivateFieldGet(this, _HyperLiquidProvider_hip3Enabled, "f"), __classPrivateFieldGet(this, _HyperLiquidProvider_compiledAllowlistPatterns, "f"), __classPrivateFieldGet(this, _HyperLiquidProvider_compiledBlocklistPatterns, "f")));
8508
- combinedUniverse.push(...filteredMarkets);
8509
- combinedAssetCtxs.push(...result.assetCtxs);
8505
+ const filteredMarketsWithContexts = marketsFromDex
8506
+ .map((market, index) => ({
8507
+ market,
8508
+ assetCtx: result.assetCtxs[index],
8509
+ }))
8510
+ .filter(({ market }) => result.dex === null ||
8511
+ (0, marketUtils_js_1.shouldIncludeMarket)(market.name, result.dex, __classPrivateFieldGet(this, _HyperLiquidProvider_hip3Enabled, "f"), __classPrivateFieldGet(this, _HyperLiquidProvider_compiledAllowlistPatterns, "f"), __classPrivateFieldGet(this, _HyperLiquidProvider_compiledBlocklistPatterns, "f")));
8512
+ combinedUniverse.push(...filteredMarketsWithContexts.map(({ market }) => market));
8513
+ combinedAssetCtxs.push(...filteredMarketsWithContexts.map(({ assetCtx }) => assetCtx));
8510
8514
  Object.assign(combinedAllMids, result.allMids);
8511
8515
  }
8512
8516
  });