Use the same errorHandler

Otherwise old messages may get stuck
This commit is contained in:
Alex P 2022-10-27 09:09:45 +03:00
parent 3926ae2d96
commit 9020c9b797
6 changed files with 22 additions and 13 deletions

View file

@ -8,11 +8,12 @@ import {
} from "../Helper/CheckoutMethodState";
class CheckoutBootstap {
constructor(gateway, renderer, messages, spinner) {
constructor(gateway, renderer, messages, spinner, errorHandler) {
this.gateway = gateway;
this.renderer = renderer;
this.messages = messages;
this.spinner = spinner;
this.errorHandler = errorHandler;
this.standardOrderButtonSelector = ORDER_BUTTON_SELECTOR;
}
@ -60,7 +61,7 @@ class CheckoutBootstap {
}
const actionHandler = new CheckoutActionHandler(
PayPalCommerceGateway,
new ErrorHandler(this.gateway.labels.error.generic),
this.errorHandler,
this.spinner
);