diff --git a/packages/checkout/widgets-lib/src/widgets/add-funds/AddFundsWidget.tsx b/packages/checkout/widgets-lib/src/widgets/add-funds/AddFundsWidget.tsx index bd66739d17..77199c5b6a 100644 --- a/packages/checkout/widgets-lib/src/widgets/add-funds/AddFundsWidget.tsx +++ b/packages/checkout/widgets-lib/src/widgets/add-funds/AddFundsWidget.tsx @@ -13,7 +13,7 @@ import { import { AddFundsWidgetViews } from '../../context/view-context/AddFundsViewContextTypes'; import { initialViewState, - SharedViews, + SharedViews, ViewActions, ViewContext, viewReducer, } from '../../context/view-context/ViewContext'; @@ -138,6 +138,15 @@ export default function AddFundsWidget({ eventTargetState: { eventTarget }, } = useContext(EventTargetContext); + const errorAction = () => { + viewDispatch({ + payload: { + type: ViewActions.UPDATE_VIEW, + view: { type: AddFundsWidgetViews.ADD_FUNDS }, + }, + }); + }; + return ( @@ -156,7 +165,7 @@ export default function AddFundsWidget({ {viewState.view.type === SharedViews.ERROR_VIEW && ( undefined} + onActionClick={errorAction} onCloseClick={() => sendAddFundsCloseEvent(eventTarget)} errorEventAction={() => { page({