Skip to content

Commit 731bd32

Browse files
Merge pull request #20345 from mozilla/PAY-3590-fix-and-remove-comments
fix(payments-next): Fix and remove comments
2 parents 0afc6e7 + 17c84d2 commit 731bd32

4 files changed

Lines changed: 1 addition & 20 deletions

File tree

libs/payments/ui/src/lib/client/components/ChurnCancel/index.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,7 @@ export function ChurnCancel({
180180
action: 'redeem_coupon',
181181
outcome: 'redeem_success',
182182
});
183-
// TODO: This is a workaround to match existing legacy behavior.
184-
// Fix as part of redesign
185183
setShowSuccess(true);
186-
await new Promise((resolve) => setTimeout(resolve, 500));
187184
} else {
188185
glean.recordRetentionFlowResult({
189186
...retentionFlowBase,
@@ -234,10 +231,7 @@ export function ChurnCancel({
234231
action: 'cancel_subscription',
235232
outcome: 'customer_canceled',
236233
});
237-
// TODO: This is a workaround to match existing legacy behavior.
238-
// Fix as part of redesign
239234
setShowCancelSuccess(true);
240-
await new Promise((resolve) => setTimeout(resolve, 500)); // optional: match legacy feel
241235
} else {
242236
glean.recordRetentionFlowResult({
243237
...retentionFlowBase,

libs/payments/ui/src/lib/client/components/ChurnStaySubscribed/index.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,7 @@ export function ChurnStaySubscribed({
171171
action: 'redeem_coupon',
172172
outcome: 'redeem_success',
173173
});
174-
// TODO: This is a workaround to match existing legacy behavior.
175-
// Fix as part of redesign
176174
setShowSuccess(true);
177-
await new Promise((resolve) => setTimeout(resolve, 500));
178175
} else {
179176
glean.recordRetentionFlowResult({
180177
...retentionFlowBase,
@@ -223,10 +220,7 @@ export function ChurnStaySubscribed({
223220
action: 'stay_subscribed',
224221
outcome: 'stay_subscribed_success',
225222
});
226-
// TODO: This is a workaround to match existing legacy behavior.
227-
// Fix as part of redesign
228223
setShowSuccess(true);
229-
await new Promise((resolve) => setTimeout(resolve, 500));
230224
} else {
231225
glean.recordRetentionFlowResult({
232226
...retentionFlowBase,

libs/payments/ui/src/lib/client/components/InterstitialOffer/index.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,7 @@ export function InterstitialOffer({
164164
action: 'cancel_subscription',
165165
outcome: 'customer_canceled',
166166
});
167-
// TODO: This is a workaround to match existing legacy behavior.
168-
// Fix as part of redesign
169167
setShowCancelSuccess(true);
170-
await new Promise((resolve) => setTimeout(resolve, 500));
171168
} else {
172169
glean.recordInterstitialOfferResult({
173170
...interstitialOfferBase,

libs/payments/ui/src/lib/client/components/StaySubscribed/index.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,7 @@ export function StaySubscribed({
6868
setResubscribeActionError(false);
6969

7070
const result = await resubscribeSubscriptionAction(userId, subscriptionId);
71-
if (result.ok) {
72-
// TODO: This is a workaround to match existing legacy behavior.
73-
// Fix as part of redesign
74-
await new Promise((resolve) => setTimeout(resolve, 500));
75-
} else {
71+
if (!result.ok) {
7672
setResubscribeActionError(true);
7773
}
7874
setLoading(false);

0 commit comments

Comments
 (0)