@metamask-previews/ramps-controller 20.0.0-preview-e68ab1498 → 20.0.0-preview-56ae4c857

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
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
13
13
 
14
14
  ### Changed
15
15
 
16
+ - Preserve backend provider ranking metadata in `RampsService.getProviders` and `RampsController.getProviders` responses. ([#9955](https://github.com/MetaMask/core/pull/9955))
16
17
  - Bump `@metamask/remote-feature-flag-controller` from `^5.0.0` to `^6.0.0` ([#9945](https://github.com/MetaMask/core/pull/9945))
17
18
 
18
19
  ## [20.0.0]
@@ -885,7 +885,7 @@ class RampsController extends base_controller_1.BaseController {
885
885
  options?.crypto,
886
886
  options?.payments,
887
887
  ]);
888
- const { providers } = await this.executeRequest(cacheKey, async () => {
888
+ const response = await this.executeRequest(cacheKey, async () => {
889
889
  return this.messenger.call('RampsService:getProviders', normalizedRegion, {
890
890
  provider: options?.provider,
891
891
  crypto: options?.crypto,
@@ -896,13 +896,14 @@ class RampsController extends base_controller_1.BaseController {
896
896
  resourceType: 'providers',
897
897
  isResultCurrent: () => __classPrivateFieldGet(this, _RampsController_instances, "m", _RampsController_isRegionCurrent).call(this, normalizedRegion),
898
898
  });
899
+ const { providers } = response;
899
900
  this.update((state) => {
900
901
  const userRegionCode = state.userRegion?.regionCode;
901
902
  if (userRegionCode === undefined || userRegionCode === normalizedRegion) {
902
903
  state.providers.data = providers;
903
904
  }
904
905
  });
905
- return { providers };
906
+ return response;
906
907
  }
907
908
  /**
908
909
  * Fetches the list of payment methods for a given context.