@@ -107,7 +100,10 @@ const CreateAPIKey = () => {
options={dates}
onchange={(e) => setApiKey({...apiKey, expiration: {value: e.value, error: []}})}
alerts={apiKey.expiration.error}
- value={apiKey.expiration.value && {value: apiKey.expiration.value , label: t('APIKey.'+apiKey.expiration.value)}}
+ value={apiKey.expiration.value && {
+ value: apiKey.expiration.value,
+ label: t('APIKey.' + apiKey.expiration.value)
+ }}
/>
@@ -118,7 +114,10 @@ const CreateAPIKey = () => {
ltr={true}
lead={t('APIKey.allowedIPs')}
type="text"
- onchange={(e) => setApiKey({...apiKey, allowedIPs: {value: e.target.value, error: []}})}
+ onchange={(e) => setApiKey({
+ ...apiKey,
+ allowedIPs: {value: e.target.value, error: []}
+ })}
alerts={apiKey.allowedIPs.error}
/>
diff --git a/src/main/Browser/Pages/UserPanel/Sections/Content/components/Settings/components/Authentication/components/PersonalProfileStep/PersonalProfileStep.js b/src/main/Browser/Pages/UserPanel/Sections/Content/components/Settings/components/Authentication/components/PersonalProfileStep/PersonalProfileStep.js
index 544a8985..e7022d8a 100644
--- a/src/main/Browser/Pages/UserPanel/Sections/Content/components/Settings/components/Authentication/components/PersonalProfileStep/PersonalProfileStep.js
+++ b/src/main/Browser/Pages/UserPanel/Sections/Content/components/Settings/components/Authentication/components/PersonalProfileStep/PersonalProfileStep.js
@@ -33,6 +33,7 @@ const PersonalProfileStep = (props) => {
{value: "germany", label: t('country.germany')},
{value: "uk", label: t('country.uk')},
{value: "turkey", label: t('country.turkey')},
+ {value: "uzbekistan", label: t('country.uzbekistan')},
]
const convertUserInfoToState = (info) => {
diff --git a/src/main/Browser/Pages/UserPanel/Sections/Content/components/Settings/components/Profile/components/PersonalProfile/PersonalProfile.js b/src/main/Browser/Pages/UserPanel/Sections/Content/components/Settings/components/Profile/components/PersonalProfile/PersonalProfile.js
index b426b9a3..9dd4df3b 100644
--- a/src/main/Browser/Pages/UserPanel/Sections/Content/components/Settings/components/Profile/components/PersonalProfile/PersonalProfile.js
+++ b/src/main/Browser/Pages/UserPanel/Sections/Content/components/Settings/components/Profile/components/PersonalProfile/PersonalProfile.js
@@ -21,6 +21,7 @@ const PersonalProfile = () => {
{value: "germany", label: t('country.germany')},
{value: "uk", label: t('country.uk')},
{value: "turkey", label: t('country.turkey')},
+ {value: "uzbekistan", label: t('country.uzbekistan')},
]
return (
diff --git a/src/main/Browser/Pages/UserPanel/Sections/Content/components/TechnicalChart/TechnicalChart.js b/src/main/Browser/Pages/UserPanel/Sections/Content/components/TechnicalChart/TechnicalChart.js
index 54ece295..31cf1a7f 100644
--- a/src/main/Browser/Pages/UserPanel/Sections/Content/components/TechnicalChart/TechnicalChart.js
+++ b/src/main/Browser/Pages/UserPanel/Sections/Content/components/TechnicalChart/TechnicalChart.js
@@ -1,38 +1,12 @@
-import React, {useEffect, useState} from "react";
-import classes from "./TechnicalChart.module.css";
-import {connect} from "react-redux";
-import {isSafari} from "react-device-detect";
-import i18n from "i18next";
-import { Tooltip as ReactTooltip } from 'react-tooltip'
-import MainMenu from "../../../MainMenu/MainMenu";
+import React from "react";
import AdvanceTradingView from "../../../../../../../../components/AdvanceTradingView/AdvanceTradingView";
-const TechnicalChart = (props) => {
- const [ltr, setLtr] = useState(false);
- useEffect(() => {
- i18n.language !== "fa" ? setLtr(true) : setLtr(false);
- i18n.on("languageChanged", (lng) => {
- lng !== "fa" ? setLtr(true) : setLtr(false);
- });
- }, []);
+const TechnicalChart = () => {
+
return (
-
+
);
};
-const mapStateToProps = (state) => {
- return {
- isLoading: state.global.isLoading,
- isDark: state.global.isDark,
- isLogin: state.auth.isLogin,
- };
-};
-export default connect(mapStateToProps, null)(TechnicalChart);
+
+export default TechnicalChart;
diff --git a/src/main/Browser/Pages/UserPanel/Sections/Content/components/TransactionHistory/TransactionHistory.js b/src/main/Browser/Pages/UserPanel/Sections/Content/components/TransactionHistory/TransactionHistory.js
new file mode 100644
index 00000000..46be1ad2
--- /dev/null
+++ b/src/main/Browser/Pages/UserPanel/Sections/Content/components/TransactionHistory/TransactionHistory.js
@@ -0,0 +1,226 @@
+import React, {useEffect, useRef, useState} from 'react';
+import classes from './TransactionHistory.module.css';
+import {useSelector} from "react-redux";
+import {useTranslation} from "react-i18next";
+import moment from "moment-jalaali";
+import {useTransactionHistory} from "../../../../../../../../queries/hooks/useTransactionHistory";
+import Loading from "../../../../../../../../components/Loading/Loading";
+import Error from "../../../../../../../../components/Error/Error";
+import TextInput from "../../../../../../../../components/TextInput/TextInput";
+import DatePanel from "react-multi-date-picker/plugins/date_panel";
+import Button from "../../../../../../../../components/Button/Button";
+import Date from "../../../../../../../../components/Date/Date";
+import TransactionHistoryTable from "./components/TransactionHistoryTable/TransactionHistoryTable";
+
+const TransactionHistory = () => {
+
+ const {t} = useTranslation();
+ const user_id = useSelector((state) => state.auth.id)
+ const coins = useSelector((state) => state.exchange.assets)
+ const [query, setQuery] = useState({
+ "coin": null, // optional
+ "category": null, // optional [DEPOSIT, FEE, TRADE, WITHDRAW, ORDER_CANCEL, ORDER_CREATE, ORDER_FINALIZED]
+ "startTime": moment().subtract(1, 'months').startOf("day").valueOf(),
+ "endTime": moment().endOf("day").valueOf(),
+ "limit": 10,
+ "offset": 0
+ });
+
+ const {data, isLoading, error} = useTransactionHistory(user_id, query);
+ const pagination = {
+ page: (query.offset / query.limit) + 1,
+ isLastPage: data?.length < query.limit
+ }
+
+ const isFirst = useRef(true);
+
+ useEffect(() => {
+ if (!isFirst.current) scrollRef.current?.scrollIntoView({behavior: 'smooth'});
+ }, [data]);
+
+ const categories = ['DEPOSIT', 'FEE', 'TRADE', 'WITHDRAW', 'ORDER_CANCEL', 'ORDER_CREATE', 'ORDER_FINALIZED'];
+
+ const coinsOptions = [{value: null, label: t('all')}]
+ const categoryOptions = [{value: null, label: t('all')}]
+ const size = [10, 20, 30, 40, 50]
+
+ categories.forEach((o) => {
+ categoryOptions.push({value: o, label: t('TransactionCategory.' + o)})
+ })
+
+ coins.forEach((o) => {
+ coinsOptions.push({value: o, label: t('currency.' + o)})
+ })
+
+
+ const scrollRef = useRef(null);
+
+
+ const pageSizeHandler = (e) => {
+ setQuery({
+ ...query,
+ limit: e.value,
+ offset: 0
+ })
+ }
+
+ const firstPage = () => {
+ setQuery({
+ ...query,
+ offset: 0
+ })
+ }
+ const nextPage = () => {
+ isFirst.current = false;
+ setQuery({
+ ...query,
+ offset: query.offset + query.limit
+ })
+ }
+ const prevPage = () => {
+ setQuery({
+ ...query,
+ offset: query.offset - query.limit
+ })
+ }
+ const startDateHandler = (dateRange) => {
+ if (dateRange.length === 2) {
+ setQuery({
+ ...query,
+ startTime: moment.unix(dateRange[0].toUnix()).startOf("day").valueOf(),
+ endTime: moment.unix(dateRange[1].toUnix()).endOf("day").valueOf()
+ })
+ }
+ }
+
+
+ const content = () => {
+ if (isLoading) return
+ if (error) return
+ if (data?.length === 0) return
{t("noTx")}
+
+
+ else return <>
+
+ >
+ }
+
+
+
+ return
+
+
+
+ setQuery({...query, coin: e.value})}
+ customClass={`width-24 ${classes.thisInput}`}
+ />
+ setQuery({...query, category: e.value})}
+ customClass={`width-24 ${classes.thisInput}`}
+ />
+ {
+ return {label: s, value: s}
+ })}
+ lead={t('TransactionHistory.size')}
+ type="select"
+ value={{
+ value: query?.limit,
+ label: query?.limit,
+ }}
+ onchange={pageSizeHandler}
+ customClass={`width-24 ${classes.thisInput}`}
+ />
+
+
+ ]}
+ lead={t('TransactionHistory.period')}
+ type="input"
+ onChange={startDateHandler}
+ value={[query.startTime, query.endTime]}
+
+ dateSeparator={" " + t('to') + " "}
+ range
+ customClass={`width-24 ${classes.thisInput}`}
+ />
+
+
+
+
+
+
+
+
+
{t("txHistory.title")}
+
+ {t("from")}
+
+ {t("until")}
+
+
+
+
+ {/*
+ dispatch(setMarketInterval("24h"))}>{t("marketInterval.24h")}
+ dispatch(setMarketInterval("7d"))}>{t("marketInterval.7d")}
+ dispatch(setMarketInterval("1M"))}>{t("marketInterval.1M")}
+
*/}
+
+
+ {content()}
+
+
+
+
+
+
+
+
+
+};
+
+export default TransactionHistory;
diff --git a/src/main/Browser/Pages/UserPanel/Sections/Content/components/TransactionHistory/TransactionHistory.module.css b/src/main/Browser/Pages/UserPanel/Sections/Content/components/TransactionHistory/TransactionHistory.module.css
new file mode 100644
index 00000000..aae173ba
--- /dev/null
+++ b/src/main/Browser/Pages/UserPanel/Sections/Content/components/TransactionHistory/TransactionHistory.module.css
@@ -0,0 +1,31 @@
+.thisInput :global(.lead) {
+ width: 30%;
+}
+.thisInput :global(.selectExternalClass) {
+ width: 70% !important;
+}
+
+.thisInput :global(.rmdp-container ) {
+ width: 70%;
+ height: 100%;
+}
+
+
+
+.thisButton {
+ background-color: var(--orange);
+ color: #000;
+}
+.disable:disabled,.button[disabled] {
+ border: 0.3vh solid var(--cardHeader);
+ background: var(--cardHeader);
+ color: var(--textColor);
+ cursor: not-allowed;
+}
+
+.thisButton:disabled,.button[disabled] {
+ border: 0.3vh solid var(--cardHeader);
+ background: var(--cardHeader);
+ color: var(--textColor);
+ cursor: not-allowed;
+}
\ No newline at end of file
diff --git a/src/main/Browser/Pages/UserPanel/Sections/Content/components/TransactionHistory/components/TransactionHistoryTable/TransactionHistoryTable.js b/src/main/Browser/Pages/UserPanel/Sections/Content/components/TransactionHistory/components/TransactionHistoryTable/TransactionHistoryTable.js
new file mode 100644
index 00000000..f2ad1d10
--- /dev/null
+++ b/src/main/Browser/Pages/UserPanel/Sections/Content/components/TransactionHistory/components/TransactionHistoryTable/TransactionHistoryTable.js
@@ -0,0 +1,134 @@
+import React, {useState} from "react";
+import classes from "./TransactionHistoryTable.module.css"
+import moment from "moment-jalaali";
+import {Trans, useTranslation} from "react-i18next";
+import {toast} from "react-hot-toast";
+import Date from "../../../../../../../../../../components/Date/Date";
+import {BN} from "../../../../../../../../../../utils/utils";
+
+
+const TransactionHistoryTable = ({txs, offset}) => {
+ const [openItem, setOpenItem] = useState(false);
+ const {t} = useTranslation();
+
+ const copyAddressToClipboard = (value) => {
+ navigator.clipboard.writeText(value)
+ toast.success(
);
+ }
+
+ const txStatus = (status) => {
+ switch (status) {
+ case 0:
+ return t("orderStatus.NEW");
+ case 1:
+ return t("orderStatus.DONE");
+ case 2:
+ return t("orderStatus.REJECTED");
+ default:
+ return status;
+ }
+ };
+
+
+ let head = (
+
+ {t("row")}
+ {t("date")}
+ {t("time")}
+ {t("TransactionHistory.category")}
+ {t("TransactionHistory.coin")}
+ {t("volume")}
+ {/*{t("details")}*/}
+ {t("description")}
+
+ );
+
+ let body = (
+ <>
+ {txs.map((tr, index) => {
+ return (
+
+
+
+
+
+
+ {index + offset + 1}
+
+
+
+
+
+ {moment(tr.date).format("HH:mm:ss")}
+
+
+ {t('TransactionCategory.'+tr.category)}
+
+
+ {t("currency." + tr.currency )}
+ {/*{tr.currency}*/}
+
+
+ {new BN(tr?.amount).toFormat()}
+
+
+ {(tr?.category === "DEPOSIT" || tr?.category === "WITHDRAW") ? "----" :
+ <>
+ {t('TransactionCategory.'+tr.category)}
+ {tr?.additionalData?.ask && t('sell')} {tr?.additionalData?.bid && t('buy')}
+ {new BN(tr?.additionalData?.origQuantity).toFormat()}
+ {t("currency." + tr?.additionalData?.pair?.leftSideName )}
+ {t("withPrice")}
+ {new BN(tr?.additionalData?.origPrice).toFormat()}
+ {t("currency." + tr?.additionalData?.pair?.rightSideName )}
+ >
+ }
+
+ {/* openItem === index ? setOpenItem(null) : setOpenItem(index)}>
+
+ */}
+
+
+
+ {/*
+ price: {new BN(tr?.additionalData?.origPrice).toFormat()}
+ quantity: {new BN(tr?.additionalData?.origQuantity).toFormat()}
+ Remained Quantity: {new BN(tr?.additionalData?.remainedQuantity).toFormat()}
+ {tr?.additionalData?.pair?.rightSideName}
+ {tr?.additionalData?.pair?.leftSideName}
+ {txStatus(tr?.additionalData?.status)}
+ {tr?.additionalData?.ask && t('ask')} {tr?.additionalData?.bid && t('bid')}
+
*/}
+
+ {t('TransactionCategory.'+tr.category)}
+ {tr?.additionalData?.ask && t('ask')} {tr?.additionalData?.bid && t('bid')}
+ {new BN(tr?.additionalData?.origQuantity).toFormat()}
+ {t("currency." + tr?.additionalData?.pair?.leftSideName )}
+ {t("withPrice")}
+ {new BN(tr?.additionalData?.origPrice).toFormat()}
+ {t("currency." + tr?.additionalData?.pair?.rightSideName )}
+
+
+
+
+
+
+
+
+ )
+ })}
+ >
+ );
+
+
+ return <>
+ {head}
+ {body}
+ >
+}
+
+export default TransactionHistoryTable;
\ No newline at end of file
diff --git a/src/main/Browser/Pages/UserPanel/Sections/Content/components/TransactionHistory/components/TransactionHistoryTable/TransactionHistoryTable.module.css b/src/main/Browser/Pages/UserPanel/Sections/Content/components/TransactionHistory/components/TransactionHistoryTable/TransactionHistoryTable.module.css
new file mode 100644
index 00000000..c6570126
--- /dev/null
+++ b/src/main/Browser/Pages/UserPanel/Sections/Content/components/TransactionHistory/components/TransactionHistoryTable/TransactionHistoryTable.module.css
@@ -0,0 +1,6 @@
+.striped:nth-child(even) {
+ background-color: var(--tableRow);
+ -webkit-transition: background-color 0.4s;
+ -o-transition: background-color 0.4s;
+ transition: background-color 0.4s;
+}
\ No newline at end of file
diff --git a/src/main/Browser/Pages/UserPanel/Sections/Content/components/Wallet/components/DepositWithdraw/components/Deposit/Deposit.js b/src/main/Browser/Pages/UserPanel/Sections/Content/components/Wallet/components/DepositWithdraw/components/Deposit/Deposit.js
index 9ed8ac85..696e850f 100644
--- a/src/main/Browser/Pages/UserPanel/Sections/Content/components/Wallet/components/DepositWithdraw/components/Deposit/Deposit.js
+++ b/src/main/Browser/Pages/UserPanel/Sections/Content/components/Wallet/components/DepositWithdraw/components/Deposit/Deposit.js
@@ -1,16 +1,12 @@
import React, {useEffect, useRef, useState} from "react";
import classes from "../../DepositWithdraw.module.css";
import TextInput from "../../../../../../../../../../../../components/TextInput/TextInput";
-import Icon from "../../../../../../../../../../../../components/Icon/Icon";
import {useParams} from "react-router-dom";
-import {Trans, useTranslation} from "react-i18next";
-import QRCode from "react-qr-code";
-import {toast} from "react-hot-toast";
+import {useTranslation} from "react-i18next";
import Error from "../../../../../../../../../../../../components/Error/Error";
import Loading from "../../../../../../../../../../../../components/Loading/Loading";
-import {useGetCurrencyInfo, useGetDepositAddress} from "../../../../../../../../../../../../queries";
+import {useGetCurrencyInfo} from "../../../../../../../../../../../../queries";
import IRTDeposit from "./components/IRT/IRTDeposit";
-import {BN} from "../../../../../../../../../../../../utils/utils";
import Address from "./components/Address/Address";
const Deposit = () => {
@@ -28,8 +24,6 @@ const Deposit = () => {
}, [id]);
-
-
useEffect(() => {
if (id !== "IRT") {
refetchCI()
@@ -41,8 +35,6 @@ const Deposit = () => {
if (CILoading) return
if (CIError) return
- console.log("currencyInfo?.chains[networkName.value].network", currencyInfo?.chains[networkName?.value]?.network)
-
return (
{
{ currencyInfo && }
-
-
)
}
diff --git a/src/main/Browser/Pages/UserPanel/Sections/Content/components/Wallet/components/DepositWithdraw/components/Deposit/components/Address/Address.js b/src/main/Browser/Pages/UserPanel/Sections/Content/components/Wallet/components/DepositWithdraw/components/Deposit/components/Address/Address.js
index 32921443..3ec5b9e7 100644
--- a/src/main/Browser/Pages/UserPanel/Sections/Content/components/Wallet/components/DepositWithdraw/components/Deposit/components/Address/Address.js
+++ b/src/main/Browser/Pages/UserPanel/Sections/Content/components/Wallet/components/DepositWithdraw/components/Deposit/components/Address/Address.js
@@ -1,26 +1,17 @@
import React, {useEffect, useRef} from 'react';
-import className from '../../../../DepositWithdraw.module.css'
+import classes from '../../../../DepositWithdraw.module.css'
import {useParams} from "react-router-dom";
import {Trans, useTranslation} from "react-i18next";
import {toast} from "react-hot-toast";
import {useGetDepositAddress} from "../../../../../../../../../../../../../../queries";
-import Loading from "../../../../../../../../../../../../../../components/Loading/Loading";
-import Error from "../../../../../../../../../../../../../../components/Error/Error";
import Icon from "../../../../../../../../../../../../../../components/Icon/Icon";
-import classes from "../../../../DepositWithdraw.module.css";
import TextInput from "../../../../../../../../../../../../../../components/TextInput/TextInput";
import QRCode from "react-qr-code";
const Address = ({network}) => {
-
- console.log("network", network)
-
const {id} = useParams();
const {t} = useTranslation();
const addressRef = useRef(null);
-
-
-
const copyToClipboard = () => {
addressRef.current.select();
document.execCommand("copy");
diff --git a/src/main/Browser/Pages/UserPanel/Sections/Content/components/Wallet/components/DepositWithdrawTx/DepositWithdrawTx.js b/src/main/Browser/Pages/UserPanel/Sections/Content/components/Wallet/components/DepositWithdrawTx/DepositWithdrawTx.js
index 670ee5d6..08cc8753 100644
--- a/src/main/Browser/Pages/UserPanel/Sections/Content/components/Wallet/components/DepositWithdrawTx/DepositWithdrawTx.js
+++ b/src/main/Browser/Pages/UserPanel/Sections/Content/components/Wallet/components/DepositWithdrawTx/DepositWithdrawTx.js
@@ -15,9 +15,6 @@ const DepositWithdrawTx = () => {
const {data: deposit, isLoading: depositIsLoading, error: depositError} = useDepositTxs(id);
const {data: withdraw, isLoading: withdrawIsLoading, error: withdrawError} = useWithdrawTxs(id);
- console.log("deposit", deposit)
- console.log("withdraw", withdraw)
-
useLayoutEffect(() => {
if (!deposit || !withdraw) {
return
diff --git a/src/main/Browser/Pages/UserPanel/Sections/Content/components/Wallet/components/DepositWithdrawTx/components/DepositWithdrawTxTables/DepositWithdrawTxTables.js b/src/main/Browser/Pages/UserPanel/Sections/Content/components/Wallet/components/DepositWithdrawTx/components/DepositWithdrawTxTables/DepositWithdrawTxTables.js
index 3af6a511..d1544715 100644
--- a/src/main/Browser/Pages/UserPanel/Sections/Content/components/Wallet/components/DepositWithdrawTx/components/DepositWithdrawTxTables/DepositWithdrawTxTables.js
+++ b/src/main/Browser/Pages/UserPanel/Sections/Content/components/Wallet/components/DepositWithdrawTx/components/DepositWithdrawTxTables/DepositWithdrawTxTables.js
@@ -18,8 +18,6 @@ const DepositWithdrawTxTables = ({txs, id}) => {
/>);
}
- console.log("txs", txs.hasOwnProperty('withdrawOrderId'))
-
const txStatus = (status) => {
switch (status) {
case 0:
diff --git a/src/main/Browser/Pages/UserPanel/Sections/Header/Header.js b/src/main/Browser/Pages/UserPanel/Sections/Header/Header.js
index a588bae4..375dd10b 100644
--- a/src/main/Browser/Pages/UserPanel/Sections/Header/Header.js
+++ b/src/main/Browser/Pages/UserPanel/Sections/Header/Header.js
@@ -24,8 +24,6 @@ const Header = () => {
const lastName = useSelector((state) => state.auth.lastName)
let location = useLocation();
-
-
const logOutHandler = () => {
logout().then(()=>{
toast.success(t("header.logOutSuccess"))
@@ -39,11 +37,12 @@ const Header = () => {
- }/>
}>
+ {t("txHistory.title")}}/>
}/>
}/>
+ }/>
{t("comingSoon")}}/>
diff --git a/src/main/Browser/Pages/UserPanel/Sections/MainMenu/MainMenu.js b/src/main/Browser/Pages/UserPanel/Sections/MainMenu/MainMenu.js
index f642a046..cb76f448 100644
--- a/src/main/Browser/Pages/UserPanel/Sections/MainMenu/MainMenu.js
+++ b/src/main/Browser/Pages/UserPanel/Sections/MainMenu/MainMenu.js
@@ -83,6 +83,23 @@ const MainMenu = () => {
)}`}>
+
+
+ isActive ? classes.selected : undefined
+ }
+ onClick={() => setShowMessages(false)}
+ data-tooltip-id="opex-tooltip"
+ data-tooltip-place="left"
+ data-tooltip-float={true}
+ data-tooltip-html={`
+ ${t(
+ "txHistory.title",
+ )}`}>
+
+
+
{/*
{
const isLogin = useSelector((state) => state.auth.isLogin)
+ const isTxHistoryPage = useMatch(RoutesName.TxHistory)
+ const isTechnicalPage = useMatch(RoutesName.Technical)
+
+ const hasSubMenu = !(isTxHistoryPage || isTechnicalPage);
+
+
return (
- }>
- }/>
-
-
-
-
+ {hasSubMenu &&
}
+
+ {!isTechnicalPage && }
diff --git a/src/main/Browser/Routes/routes.js b/src/main/Browser/Routes/routes.js
index 38fee34b..513db911 100644
--- a/src/main/Browser/Routes/routes.js
+++ b/src/main/Browser/Routes/routes.js
@@ -15,6 +15,11 @@ export const User = "/user";
export const UserVerifyRelative = "verify";
export const UserForgetPasswordRelative = "forget-password";
+export const TxHistory = "/panel/transaction-history";
+export const TxHistoryRelative = "/transaction-history";
+
+
+
export const Wallet = "/panel/wallet";
export const WalletRelative = "/wallet";
export const Technical = "/panel/technical";
diff --git a/src/queries/hooks/useTransactionHistory.js b/src/queries/hooks/useTransactionHistory.js
new file mode 100644
index 00000000..ca61f464
--- /dev/null
+++ b/src/queries/hooks/useTransactionHistory.js
@@ -0,0 +1,23 @@
+import {useQuery} from "@tanstack/react-query";
+import axios from "axios";
+
+export const useTransactionHistory = (user_id, query) => {
+
+ return useQuery(
+ ['allTxHistory', user_id, query.coin, query.category, query.endTime, query.startTime, query.limit, query.offset],
+ () => getWithdrawTxsFunc(user_id, query),
+ {
+ retry: 1,
+ staleTime: 5000,
+ refetchInterval: 10000,
+ });
+}
+
+const getWithdrawTxsFunc = async (user_id, query) => {
+ const {data} = await getTransactionHistory(user_id, query)
+ return data;
+}
+
+const getTransactionHistory = (user_id, query) => {
+ return axios.post(`/wallet/transaction/${user_id}`, query)
+}
diff --git a/yarn.lock b/yarn.lock
index a2d9f9f5..7fde28af 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -10751,6 +10751,7 @@ __metadata:
react-dropzone: ^11.3.1
react-hot-toast: ^2.4.1
react-i18next: ^12.2.2
+ react-multi-date-picker: ^4.3.1
react-number-format: ^4.9.3
react-qr-code: ^2.0.11
react-redux: ^8.0.5
@@ -12202,6 +12203,13 @@ __metadata:
languageName: node
linkType: hard
+"react-date-object@npm:^2.1.5":
+ version: 2.1.7
+ resolution: "react-date-object@npm:2.1.7"
+ checksum: f8e16484a16a56251697b52cb6c78c2aaa89ba33694c5f2032a967a68b70446cdb6ff9f4357e6e2a7ad50d48f1518f7b1b49ed7ca111542a8a32902c080a3c8a
+ languageName: node
+ linkType: hard
+
"react-dev-utils@npm:^12.0.1":
version: 12.0.1
resolution: "react-dev-utils@npm:12.0.1"
@@ -12271,6 +12279,16 @@ __metadata:
languageName: node
linkType: hard
+"react-element-popper@npm:^2.1.6":
+ version: 2.1.6
+ resolution: "react-element-popper@npm:2.1.6"
+ peerDependencies:
+ react: ">=16.8.0"
+ react-dom: ">=16.8.0"
+ checksum: 0140c2f78ea5b4ef92d2711ca66d96513403ffab62063cd3bdfee662d5424ceaf50f08a74da3a5e370b3160b1e345d144afa834f90bea5e06fa23c1682660ac4
+ languageName: node
+ linkType: hard
+
"react-error-overlay@npm:^6.0.11":
version: 6.0.11
resolution: "react-error-overlay@npm:6.0.11"
@@ -12329,6 +12347,19 @@ __metadata:
languageName: node
linkType: hard
+"react-multi-date-picker@npm:^4.3.1":
+ version: 4.3.1
+ resolution: "react-multi-date-picker@npm:4.3.1"
+ dependencies:
+ react-date-object: ^2.1.5
+ react-element-popper: ^2.1.6
+ peerDependencies:
+ react: ">=16.8.0"
+ react-dom: ">=16.8.0"
+ checksum: 1b8352c355dd68be256f503cf02ab1ac059b8479a1bccea1ddfe180e93a028421ad9989bccac58798b2cddf985828f53fe7535e44a395b4c31143886de2c14e0
+ languageName: node
+ linkType: hard
+
"react-number-format@npm:^4.9.3":
version: 4.9.3
resolution: "react-number-format@npm:4.9.3"