Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions packages/ramps-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Update payment method delay type to match API response structure ([#7845](https://github.com/MetaMask/core/pull/7845))
- Add automatic quote polling with `startQuotePolling()`, `stopQuotePolling()`, and `setSelectedQuote()` methods, with auto-selection when a single quote is returned ([#7824](https://github.com/MetaMask/core/pull/7824))

## [6.0.0]
Expand Down Expand Up @@ -50,34 +51,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- Add sync trigger methods to RampsController ([#7662](https://github.com/MetaMask/core/pull/7662))

- Export `RampAction` type for `'buy' | 'sell'` ramp actions ([#7663](https://github.com/MetaMask/core/pull/7663))
- Add payment methods support with `getPaymentMethods()` method, `paymentMethods` and `selectedPaymentMethod` state ([#7665](https://github.com/MetaMask/core/pull/7665))

### Changed

- Evict expired cache entries based on TTL in addition to size-based eviction ([#7674](https://github.com/MetaMask/core/pull/7674))

- Update `getTokens()` to use v2 API endpoint and support optional provider parameter ([#7664](https://github.com/MetaMask/core/pull/7664))

## [4.0.0]

### Added

- Add `preferredProvider` state and `setPreferredProvider()` method to RampsController ([#7617](https://github.com/MetaMask/core/pull/7617))

- Export `UserRegion` type ([#7646](https://github.com/MetaMask/core/pull/7646))

- Add `defaultAmount` and `quickAmounts` fields to the `Country` type ([#7645](https://github.com/MetaMask/core/pull/7645))

- Add `providers` state and `getProviders()` method to RampsController. Providers are automatically fetched on init and when the region changes ([#7652](https://github.com/MetaMask/core/pull/7652))

### Changed

- **BREAKING:** Change `userRegion` from `string | null` to `UserRegion | null`. Access region code via `userRegion.regionCode`. ([#7646](https://github.com/MetaMask/core/pull/7646))

- Update `getCountries()` endpoint to use v2 API (`v2/regions/countries`) ([#7645](https://github.com/MetaMask/core/pull/7645))

- Add `getApiPath()` helper function for versioned API paths with v2 default ([#7645](https://github.com/MetaMask/core/pull/7645))

### Removed
Expand All @@ -93,19 +87,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- **BREAKING:** Rename `geolocation` to `userRegion` and `updateGeolocation()` to `updateUserRegion()` in RampsController ([#7563](https://github.com/MetaMask/core/pull/7563))

- Bump `@metamask/controller-utils` from `^11.17.0` to `^11.18.0` ([#7583](https://github.com/MetaMask/core/pull/7583))

## [2.1.0]

### Added

- Add eligibility state ([#7539](https://github.com/MetaMask/core/pull/7539))

- Add `createRequestSelector` utility function for creating memoized selectors for RampsController request states ([#7554](https://github.com/MetaMask/core/pull/7554))

- Add request caching infrastructure with TTL, deduplication, and abort support ([#7536](https://github.com/MetaMask/core/pull/7536))

- Add `init()` and `setUserRegion()` methods to RampsController ([#7563](https://github.com/MetaMask/core/pull/7563))

### Changed
Expand Down
4 changes: 2 additions & 2 deletions packages/ramps-controller/src/RampsService.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1495,7 +1495,7 @@ describe('RampsService', () => {
icon: 'card',
disclaimer:
"Credit card purchases may incur your bank's cash advance fees.",
delay: '5 to 10 minutes.',
delay: [5, 10],
pendingOrderDescription:
'Card purchases may take a few minutes to complete.',
},
Expand All @@ -1505,7 +1505,7 @@ describe('RampsService', () => {
name: 'Venmo',
score: 95,
icon: 'bank',
delay: 'Up to 10 minutes.',
delay: [0, 10],
pendingOrderDescription:
'Instant transfers may take a few minutes to complete.',
},
Expand Down
4 changes: 2 additions & 2 deletions packages/ramps-controller/src/RampsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ export type PaymentMethod = {
*/
disclaimer?: string;
/**
* Human-readable delay description (e.g., "5 to 10 minutes.").
* Delay in minutes (e.g., [5, 10]).
*/
delay?: string;
delay?: number[];
/**
* Localized pending order description (optional).
*/
Expand Down
Loading