@metamask-previews/ramps-controller 12.0.1-preview-ea4ea0a → 12.0.1-preview-fd9bff420

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
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ### Changed
11
+
12
+ - `RampsService.getOrder` and `getOrderFromCallback` accept provider codes with or without a `/providers/` prefix; API paths use the short provider segment. `RampsController` forwards provider ids (including from order polling and `addPrecreatedOrder` stubs) to the service without stripping the prefix. ([#8278](https://github.com/MetaMask/core/pull/8278))
13
+
10
14
  ## [12.0.1]
11
15
 
12
16
  ### Added
@@ -1040,11 +1040,10 @@ class RampsController extends base_controller_1.BaseController {
1040
1040
  if (!orderCode?.trim()) {
1041
1041
  return;
1042
1042
  }
1043
- const normalizedProviderCode = normalizeProviderCode(providerCode);
1044
1043
  const stubOrder = {
1045
1044
  providerOrderId: orderCode,
1046
1045
  provider: {
1047
- id: `/providers/${normalizedProviderCode}`,
1046
+ id: providerCode,
1048
1047
  name: '',
1049
1048
  environmentType: '',
1050
1049
  description: '',
@@ -1625,10 +1624,9 @@ async function _RampsController_refreshOrder(order) {
1625
1624
  if (!providerCode || !order.providerOrderId || !order.walletAddress) {
1626
1625
  return;
1627
1626
  }
1628
- const providerCodeSegment = normalizeProviderCode(providerCode);
1629
1627
  const previousStatus = order.status;
1630
1628
  try {
1631
- const updatedOrder = await this.getOrder(providerCodeSegment, order.providerOrderId, order.walletAddress);
1629
+ const updatedOrder = await this.getOrder(providerCode, order.providerOrderId, order.walletAddress);
1632
1630
  const meta = __classPrivateFieldGet(this, _RampsController_orderPollingMeta, "f").get(order.providerOrderId) ?? {
1633
1631
  lastTimeFetched: 0,
1634
1632
  errorCount: 0,