@metamask-previews/perps-controller 12.2.0-preview-364dd6413 → 12.2.0-preview-700481f6d

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
@@ -15,11 +15,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
15
15
 
16
16
  ### Changed
17
17
 
18
+ - Bound HyperLiquid combined-price debug payloads so large spot-market maps do not stall React Native DevTools and other CDP clients ([#9942](https://github.com/MetaMask/core/pull/9942))
18
19
  - Default `DEFAULT_PRO_LAYOUT_PREFERENCES.chartExpanded` to `true` so the chart is visible when a user first enters Pro mode; a persisted `chartExpanded` value still wins, so users who hid the chart keep it hidden ([#9920](https://github.com/MetaMask/core/pull/9920))
19
20
  - Restore pending trade configurations for 30 seconds instead of five minutes, include the `reduceOnly` setting, and clear the draft after a successful order while retaining leverage and the selected order type ([#9922](https://github.com/MetaMask/core/pull/9922))
20
21
 
21
22
  ### Fixed
22
23
 
24
+ - Ignore missing optional MYX constructors when a consumer excludes the MYX module from its bundle ([#9942](https://github.com/MetaMask/core/pull/9942))
23
25
  - Consume rejected HyperLiquid candle unsubscriptions so cleanup cannot emit an unhandled promise rejection ([#9939](https://github.com/MetaMask/core/pull/9939))
24
26
 
25
27
  ## [12.2.0]
@@ -1012,10 +1012,14 @@ class PerpsController extends base_controller_1.BaseController {
1012
1012
  * @param MYXProvider - Constructor class for the MYX provider.
1013
1013
  */
1014
1014
  registerMYXProvider(MYXProvider) {
1015
+ if (typeof MYXProvider !== 'function') {
1016
+ return;
1017
+ }
1015
1018
  const myxIsTestnet = perpsConfig_js_1.PROVIDER_CONFIG.MYX_TESTNET_ONLY || this.state.isTestnet;
1016
1019
  const myx = __classPrivateFieldGet(this, _PerpsController_options, "f").clientConfig?.providerCredentials?.myx ?? {};
1017
1020
  const myxAuthConfig = resolveMyxAuthConfig(myx, myxIsTestnet);
1018
- const myxProvider = new MYXProvider({
1021
+ const MYXProviderConstructor = MYXProvider;
1022
+ const myxProvider = new MYXProviderConstructor({
1019
1023
  isTestnet: myxIsTestnet,
1020
1024
  platformDependencies: __classPrivateFieldGet(this, _PerpsController_options, "f").infrastructure,
1021
1025
  messenger: this.messenger,