Skip to content

Commit

Permalink
Stop stories setting the onChange callback
Browse files Browse the repository at this point in the history
  • Loading branch information
sponglord committed Dec 9, 2024
1 parent ba132fc commit fe6bcc0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions packages/lib/storybook/helpers/create-advanced-checkout.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { AdyenCheckout } from '../../src/core/AdyenCheckout';
import { cancelOrder, checkBalance, createOrder, getPaymentMethods, makeDetailsCall, makePayment } from './checkout-api-calls';
import { handleChange, handleError, handleFinalState } from './checkout-handlers';
import { handleError, handleFinalState } from './checkout-handlers';
import getCurrency from '../utils/get-currency';
import { AdyenCheckoutProps } from '../stories/types';
import Checkout from '../../src/core/core';
Expand Down Expand Up @@ -100,10 +100,6 @@ async function createAdvancedFlowCheckout({
handleFinalState(result, element);
},

onChange: (state, component) => {
handleChange(state, component);
},

onBalanceCheck: async (resolve, reject, data) => {
const payload = {
amount: paymentAmount,
Expand Down
6 changes: 1 addition & 5 deletions packages/lib/storybook/helpers/create-sessions-checkout.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createSession } from './checkout-api-calls';
import { RETURN_URL, SHOPPER_REFERENCE } from '../config/commonConfig';
import { handleChange, handleError, handleFinalState } from './checkout-handlers';
import { handleError, handleFinalState } from './checkout-handlers';
import getCurrency from '../utils/get-currency';
import { AdyenCheckoutProps } from '../stories/types';
import Checkout from '../../src/core/core';
Expand Down Expand Up @@ -53,10 +53,6 @@ async function createSessionsCheckout({
handleError(error, component);
},

onChange: (state, component) => {
handleChange(state, component);
},

...restCheckoutProps
});
}
Expand Down

0 comments on commit fe6bcc0

Please sign in to comment.