Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Commit

Permalink
Fix direct debit update bug in the update_form action
Browse files Browse the repository at this point in the history
  • Loading branch information
vincemtnz committed Oct 30, 2018
1 parent 0fbab5d commit 9724499
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/javascript/state/fundraiser/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@ export default (state: State = initialState, action: Action): State => {
const currentStep = state.currentStep + 1;
return { ...state, currentStep };
case 'update_form': {
const form = action.payload;
const showDirectDebit = isDirectDebitSupported({
country: state.form.country || state.formValues.country,
country: form.country,
recurring: state.recurring,
});
const paymentTypes = supportedPaymentTypes({
Expand All @@ -114,11 +115,10 @@ export default (state: State = initialState, action: Action): State => {
);
return {
...state,
form: action.payload,
showDirectDebit: isDirectDebitSupported({
country: action.payload.country,
recurring: state.recurring,
}),
form,
showDirectDebit,
paymentTypes,
currentPaymentType,
};
}
case 'set_direct_debit_only': {
Expand Down

0 comments on commit 9724499

Please sign in to comment.