Skip to content

Commit

Permalink
Do not corrupt Redux state. Fixes #1925.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsegura committed Dec 5, 2024
1 parent 24ae668 commit b13a6e8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/redux/Checkout/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1897,7 +1897,11 @@ export function setPaymentMethod(paymentMethod, cb) {
},
)
.then(res => {
dispatch(updateCartSuccess(res));
// We update the state with the same cart
// We can't use response, because it's not a cart
// TODO Use the payments returned
// https://github.com/coopcycle/coopcycle-app/issues/1925
dispatch(updateCartSuccess(cart));
cb()
})
.catch(e => dispatch(checkoutFailure(e)));
Expand Down

0 comments on commit b13a6e8

Please sign in to comment.