Merge branch 'tx_ref-change' of WrenchBoard/Users-Wrench into master
This commit is contained in:
@@ -6,6 +6,7 @@ import { toast } from "react-toastify";
|
|||||||
import usersService from "../../../services/UsersService";
|
import usersService from "../../../services/UsersService";
|
||||||
import { tableReload } from "../../../store/TableReloads";
|
import { tableReload } from "../../../store/TableReloads";
|
||||||
import LoadingSpinner from "../../Spinners/LoadingSpinner";
|
import LoadingSpinner from "../../Spinners/LoadingSpinner";
|
||||||
|
import debounce from "../../../hooks/debounce";
|
||||||
|
|
||||||
function ThePaymentText({ value, type }) {
|
function ThePaymentText({ value, type }) {
|
||||||
const cardDetails = value;
|
const cardDetails = value;
|
||||||
@@ -102,7 +103,6 @@ function ConfirmAddFund({
|
|||||||
|
|
||||||
const { userDetails } = useSelector((state) => state?.userDetails);
|
const { userDetails } = useSelector((state) => state?.userDetails);
|
||||||
|
|
||||||
const navigate = useNavigate();
|
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
|
|
||||||
const [requestStatus, setRequestStatus] = useState({
|
const [requestStatus, setRequestStatus] = useState({
|
||||||
@@ -133,10 +133,12 @@ function ConfirmAddFund({
|
|||||||
...config,
|
...config,
|
||||||
text: "Proceed",
|
text: "Proceed",
|
||||||
callback: (response) => {
|
callback: (response) => {
|
||||||
onSuccessPayment();
|
debouncedSuccessPayment();
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
dispatch(tableReload({ type: "WALLETTABLE" }));
|
||||||
|
onClose()
|
||||||
closePaymentModal();
|
closePaymentModal();
|
||||||
}, 2000);
|
}, 1500);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -174,7 +176,6 @@ function ConfirmAddFund({
|
|||||||
loading: false,
|
loading: false,
|
||||||
status: true,
|
status: true,
|
||||||
});
|
});
|
||||||
dispatch(tableReload({ type: "WALLETTABLE" }));
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
@@ -187,6 +188,8 @@ function ConfirmAddFund({
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const debouncedSuccessPayment = debounce(onSuccessPayment, 5000)
|
||||||
|
|
||||||
const handlePrevCard = async () => {
|
const handlePrevCard = async () => {
|
||||||
const { amount, credit_reference, currency } = __confirmData;
|
const { amount, credit_reference, currency } = __confirmData;
|
||||||
const { card_uid } = __confirmCardDetails;
|
const { card_uid } = __confirmCardDetails;
|
||||||
|
|||||||
Reference in New Issue
Block a user