Merge branch 'tx_ref-change' of WrenchBoard/Users-Wrench into master
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
function CompleteConfirmCredit({ onClose, confirmCredit }) {
|
function CompleteConfirmCredit({ onClose, confirmCredit }) {
|
||||||
const { data } = confirmCredit
|
const { data } = confirmCredit;
|
||||||
return (
|
return (
|
||||||
<div className="logout-modal-body w-full flex flex-col items-center">
|
<div className="logout-modal-body w-full flex flex-col items-center">
|
||||||
<div className="content-wrapper w-full h-[32rem]">
|
<div className="content-wrapper w-full h-[32rem]">
|
||||||
@@ -17,7 +17,8 @@ function CompleteConfirmCredit({ onClose, confirmCredit }) {
|
|||||||
>
|
>
|
||||||
{/* Success Icon for now */}
|
{/* Success Icon for now */}
|
||||||
<div className="flex items-center w-full justify-center">
|
<div className="flex items-center w-full justify-center">
|
||||||
{data?.result == "Charge success" ? (
|
{data?.result == "Charge success" ||
|
||||||
|
data?.return_status == "successful" ? (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
width="100"
|
width="100"
|
||||||
@@ -55,7 +56,8 @@ function CompleteConfirmCredit({ onClose, confirmCredit }) {
|
|||||||
|
|
||||||
<div className={`flex items-center`}>
|
<div className={`flex items-center`}>
|
||||||
<h1 className="text-xl font-semibold text-dark-gray dark:text-white tracking-tighter my-1">
|
<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 Successful!"
|
||||||
: "Credit was Unsuccessful"}
|
: "Credit was Unsuccessful"}
|
||||||
</h1>
|
</h1>
|
||||||
|
|||||||
@@ -148,11 +148,25 @@ function ConfirmAddFund({
|
|||||||
.resultTopUp(reqData)
|
.resultTopUp(reqData)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.data.internal_return < 0) {
|
if (res.data.internal_return < 0) {
|
||||||
|
console.log("**** internal return **** THIS WAS REACHED");
|
||||||
|
|
||||||
setRequestStatus({
|
setRequestStatus({
|
||||||
message: "Could not finish transaction",
|
message: "Could not finish transaction",
|
||||||
loading: false,
|
loading: false,
|
||||||
status: 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");
|
toast.success("Opps! something went wrong");
|
||||||
} else {
|
} else {
|
||||||
setRequestStatus({
|
setRequestStatus({
|
||||||
@@ -160,20 +174,7 @@ function ConfirmAddFund({
|
|||||||
loading: false,
|
loading: false,
|
||||||
status: true,
|
status: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
setConfirmCredit((prev) => ({
|
|
||||||
...prev,
|
|
||||||
show: {
|
|
||||||
awaitConfirm: { loader: false, state: false },
|
|
||||||
acceptConfirm: { loader: false, state: true },
|
|
||||||
},
|
|
||||||
data: res,
|
|
||||||
}));
|
|
||||||
dispatch(tableReload({ type: "WALLETTABLE" }));
|
dispatch(tableReload({ type: "WALLETTABLE" }));
|
||||||
navigate("/my-wallet", { replace: true });
|
|
||||||
// setTimeout(() => {
|
|
||||||
// navigate("/my-wallet", { replace: true });
|
|
||||||
// }, 1000);
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.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> */}
|
{/* <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">
|
<div className="flex flex-col gap-3 flex-[0.8] items-center">
|
||||||
<select
|
<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={
|
value={
|
||||||
props.values.previousAccount?.recipientID
|
props.values.previousAccount?.recipientID
|
||||||
}
|
}
|
||||||
@@ -473,7 +473,7 @@ function NairaWithdraw({
|
|||||||
?.recipientID
|
?.recipientID
|
||||||
? errorMsgs.previousAccount
|
? errorMsgs.previousAccount
|
||||||
.recipientID
|
.recipientID
|
||||||
: "Select..."}
|
: "Select an account"}
|
||||||
</option>
|
</option>
|
||||||
{recipients.data.map((item, index) => (
|
{recipients.data.map((item, index) => (
|
||||||
<option
|
<option
|
||||||
|
|||||||
@@ -595,7 +595,7 @@ class usersService {
|
|||||||
resultTopUp(post) {
|
resultTopUp(post) {
|
||||||
var postData = {
|
var postData = {
|
||||||
uid: localStorage.getItem("uid"),
|
uid: localStorage.getItem("uid"),
|
||||||
member_id: localStorage.getItem("member_id"),
|
member_id: Number(localStorage.getItem("member_id")),
|
||||||
sessionid: localStorage.getItem("session_token"),
|
sessionid: localStorage.getItem("session_token"),
|
||||||
action: 11061,
|
action: 11061,
|
||||||
...post,
|
...post,
|
||||||
|
|||||||
Reference in New Issue
Block a user