Merge branch 'my_wallet_layout' of WrenchBoard/Users-Wrench into master

This commit is contained in:
2023-07-17 12:49:59 +00:00
committed by Gogs
3 changed files with 50 additions and 38 deletions
@@ -1,7 +1,6 @@
import React from "react"; import React from "react";
function CompleteConfirmCredit({ onClose, confirmCredit }) { function CompleteConfirmCredit({ onClose, confirmCredit }) {
console.log(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">
@@ -53,10 +52,12 @@ function CompleteConfirmCredit({ onClose, confirmCredit }) {
<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"
? "Credit was Successful!" ? "Credit was Successful!"
: data?.result} : "Credit was Unsuccessful"}
</h1> </h1>
</div> </div>
{data?.internal_return >= 0 ? (
<>
<div className="flex items-center gap-8"> <div className="flex items-center gap-8">
<h1 className="text-xl font-bold text-dark-gray dark:text-white tracking-tighter my-1"> <h1 className="text-xl font-bold text-dark-gray dark:text-white tracking-tighter my-1">
Amount({data?.currency || ""}) Amount({data?.currency || ""})
@@ -85,6 +86,10 @@ function CompleteConfirmCredit({ onClose, confirmCredit }) {
{data?.confirmation} {data?.confirmation}
</span> </span>
</div> </div>
</>
) : (
<div className="h-[160px]"></div>
)}
</div> </div>
</div> </div>
</div> </div>
@@ -11,7 +11,7 @@ function ThePaymentText({ value, type }) {
type === "new" type === "new"
? cardDetails.cardNum[0] === "4" ? cardDetails.cardNum[0] === "4"
? "Visa" ? "Visa"
: value[0] === "5" : cardDetails.cardNum[0] == "5"
? "Master" ? "Master"
: "ATM" : "ATM"
: value.description; : value.description;
@@ -223,7 +223,7 @@ function ConfirmAddFund({
amount: amount * 100, amount: amount * 100,
cardnumber: cardNum.replace(/\s/g, ""), cardnumber: cardNum.replace(/\s/g, ""),
credit_reference, credit_reference,
cvc: cvv, cvc: String(cvv).length === 1 ? `0${cvv}` : String(cvv),
description: address, description: address,
exp_month: expirationMonth, exp_month: expirationMonth,
exp_year: expirationYear, exp_year: expirationYear,
@@ -269,7 +269,7 @@ function ConfirmAddFund({
acceptConfirm: { loader: false }, acceptConfirm: { loader: false },
}, },
})); }));
setTimeout(() => onClose, 10000) setTimeout(() => onClose, 10000);
console.log(error); console.log(error);
} }
}; };
@@ -24,6 +24,11 @@ const CreditPopup = ({ details, onClose, situation, walletItem }) => {
<div className="logout-modal-wrapper lw-[90%] md:w-[768px] h-full lg:h-auto bg-white dark:bg-dark-white lg:rounded-2xl overflow-y-auto"> <div className="logout-modal-wrapper lw-[90%] md:w-[768px] h-full lg:h-auto bg-white dark:bg-dark-white lg:rounded-2xl overflow-y-auto">
<div className="logout-modal-header w-full flex items-center justify-between lg:p-6 px-[30px] py-[23px] border-b dark:border-[#5356fb29] border-light-purple"> <div className="logout-modal-header w-full flex items-center justify-between lg:p-6 px-[30px] py-[23px] border-b dark:border-[#5356fb29] border-light-purple">
<h1 className="text-26 font-bold text-dark-gray dark:text-white tracking-wide"> <h1 className="text-26 font-bold text-dark-gray dark:text-white tracking-wide">
{confirmCredit?.show?.acceptConfirm?.state &&
confirmCredit?.data?.internal_return < 0 ? (
"Credit Unsuccessful"
) : (
<>
{confirmCredit?.show?.acceptConfirm?.loader {confirmCredit?.show?.acceptConfirm?.loader
? "Confirming Credit..." ? "Confirming Credit..."
: confirmCredit?.show?.awaitConfirm?.state : confirmCredit?.show?.awaitConfirm?.state
@@ -31,6 +36,8 @@ const CreditPopup = ({ details, onClose, situation, walletItem }) => {
: confirmCredit?.show?.acceptConfirm?.state : confirmCredit?.show?.acceptConfirm?.state
? "Credit Add Completed" ? "Credit Add Completed"
: "Add Credit"} : "Add Credit"}
</>
)}
</h1> </h1>
<button <button
type="button" type="button"