@metamask-previews/ramps-controller 18.0.1-preview-0efc7ef01 → 18.0.1-preview-7b60eca
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 +0 -4
- package/dist/RampsController.cjs +2 -5
- package/dist/RampsController.cjs.map +1 -1
- package/dist/RampsController.d.cts +2 -2
- package/dist/RampsController.d.cts.map +1 -1
- package/dist/RampsController.d.mts +2 -2
- package/dist/RampsController.d.mts.map +1 -1
- package/dist/RampsController.mjs +2 -5
- package/dist/RampsController.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,10 +7,6 @@ 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
|
-
- **BREAKING:** Require a non-empty `chainId` on `addPrecreatedOrder`. Callers must seed the selected token's chain so precreated stubs (and pending flips before API enrichment) always carry a network. Empty or whitespace `chainId` is a no-op, matching empty `orderId` handling.
|
|
13
|
-
|
|
14
10
|
### Added
|
|
15
11
|
|
|
16
12
|
- Add `setSelectedProviderForAsset(assetId, options?)` method and `RampsController:setSelectedProviderForAsset` messenger action ([#9759](https://github.com/MetaMask/core/pull/9759))
|
package/dist/RampsController.cjs
CHANGED
|
@@ -1294,7 +1294,7 @@ class RampsController extends base_controller_1.BaseController {
|
|
|
1294
1294
|
* @param params.orderId - Full order ID (e.g. "/providers/paypal/orders/abc123") or order code.
|
|
1295
1295
|
* @param params.providerCode - Canonical provider code (e.g. "paypal", "transak").
|
|
1296
1296
|
* @param params.walletAddress - Wallet address for the order.
|
|
1297
|
-
* @param params.chainId -
|
|
1297
|
+
* @param params.chainId - Optional chain ID for the order.
|
|
1298
1298
|
*/
|
|
1299
1299
|
addPrecreatedOrder(params) {
|
|
1300
1300
|
const { orderId, providerCode, walletAddress, chainId } = params;
|
|
@@ -1302,9 +1302,6 @@ class RampsController extends base_controller_1.BaseController {
|
|
|
1302
1302
|
if (!orderCode?.trim()) {
|
|
1303
1303
|
return;
|
|
1304
1304
|
}
|
|
1305
|
-
if (!chainId.trim()) {
|
|
1306
|
-
return;
|
|
1307
|
-
}
|
|
1308
1305
|
const stubOrder = {
|
|
1309
1306
|
providerOrderId: orderCode,
|
|
1310
1307
|
provider: {
|
|
@@ -1327,7 +1324,7 @@ class RampsController extends base_controller_1.BaseController {
|
|
|
1327
1324
|
providerOrderLink: '',
|
|
1328
1325
|
totalFeesFiat: 0,
|
|
1329
1326
|
txHash: '',
|
|
1330
|
-
network: { chainId, name: '' },
|
|
1327
|
+
network: chainId ? { chainId, name: '' } : { chainId: '', name: '' },
|
|
1331
1328
|
canBeUpdated: true,
|
|
1332
1329
|
idHasExpired: false,
|
|
1333
1330
|
excludeFromPurchases: false,
|