Payment Modal: Close modal after receiving update (#2105)

This commit is contained in:
Alexander Zinchuk 2022-11-03 13:06:09 +01:00
parent 389f86bf8f
commit 5313cc5c99

View File

@ -138,6 +138,13 @@ const PaymentModal: FC<OwnProps & StateProps & GlobalStateProps> = ({
}
}, [isOpen, loadPasswordInfo, openModal]);
// Modal window can be closed by an event from the server side
useEffect(() => {
if (!isOpen && isModalOpen) {
closeModal();
}
}, [closeModal, isModalOpen, isOpen]);
useEffect(() => {
if (step !== undefined || error) {
setIsLoading(false);