diff --git a/src/components/FamilyAcc/FamilyTable.jsx b/src/components/FamilyAcc/FamilyTable.jsx
index 1a27a76..2eb2650 100644
--- a/src/components/FamilyAcc/FamilyTable.jsx
+++ b/src/components/FamilyAcc/FamilyTable.jsx
@@ -1,7 +1,7 @@
import React, { useState } from "react";
import dataImage1 from "../../assets/images/data-table-user-1.png";
import LoadingSpinner from "../Spinners/LoadingSpinner";
-import { useNavigate, useLocation, Link } from "react-router-dom";
+import { useNavigate } from "react-router-dom";
import { handlePagingFunc } from "../Pagination/HandlePagination";
import PaginatedList from "../Pagination/PaginatedList";
diff --git a/src/components/Helpers/PriceFormatter.jsx b/src/components/Helpers/PriceFormatter.jsx
index 9a1802e..49b5bb5 100644
--- a/src/components/Helpers/PriceFormatter.jsx
+++ b/src/components/Helpers/PriceFormatter.jsx
@@ -20,7 +20,8 @@ import React from "react";
export const PriceFormatter = (
price = "00",
currency = "",
- currencyName = ""
+ currencyName = "",
+ priceClass
) => {
// Convert the number to a string
let numStr = String(price);
@@ -44,7 +45,7 @@ export const PriceFormatter = (
return (
{currency || currencyName || ""}
- {formattedInteger || ""}
+ {formattedInteger || ""}
{formattedDecimal || ""}
);
diff --git a/src/components/Home/FullAccountDash.jsx b/src/components/Home/FullAccountDash.jsx
index feff276..0e996b9 100644
--- a/src/components/Home/FullAccountDash.jsx
+++ b/src/components/Home/FullAccountDash.jsx
@@ -11,12 +11,6 @@ import HomeActivities from "./HomeActivities";
export default function FullAccountDash(props) {
console.log("PROPS IN HOME->", props);
-
- const trending = datas.datas;
- const jobData = datas.datas; // api calls or cache
-
- const userApi = new usersService();
-
const { userDetails } = useSelector((state) => state?.userDetails);
return (
diff --git a/src/components/MyWallet/AddFund.jsx b/src/components/MyWallet/AddFund.jsx
index 92e4e31..6aa4cf9 100644
--- a/src/components/MyWallet/AddFund.jsx
+++ b/src/components/MyWallet/AddFund.jsx
@@ -1,48 +1,53 @@
-import React, {useState} from 'react'
-import RecentActivityTable from './WalletComponent/RecentActivityTable'
-import LoadingSpinner from '../Spinners/LoadingSpinner'
-import { useNavigate, useLocation } from 'react-router-dom'
-import InputCom from '../Helpers/Inputs/InputCom'
+import React, { useState } from "react";
+import RecentActivityTable from "./WalletComponent/RecentActivityTable";
+import LoadingSpinner from "../Spinners/LoadingSpinner";
+import { useNavigate } from "react-router-dom";
+import InputCom from "../Helpers/Inputs/InputCom";
-import AddFundDollars from './AddFundDollars'
+import AddFundDollars from "./AddFundDollars";
-function AddFund({payment}) {
-
- const navigate = useNavigate()
- const {currency} = useLocation()?.state //GETS THE USER CURRENCY FOR ADD FUND
+function AddFund({ paymentHistory, currency }) {
+ const navigate = useNavigate();
+ // const { currency } = useLocation()?.state; //GETS THE USER CURRENCY FOR ADD FUND
- //STATE FOR CONTROLLED INPUT
- let [input, setInput] = useState('')
+ //STATE FOR CONTROLLED INPUT
+ let [input, setInput] = useState("");
- let [inputError, setInputError] = useState('')
+ let [inputError, setInputError] = useState("");
- // FUNCTION TO HANDLE INPUT CHANGE
- const handleChange = ({target:{name, value}}) => {
- setInput(value)
+ // FUNCTION TO HANDLE INPUT CHANGE
+ const handleChange = ({ target: { name, value } }) => {
+ setInput(value);
+ };
+
+ //FUNCTION TO HANDLE SUBMIT
+ const handleSubmit = () => {
+ setInputError("");
+ if (!input || input == "0") {
+ setInputError("Please Enter Amount");
+ return setTimeout(() => {
+ setInputError("");
+ }, 5000);
}
- //FUNCTION TO HANDLE SUBMIT
- const handleSubmit = () => {
- setInputError('')
- if(!input || input == '0'){
- setInputError('Please Enter Amount')
- return setTimeout(()=>{setInputError('')}, 5000)
- }
-
- if(isNaN(input)){
- setInputError('Amount must be a Number')
- return setTimeout(()=>{setInputError('')}, 5000)
- }
-
- const stateData = {amount: Number(input), currency: 'naira'}
- navigate('confirm-add-fund', {state: stateData})
-
- setInput('')
+ if (isNaN(input)) {
+ setInputError("Amount must be a Number");
+ return setTimeout(() => {
+ setInputError("");
+ }, 5000);
}
- return (
-
- {/* heading */}
-
+
+ const stateData = { amount: Number(input), currency: "naira" };
+ navigate("confirm-add-fund", { state: stateData });
+
+ setInput("");
+ };
+ console.log("walletItem >>", paymentHistory);
+
+ return (
+
+ {/* heading */}
+ {/*
-
+
*/}
-
-
-
- {/*
Add Credit with Account Deposit
*/}
- {/*
*/}
-
-
+
+
+
+ {/*
Add Credit with Account Deposit
*/}
+ {/*
*/}
+
+
- {/* SHOWS THIS IF USER CURRENCY IS DOLLARS */}
- {currency == 'US Dollars' &&
-
- }
+ {/* SHOWS THIS IF USER CURRENCY IS DOLLARS */}
+ {currency == "US Dollars" && (
+
+ )}
- {/* HIDES THIS BUTTON IF CURENCY IS NAIRA */}
- {currency != 'US Dollars' &&
-
-
-
- }
-
-
-
-
- {/* HIDES THIS SECTION IF CURENCY IS NAIRA */}
- {currency != 'US Dollars' &&
-
-
-
-
Recent Activity
- {/*
Activity Report
*/}
- {payment.loading ?
-
- :
-
- }
-
-
-
- }
+ {/* HIDES THIS BUTTON IF CURENCY IS NAIRA */}
+ {currency != "US Dollars" && (
+
+
+
+ )}
+
- )
+
+
+ {/* HIDES THIS SECTION IF CURENCY IS NAIRA */}
+ {currency != "US Dollars" && (
+
+
+
+
+ {/* Recent Activity */}Working in Progress
+
+
This popup has taking time because of the prop drilling. I have got it right now
+ {/*
Activity Report
*/}
+ {paymentHistory?.loading ? (
+
+ ) : (
+ //
+ ""
+ )}
+
+
+
+ )}
+
+ );
}
-export default AddFund
\ No newline at end of file
+export default AddFund;
diff --git a/src/components/MyWallet/Popup/CreditPopup.jsx b/src/components/MyWallet/Popup/CreditPopup.jsx
new file mode 100644
index 0000000..fdd2e46
--- /dev/null
+++ b/src/components/MyWallet/Popup/CreditPopup.jsx
@@ -0,0 +1,76 @@
+import { useState } from "react";
+import { useLocation } from "react-router-dom";
+// import ModalCom from "../Helpers/ModalCom";
+import { Form, Formik } from "formik";
+import InputCom from "../../Helpers/Inputs/InputCom";
+import usersService from "../../../services/UsersService";
+import Icons from "../../Helpers/Icons";
+import AddFund from "../AddFund";
+import ModalCom from "../../Helpers/ModalCom";
+
+const CreditPopup = ({ details, onClose, situation}) => {
+ const { pathname, state } = useLocation();
+ const [submitTask, setSubmitTask] = useState({
+ loading: false,
+ msg: "",
+ state: "",
+ });
+ const [suggestedNextStep, setSuggestedNextStep] = useState("Send Task");
+
+ const switchNextStep = ({ target: value }) => {
+ setSuggestedNextStep(value);
+ };
+
+ const apiCall = new usersService();
+
+ const handleParentSuggestion = (values) => {
+ if (suggestedNextStep == "Send Task") {
+ let firstName = state?.firstname;
+ let family_uid = state?.family_uid;
+ // continuePopupData({ ...details, firstName, family_uid });
+ }
+ onClose();
+ };
+
+ return (
+
+
+
+
+ Add Credit
+
+
+
+
+
+
+ );
+};
+
+export default CreditPopup;
diff --git a/src/components/MyWallet/Wallet.jsx b/src/components/MyWallet/Wallet.jsx
index b2bee7c..12446f8 100644
--- a/src/components/MyWallet/Wallet.jsx
+++ b/src/components/MyWallet/Wallet.jsx
@@ -1,85 +1,177 @@
-import React, { useEffect, useState } from 'react'
-import {Routes, Route, Outlet, Navigate} from 'react-router-dom'
-import usersService from '../../services/UsersService'
+import React, {
+ Suspense,
+ lazy,
+ useCallback,
+ useEffect,
+ useMemo,
+ useReducer,
+} from "react";
+import { Routes, Route, Outlet, Navigate } from "react-router-dom";
+import usersService from "../../services/UsersService";
+import Layout from "../Partials/Layout";
+import LoadingSpinner from "../Spinners/LoadingSpinner";
-import Layout from '../Partials/Layout'
-
-import Balance from './Balance'
-import TransferFund from './TransferFund'
-import AddFund from './AddFund'
-import AddRecipient from './AddRecipient'
-import ConfirmTransfer from './ConfirmTransfer'
-import ConfirmAddFund from './ConfirmAddFund'
-import WalletBox from "./WalletBox";
+const AddFund = lazy(() => import("./AddFund"));
+const ConfirmAddFund = lazy(() => import("./ConfirmAddFund"));
+const TransferFund = lazy(() => import("./TransferFund"));
+const WalletBox = lazy(() => import("./WalletBox"));
+const AddRecipient = lazy(() => import("./AddRecipient"));
+const ConfirmTransfer = lazy(() => import("./ConfirmTransfer"));
function Wallet() {
return (
-
+
- )
+ );
}
+const initialState = {
+ loading: true,
+ data: [],
+ error: false,
+};
+
+// Currently learning better about useReducer, so I converted this since it seemed like something complex
+const reducer = (state, action) => {
+ switch (action.type) {
+ case "FETCH_SUCCESS":
+ return {
+ ...state,
+ loading: false,
+ data: action.payload,
+ };
+ case "FETCH_ERROR":
+ return {
+ ...state,
+ loading: false,
+ error: true,
+ };
+ default:
+ return state;
+ }
+};
const WalletRoutes = () => {
- const apiCall = new usersService()
+ const apiCall = useMemo(() => new usersService(), []);
- let [walletList, setWalletList] = useState({ // FOR WALLET LIST
- loading: true,
- data: [],
- error: false
- })
+ const [walletList, dispatchWalletList] = useReducer(reducer, initialState);
+ const [paymentHistory, dispatchPaymentHistory] = useReducer(
+ reducer,
+ initialState
+ );
- let [paymentHistory, setPaymentHistory] = useState({ // FOR PAYMENT HISTORY
- loading: true,
- data: [],
- error: false
- })
+ const getWalletList = useCallback(() => {
+ apiCall
+ .getUserWallets(null)
+ .then((res) => {
+ if (res.data.internal_return < 0) {
+ dispatchWalletList({ type: "FETCH_SUCCESS", payload: [] });
+ } else {
+ dispatchWalletList({
+ type: "FETCH_SUCCESS",
+ payload: res.data.result_list,
+ });
+ }
+ })
+ .catch(() => {
+ dispatchWalletList({ type: "FETCH_ERROR" });
+ });
+ }, [apiCall]);
- //FUNCTION TO GET WALLET LIST
- const getWalletList = ()=>{
- apiCall.getUserWallets(null).then((res)=>{
- if(res.data.internal_return < 0){ // success but no data
- setWalletList(prev => ({...prev, loading: false}))
- return
- }
- setWalletList(prev => ({...prev, loading: false, data: res.data.result_list}))
- }).catch((error)=>{
- setWalletList(prev => ({...prev, loading: false, error: true}))
- })
+ const getPaymentHistory = useCallback(() => {
+ apiCall
+ .getPaymentHx()
+ .then((res) => {
+ if (res.data.internal_return < 0) {
+ dispatchPaymentHistory({ type: "FETCH_SUCCESS", payload: [] });
+ } else {
+ dispatchPaymentHistory({
+ type: "FETCH_SUCCESS",
+ payload: res.data.result_list,
+ });
+ }
+ })
+ .catch(() => {
+ dispatchPaymentHistory({ type: "FETCH_ERROR" });
+ });
+ }, [apiCall]);
+
+ useEffect(() => {
+ let isMounted = true;
+
+ if (isMounted) {
+ getWalletList();
+ getPaymentHistory();
}
- //FUNCTION TO GET PAYMENT HISTORY
- const getPaymentHistory = ()=>{
- apiCall.getPaymentHx().then((res)=>{
- if(res.data.internal_return < 0){ // success but no data
- setPaymentHistory(prev => ({...prev, loading: false}))
- return
- }
- setPaymentHistory(prev => ({...prev, loading: false, data: res.data.result_list}))
- }).catch((error)=>{
- setPaymentHistory(prev => ({...prev, loading: false, error: true}))
- })
- }
+ return () => {
+ isMounted = false;
+ };
+ }, [getWalletList, getPaymentHistory]);
- useEffect(()=>{
- getWalletList()
- getPaymentHistory()
- }, [])
- return (
-
- }>
- } />
- } />
- } />
- {/*} />*/}
- } />
- } />
- } />
- } />
-
-
- )
-}
+ return (
+
+ }>
+
+
+ }
+ >
+ {/* }>
+
+
+ }
+ /> */}
+ }>
+
+
+ }
+ />
+ }>
+
+
+ }
+ />
+ {/*} />*/}
+ }>
+
+
+ }
+ />
+ }>
+
+
+ }
+ />
+ }>
+
+
+ }
+ />
+ } />
+
+
+ );
+};
-export default WalletRoutes
\ No newline at end of file
+export default WalletRoutes;
diff --git a/src/components/MyWallet/WalletBox.jsx b/src/components/MyWallet/WalletBox.jsx
index 4e8969c..2c5d159 100644
--- a/src/components/MyWallet/WalletBox.jsx
+++ b/src/components/MyWallet/WalletBox.jsx
@@ -1,9 +1,3 @@
-import React from "react";
-import bank1 from "../../assets/images/bank-1.png";
-import bank2 from "../../assets/images/bank-2.png";
-import bank3 from "../../assets/images/bank-3.png";
-import bank4 from "../../assets/images/bank-4.png";
-import Layout from "../Partials/Layout";
import CurrencyStaticsSection from "./CurrencyStaticsSection";
import CurrentBalanceWidget from "./CurrentBalanceWidget";
import InvestmentSection from "./InvestmentSection";
@@ -11,263 +5,262 @@ import RecentTransactionWidget from "./RecentTransactionWidget";
import LoadingSpinner from "../Spinners/LoadingSpinner";
import WalletItemCard from "./WalletItemCard";
-export default function WalletBox({wallet, coupon}) {
- return (
- <>
-
-
-
-
- {wallet.loading ?
-
- :
- wallet.data.length ?
- wallet.data.map((item, index)=> (
-
-
-
- )) : ''
- }
-
- {/*
*/}
- {/* */}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/* My Wallet*/}
- {/*
*/}
- {/* */}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*

*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/* MetaMask*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/* $734.79*/}
- {/*
*/}
- {/*
*/}
- {/* New Add*/}
- {/* */}
- {/* +324.75*/}
- {/* */}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/**/}
- {/* */}
- {/**/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*

*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/* Coinbase Wallet*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/* $734.79*/}
- {/*
*/}
- {/*
*/}
- {/* New Add*/}
- {/* */}
- {/* +324.75*/}
- {/* */}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/**/}
- {/* */}
- {/**/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*

*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/* Bitski*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/* $734.79*/}
- {/*
*/}
- {/*
*/}
- {/* New Add*/}
- {/* */}
- {/* +324.75*/}
- {/* */}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/**/}
- {/* */}
- {/**/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*

*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/* WalletConnect*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/* $734.79*/}
- {/*
*/}
- {/*
*/}
- {/* New Add*/}
- {/* */}
- {/* +324.75*/}
- {/* */}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/**/}
- {/* */}
- {/**/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
-
- {/* flex space-x-11 */}
- {/*
*/}
- {/*
*/}
- {/* */}
- {/*
*/}
- {/*
*/}
- {/* */}
- {/*
*/}
- {/*
*/}
-
+export default function WalletBox({ wallet, coupon, payment }) {
+ return (
+ <>
+
+
+
+ {wallet.loading ? (
+
+
+
+ ) : wallet.data.length ? (
+ wallet.data.map((item, index) => (
+
+
+ ))
+ ) : null}
- >
- );
+ {/*
*/}
+ {/* */}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/* My Wallet*/}
+ {/*
*/}
+ {/* */}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*

*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/* MetaMask*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/* $734.79*/}
+ {/*
*/}
+ {/*
*/}
+ {/* New Add*/}
+ {/* */}
+ {/* +324.75*/}
+ {/* */}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/**/}
+ {/* */}
+ {/**/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*

*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/* Coinbase Wallet*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/* $734.79*/}
+ {/*
*/}
+ {/*
*/}
+ {/* New Add*/}
+ {/* */}
+ {/* +324.75*/}
+ {/* */}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/**/}
+ {/* */}
+ {/**/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*

*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/* Bitski*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/* $734.79*/}
+ {/*
*/}
+ {/*
*/}
+ {/* New Add*/}
+ {/* */}
+ {/* +324.75*/}
+ {/* */}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/**/}
+ {/* */}
+ {/**/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*

*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/* WalletConnect*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/* $734.79*/}
+ {/*
*/}
+ {/*
*/}
+ {/* New Add*/}
+ {/* */}
+ {/* +324.75*/}
+ {/* */}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/**/}
+ {/* */}
+ {/**/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+
+ {/* flex space-x-11 */}
+ {/*
*/}
+ {/*
*/}
+ {/* */}
+ {/*
*/}
+ {/*
*/}
+ {/* */}
+ {/*
*/}
+ {/*
*/}
+
+
+ >
+ );
}
diff --git a/src/components/MyWallet/WalletItemCard.jsx b/src/components/MyWallet/WalletItemCard.jsx
index ff5b1ff..5d287cd 100644
--- a/src/components/MyWallet/WalletItemCard.jsx
+++ b/src/components/MyWallet/WalletItemCard.jsx
@@ -1,72 +1,131 @@
import React, { useState } from "react";
-import background from "../../assets/images/bg-sky-blue.jpg" //shape/balance-bg.svg";
-import {PriceFormatter} from "../Helpers/PriceFormatter";
-import {Link} from "react-router-dom";
+import background from "../../assets/images/bg-sky-blue.jpg"; //shape/balance-bg.svg";
+import { PriceFormatter } from "../Helpers/PriceFormatter";
+import { Link } from "react-router-dom";
+import { useSelector } from "react-redux";
+import CreditPopup from "./Popup/CreditPopup";
-export default function WalletItemCard({walletItem}) {
- const [eth] = useState(90);
- const [btc] = useState(85);
- const [ltc] = useState(20);
- return (
-
-
-
-
-
- .
-
-
- {walletItem.code}
-
-
-
-
- {/*
*/}
- {/* 6,572.00*/}
- {/*
*/}
- {/*
*/}
- {/* Total Transactions*/}
- {/*
*/}
-
-
-
-
- Current Balance
-
-
- {walletItem.amount * 0.01} {walletItem.code}
-
-
- HOLDINGS : {PriceFormatter(walletItem.escrow * 0.01, walletItem.code)}
- {/*(11.5%)*/}
-
-
-
-
- {
- walletItem.action_type != 'AC_AD_FD_ONLY' ?
- Transfer:''
- }
-
-
-
-
-
-
-
Add Credit
-
-
+export default function WalletItemCard({ walletItem, paymentHistory }) {
+ // const [eth] = useState(90);
+ // const [btc] = useState(85);
+ // const [ltc] = useState(20);
+ const { userDetails } = useSelector((state) => state?.userDetails);
+ let accountType = userDetails?.account_type == "FAMILY";
+
+ // Credit popup
+ const [creditPopup, setCreditPopup] = useState({ show: false, data: {} });
+
+ const openPopUp = (value) => {
+ setCreditPopup({
+ show: true,
+ data: { ...value },
+ });
+ };
+
+ const closePopUp = () => {
+ setCreditPopup({ show: false, data: {} });
+ };
+ return (
+ <>
+
+
+
+
+
+ .
+
+
+ {walletItem.code}
+
+
+
- );
+
+
+ Current Balance
+
+
+ {PriceFormatter(
+ walletItem.amount * 0.01,
+ walletItem.code,
+ undefined,
+ "text-[2rem]"
+ )}
+
+
+ HOLDINGS :{" "}
+
+ {PriceFormatter(
+ walletItem.escrow * 0.01,
+ walletItem.code,
+ undefined,
+ "text-[2rem]"
+ )}
+
+ {/*(11.5%)*/}
+
+
+ {!accountType && (
+
+
+
+ Transfer
+
+
+
+
+
+
+ )}
+
+ {creditPopup.show && (
+
+ )}
+ >
+ );
}
diff --git a/src/views/MyWalletPage.jsx b/src/views/MyWalletPage.jsx
index 284e93d..de0f993 100644
--- a/src/views/MyWalletPage.jsx
+++ b/src/views/MyWalletPage.jsx
@@ -1,5 +1,3 @@
-import React from "react";
-// import MyWallet from "../components/MyWallet";
import WalletRoutes from "../components/MyWallet/Wallet";
export default function MyWalletPage() {