-
Notifications
You must be signed in to change notification settings - Fork 106
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
fix: [#173031364] The request to abort a payment is never sent #2933
Conversation
Affected stories
|
Codecov Report
@@ Coverage Diff @@
## master #2933 +/- ##
=======================================
Coverage 58.77% 58.78%
=======================================
Files 905 905
Lines 24880 24882 +2
Branches 4584 4585 +1
=======================================
+ Hits 14623 14626 +3
+ Misses 10160 10159 -1
Partials 97 97
Continue to review full report at Codecov.
|
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.
The same sequence of dispatched actions of ConfirmPaymentMethodScreen
is in TransactionSummaryScreen
:
io-app/ts/screens/wallet/payment/TransactionSummaryScreen.tsx
Lines 405 to 413 in 9ebc253
const onCancel = () => { | |
// on cancel: | |
// navigate to entrypoint of payment or wallet home | |
dispatch(backToEntrypointPayment()); | |
// delete the active payment from pagoPA | |
dispatch(runDeleteActivePaymentSaga()); | |
// reset the payment state | |
dispatch(paymentInitializeState()); | |
}; |
io-app/ts/screens/wallet/payment/TransactionSummaryScreen.tsx
Lines 148 to 149 in 9ebc253
this.props.backToEntrypointPayment(); | |
this.props.resetPayment(); |
Can be in the scope of this PR?
There is another behaviour that I'm not sure is correct: Screen.Recording.2021-03-26.at.18.04.19.movThe action I can't find where is the unexpected dispatch but I also found a saga that maybe will be obsolete after your PR: Line 899 in 9ebc253
What do you think? |
sure! Nice catch! |
…-payment' into 173031364-fix-abort-payment
🔎
changed in b387aab |
Short description
This PR fixes a bug that avoids to send the delete request to abort a payment.
Here why this bug happens:
backToEntrypointPayment
runDeleteActivePaymentSaga
paymentInitializeState
backToEntrypointPayment
remove from store the id of the running paymentrunDeleteActivePaymentSaga
can't find any valid payment id to deletehow the fix works
Now there is a dedicated saga that does all above actions in the right order
runDeleteActivePaymentSaga
backToEntrypointPayment
paymentInitializeState
Registrazione.schermo.2021-03-23.alle.15.11.37.mov