diff --git a/src/components/process/processStepOne/ProcessStepOne.tsx b/src/components/process/processStepOne/ProcessStepOne.tsx index bfd4797..a3f82e3 100644 --- a/src/components/process/processStepOne/ProcessStepOne.tsx +++ b/src/components/process/processStepOne/ProcessStepOne.tsx @@ -112,32 +112,18 @@ const ProcessStepOne = () => { name: `${recipient.firstName} ${recipient.lastName}` })); - console.log(recipientsData, "printing Recipient Data Line 114"); - - // await api.post(`/api/accounts/${accountId}/transactions/${transactionId}/recipients`, recipientsData).then((res) => { - // console.log(res, "Response Line 117") - // }).catch((err) => { - // console.log(err) - // }) - dispatch(addRecipientAsync({recipientsData, accountId, transactionId})); - dispatch(hideLoader()); - if (isSendNow) { dispatch(updateTransactionStatus(TRANSACTION_STATUS_ENUMS.TRANSACTION_SEND_SUCCESS)); setTimeout(() => { navigate("/"); }, 1000); } else { - // Preview & Tag - // Assuming you'd fetch or pass doc/recipients response here - // dispatch(setImages(...)); - // dispatch(updateRecipientIds(...)); - // dispatch(setTransactionId(...)); - dispatch(resetDocuments()) - dispatch(resetRecipients()) setTimeout(() => { + dispatch(resetDocuments()) + dispatch(resetRecipients()) + dispatch(hideLoader()); navigate(`/process-step-two/${accountId}/${transactionId}`); }, 1000); } diff --git a/src/config/api.tsx b/src/config/api.tsx index 23456fb..81f5bb9 100644 --- a/src/config/api.tsx +++ b/src/config/api.tsx @@ -28,7 +28,7 @@ api.interceptors.response.use( async error => { const originalRequest = error.config; // Prevent multiple refresh attempts - if (error.response?.status === 401) { + if (error.response?.status === 401 || error.response?.status === 500) { originalRequest._retry = true; try { if (!isRefreshing) {