diff --git a/src/stores/payment/payment-machine.ts b/src/stores/payment/payment-machine.ts index f7718502..3c6352fb 100644 --- a/src/stores/payment/payment-machine.ts +++ b/src/stores/payment/payment-machine.ts @@ -270,37 +270,6 @@ export const paymentMachine = setup({ paid: { on: { - PaymentPlanSelected: { - target: "ready", - actions: assign(({ event }) => ({ - ...resetOrderState(), - selectedPlanId: event.planId, - autoRenew: defaultAutoRenewForPlan(event.planId), - })), - }, - PaymentPayChannelChanged: { - target: "ready", - actions: assign(({ event }) => ({ - ...resetOrderState(), - payChannel: event.payChannel, - errorMessage: null, - })), - }, - PaymentCreateOrderSubmitted: [ - { - guard: ({ context }) => - context.agreed && context.selectedPlanId.length > 0, - target: "creatingOrder", - actions: assign(resetOrderState), - }, - { - target: "ready", - actions: assign({ - errorMessage: - "Choose a plan and accept the agreement before continuing.", - }), - }, - ], PaymentReset: { target: "ready", actions: assign(resetOrderState),