still testing

This commit is contained in:
2023-07-31 14:46:29 +01:00
parent f543a2d893
commit b1feb0438a
3 changed files with 20 additions and 17 deletions
@@ -148,11 +148,25 @@ function ConfirmAddFund({
.resultTopUp(reqData)
.then((res) => {
if (res.data.internal_return < 0) {
console.log("**** internal return **** THIS WAS REACHED");
setRequestStatus({
message: "Could not finish transaction",
loading: false,
status: false,
});
setTimeout(() => {
setConfirmCredit((prev) => ({
...prev,
show: {
awaitConfirm: { loader: false, state: false },
acceptConfirm: { loader: false, state: true },
},
data: res,
}));
}, 1500);
toast.success("Opps! something went wrong");
} else {
setRequestStatus({
@@ -160,20 +174,7 @@ function ConfirmAddFund({
loading: false,
status: true,
});
setConfirmCredit((prev) => ({
...prev,
show: {
awaitConfirm: { loader: false, state: false },
acceptConfirm: { loader: false, state: true },
},
data: res,
}));
dispatch(tableReload({ type: "WALLETTABLE" }));
navigate("/my-wallet", { replace: true });
// setTimeout(() => {
// navigate("/my-wallet", { replace: true });
// }, 1000);
}
})
.catch((err) => {