Skip to content

Commit

Permalink
feat(authorizenet): remove cart payment update reducer cases (#2635)
Browse files Browse the repository at this point in the history
  • Loading branch information
griest024 committed Dec 1, 2023
1 parent 57c8f83 commit 5a75c56
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import { DaffAuthorizeNetTokenRequest } from '@daffodil/authorizenet';
import {
DaffCartPaymentActions,
DaffCartPaymentActionTypes,
} from '@daffodil/cart/state';
import {
DaffPaymentActions,
DaffPaymentActionTypes,
Expand All @@ -17,7 +13,7 @@ import {

export function daffAuthorizeNetReducer <T extends DaffAuthorizeNetTokenRequest>(
state: DaffAuthorizeNetReducerState = daffAuthorizeNetReducerInitialState,
action: DaffAuthorizeNetActions<T> | DaffCartPaymentActions | DaffPaymentActions,
action: DaffAuthorizeNetActions<T> | DaffPaymentActions,
): DaffAuthorizeNetReducerState {
switch (action.type) {
case DaffAuthorizeNetActionTypes.UpdatePaymentAction:
Expand All @@ -27,15 +23,13 @@ export function daffAuthorizeNetReducer <T extends DaffAuthorizeNetTokenRequest>
loading: true,
};
case DaffAuthorizeNetActionTypes.UpdatePaymentSuccessAction:
case DaffCartPaymentActionTypes.CartPaymentUpdateSuccessAction:
case DaffPaymentActionTypes.GenerateTokenSuccessAction:
return {
...state,
loading: false,
paymentError: null,
};
case DaffAuthorizeNetActionTypes.UpdatePaymentFailureAction:
case DaffCartPaymentActionTypes.CartPaymentUpdateFailureAction:
case DaffPaymentActionTypes.GenerateTokenFailureAction:
return {
...state,
Expand Down

0 comments on commit 5a75c56

Please sign in to comment.