Skip to content

Commit 4a4c5f1

Browse files
authored
Merge pull request #3011 from Adyen/chore/stop_stories_setting_onChange_callback
Stop stories setting the onChange callback
2 parents 8f64f50 + fe6bcc0 commit 4a4c5f1

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

packages/lib/storybook/helpers/create-advanced-checkout.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { AdyenCheckout } from '../../src/core/AdyenCheckout';
22
import { cancelOrder, checkBalance, createOrder, getPaymentMethods, makeDetailsCall, makePayment } from './checkout-api-calls';
3-
import { handleChange, handleError, handleFinalState } from './checkout-handlers';
3+
import { handleError, handleFinalState } from './checkout-handlers';
44
import getCurrency from '../utils/get-currency';
55
import { AdyenCheckoutProps } from '../stories/types';
66
import Checkout from '../../src/core/core';
@@ -100,10 +100,6 @@ async function createAdvancedFlowCheckout({
100100
handleFinalState(result, element);
101101
},
102102

103-
onChange: (state, component) => {
104-
handleChange(state, component);
105-
},
106-
107103
onBalanceCheck: async (resolve, reject, data) => {
108104
const payload = {
109105
amount: paymentAmount,

packages/lib/storybook/helpers/create-sessions-checkout.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { createSession } from './checkout-api-calls';
22
import { RETURN_URL, SHOPPER_REFERENCE } from '../config/commonConfig';
3-
import { handleChange, handleError, handleFinalState } from './checkout-handlers';
3+
import { handleError, handleFinalState } from './checkout-handlers';
44
import getCurrency from '../utils/get-currency';
55
import { AdyenCheckoutProps } from '../stories/types';
66
import Checkout from '../../src/core/core';
@@ -53,10 +53,6 @@ async function createSessionsCheckout({
5353
handleError(error, component);
5454
},
5555

56-
onChange: (state, component) => {
57-
handleChange(state, component);
58-
},
59-
6056
...restCheckoutProps
6157
});
6258
}

0 commit comments

Comments
 (0)