-
Notifications
You must be signed in to change notification settings - Fork 4k
[CP staging] Revert "Fix magic code navigates back on payment (SettlementButton)" #96126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,13 +22,7 @@ function useShouldRenderOverlay(condition: boolean, overlayProgress: Animated.Va | |
| toValue: 0, | ||
| duration: OVERLAY_TIMING_DURATION, | ||
| useNativeDriver: false, | ||
| }).start(({finished}) => { | ||
| // When the hide animation is interrupted by a new show animation (the condition flipped back to true | ||
| // before the animation completed), this callback still fires with finished=false. Setting the state | ||
| // to false in that case would permanently hide the overlay that should be visible. | ||
| if (!finished) { | ||
| return; | ||
| } | ||
| }).start(() => { | ||
| setShouldRenderOverlay(false); | ||
|
Comment on lines
+25
to
26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When the overlay condition flips false and then back true before the 300ms hide animation completes, starting the show animation interrupts the hide animation but this callback still runs with Useful? React with 👍 / 👎. |
||
| }); | ||
| } | ||
|
|
||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For an unvalidated user who chooses any non-Pay Elsewhere method, this branch only navigates to the verify-account screen and then returns, so the selected payment/KYC action is discarded when the magic-code flow validates and closes. In the inspected SettlementButton flow, callers such as
handlePaymentSelectionand the payment-method submenuonSelectedhandlers all stop on this return, leaving the user back on the report with no payment attempted unless they click Pay again.Useful? React with 👍 / 👎.