Skip to content

Commit 255dcd6

Browse files
authored
fix: missing start crypto useTestClock param in submitShieldSubscriptionCryptoApproval (#7131)
## Explanation <!-- Thanks for your contribution! Take a moment to answer these questions so that reviewers have the information they need to properly understand your changes: * What is the current state of things and why does it need to change? * What is the solution your changes offer and how does it work? * Are there any changes whose purpose might not obvious to those unfamiliar with the domain? * If your primary goal was to update one package but you found you had to update another one along the way, why did you do so? * If you had to upgrade a dependency, why did you do so? --> Subscription controller add missing start crypto `useTestClock` param from `lastSelectedPaymentMethod` in `submitShieldSubscriptionCryptoApproval` ## References <!-- Are there any issues that this pull request is tied to? Are there other links that reviewers should consult to understand these changes better? Are there client or consumer pull requests to adopt any breaking changes? For example: * Fixes #12345 * Related to #67890 --> ## Checklist - [x] I've updated the test suite for new or updated code as appropriate - [x] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [x] I've communicated my changes to consumers by [updating changelogs for packages I've changed](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs), highlighting breaking changes as necessary - [x] I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Propagates `useTestClock` from `lastSelectedPaymentMethod` to `startSubscriptionWithCrypto` during `submitShieldSubscriptionCryptoApproval`, and updates changelog. > > - **Subscription Controller**: > - In `src/SubscriptionController.ts`, `submitShieldSubscriptionCryptoApproval` now includes `useTestClock` from `lastSelectedPaymentMethod` when calling `startSubscriptionWithCrypto`. > - **Documentation**: > - Update `packages/subscription-controller/CHANGELOG.md` with an Added entry describing the new `useTestClock` propagation. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 6d52b62. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 88d6222 commit 255dcd6

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

packages/subscription-controller/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Added
11+
12+
- Add missing start crypto `useTestClock` param from `lastSelectedPaymentMethod` in `submitShieldSubscriptionCryptoApproval` ([#7131](https://github.com/MetaMask/core/pull/7131))
13+
1014
## [4.2.0]
1115

1216
### Added

packages/subscription-controller/src/SubscriptionController.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,7 @@ export class SubscriptionController extends StaticIntervalPollingController()<
528528
tokenSymbol: lastSelectedPaymentMethodShield.paymentTokenSymbol,
529529
rawTransaction: rawTx as Hex,
530530
isSponsored,
531+
useTestClock: lastSelectedPaymentMethodShield.useTestClock,
531532
};
532533
await this.startSubscriptionWithCrypto(params);
533534
// update the subscriptions state after subscription created in server

0 commit comments

Comments
 (0)