Merge branch 'tx_ref-change' of WrenchBoard/Users-Wrench into master
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import React from "react";
|
||||
|
||||
function CompleteConfirmCredit({ onClose, confirmCredit }) {
|
||||
const { data } = confirmCredit
|
||||
const { data } = confirmCredit;
|
||||
return (
|
||||
<div className="logout-modal-body w-full flex flex-col items-center">
|
||||
<div className="content-wrapper w-full h-[32rem]">
|
||||
@@ -17,7 +17,8 @@ function CompleteConfirmCredit({ onClose, confirmCredit }) {
|
||||
>
|
||||
{/* Success Icon for now */}
|
||||
<div className="flex items-center w-full justify-center">
|
||||
{data?.result == "Charge success" ? (
|
||||
{data?.result == "Charge success" ||
|
||||
data?.return_status == "successful" ? (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="100"
|
||||
@@ -55,7 +56,8 @@ function CompleteConfirmCredit({ onClose, confirmCredit }) {
|
||||
|
||||
<div className={`flex items-center`}>
|
||||
<h1 className="text-xl font-semibold text-dark-gray dark:text-white tracking-tighter my-1">
|
||||
{data?.result == "Charge success"
|
||||
{data?.result == "Charge success" ||
|
||||
data?.return_status == "successful"
|
||||
? "Credit was Successful!"
|
||||
: "Credit was Unsuccessful"}
|
||||
</h1>
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
@@ -448,7 +448,7 @@ function NairaWithdraw({
|
||||
{/* <label className="text-[#181c32] dark:text-white text-base font-semibold block flex-[0.2] mb-0 mt-3"></label> */}
|
||||
<div className="flex flex-col gap-3 flex-[0.8] items-center">
|
||||
<select
|
||||
className="sm:w-full w-48 text-base p-2 text-dark-gray dark:text-white rounded-md border border-slate-300 outline-0 flex-[0.8]"
|
||||
className="sm:w-full w-48 text-dark-gray border-slate-300 outline-0 flex-[0.8] my-3 rounded-full p-2 outline-none text-base dark:text-gray-100 bg-[#FAFAFA] dark:bg-[#11131F] border appearance-none"
|
||||
value={
|
||||
props.values.previousAccount?.recipientID
|
||||
}
|
||||
@@ -473,7 +473,7 @@ function NairaWithdraw({
|
||||
?.recipientID
|
||||
? errorMsgs.previousAccount
|
||||
.recipientID
|
||||
: "Select..."}
|
||||
: "Select an account"}
|
||||
</option>
|
||||
{recipients.data.map((item, index) => (
|
||||
<option
|
||||
|
||||
@@ -595,7 +595,7 @@ class usersService {
|
||||
resultTopUp(post) {
|
||||
var postData = {
|
||||
uid: localStorage.getItem("uid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
member_id: Number(localStorage.getItem("member_id")),
|
||||
sessionid: localStorage.getItem("session_token"),
|
||||
action: 11061,
|
||||
...post,
|
||||
|
||||
Reference in New Issue
Block a user