diff --git a/package.json b/package.json
index 446bfbf..55df6dd 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "opex",
- "version": "v1.0.0-beta.2",
+ "version": "v1.0.0-beta.3",
"homepage": "",
"private": true,
"dependencies": {
@@ -11,6 +11,7 @@
"@testing-library/user-event": "^12.7.4",
"axios": "^0.27.2",
"bignumber.js": "^9.0.1",
+ "buffer": "^6.0.3",
"faker": "^5.4.0",
"i18next": "^21.8.0",
"i18next-browser-languagedetector": "^6.1.4",
diff --git a/public/assets/locales/en/translation.json b/public/assets/locales/en/translation.json
index f56ebd6..1389821 100644
--- a/public/assets/locales/en/translation.json
+++ b/public/assets/locales/en/translation.json
@@ -69,7 +69,8 @@
"LTC": "LTC",
"TBNB": "TBUSD",
"TBUSD": "TBUSD",
- "BCH": "BCH"
+ "BCH": "BCH",
+ "TRX": "TRX"
},
"marketInterval": {
"24h": "24 hours",
@@ -250,7 +251,7 @@
"DepositTETHContentBefore": "Ropsten network ETH test Only accepted! For free download",
"DepositTETHContentAfter": "go to send a test ETH to this address. You must change your wallet Etherium network to Ropsten. This network is on the Metamask wallet network list by default. Any transaction with an amount equal to or greater than 0.001 ETH to the above address will be added to your account.",
"minDeposit": "The minimum acceptable amount {{min}} {{currency}}",
- "minDepositText": "Any transaction with a value greater than {{min}} {{currency}} will be added to your account at the following address.",
+ "minDepositText": "Any transaction will be added to your account at the following address.",
"DepositTBTCContentBefore": "Only BTC test accepted! For free download",
"DepositTBTCContentAfter": "go to any transaction with an amount equal to or greater than 0.001 BTC to the above address will be added to your account.",
"DepositTUSDTContentBefore": "Only USDT Ropsten Network Test is accepted! To learn how to get free,",
@@ -258,7 +259,9 @@
"depositTime": "* Your balance will increase {{time}} minutes after depositing to the above address.",
"securityConsiderations": "Due to security considerations, the transfer to the account may be delayed slightly. You can see the withdrawal status on the same page in the Deposit / Withdrawal Transactions section.",
"network": "Network",
- "selectNetwork": "Select Network"
+ "selectNetwork": "Select Network",
+ "gettingAddress": "Getting address...",
+ "errorGettingAddress": "Failed to get address"
},
"CallbackPage": {
"ok": "The deposit was successful.",
diff --git a/public/assets/locales/fa/translation.json b/public/assets/locales/fa/translation.json
index 9a36380..e68c379 100644
--- a/public/assets/locales/fa/translation.json
+++ b/public/assets/locales/fa/translation.json
@@ -69,7 +69,8 @@
"LTC": "لایت کوین",
"TBNB": "بایننس (ت)",
"TBUSD": "دلار بایننس(ت)",
- "BCH": "بیتکوین کش"
+ "BCH": "بیتکوین کش",
+ "TRX": "ترون"
},
"marketInterval": {
"24h": "24 ساعت",
@@ -250,7 +251,7 @@
"DepositTETHContentBefore": "فقط ETH تستی شبکه Ropsten مورد قبول قرار می گیرد! برای دریافت رایگان به ",
"DepositTETHContentAfter": " بروید. برای ارسال ETH تستی به این آدرس، باید شبکه اتریومی کیف پول خود را به Ropsten تغییر دهید. این شبکه به طور پیش فرض در فهرست شبکه های کیف پول Metamask وجود دارد. هر تراکنشی با مقدار مساوی یا بیشتر از ۰.۰۰۱ ETH به آدرس بالا، به حساب شما افزوده می شود.",
"minDeposit": "حداقل میزان قابل قبول {{min}} {{currency}}",
- "minDepositText": "هر تراکنشی با مقدار بیشتر از {{min}} {{currency}} به آدرس زیر ، به حساب شما افزوده می شود.",
+ "minDepositText": "هر تراکنشی به آدرس زیر ، به حساب شما افزوده می شود.",
"DepositTBTCContentBefore": "فقط BTC تستی مورد قبول قرار می گیرد! برای دریافت رایگان به ",
"DepositTBTCContentAfter": " بروید. هر تراکنشی با مقدار مساوی یا بیشتر از ۰.۰۰۱ BTC به آدرس بالا، به حساب شما افزوده می شود.",
"DepositTUSDTContentBefore": "فقط USDT تستی شبکه Ropsten مورد قبول قرار می گیرد! برای آشنایی با روش دریافت رایگان به ",
@@ -258,7 +259,9 @@
"depositTime": "* موجودی شما {{time}} دقیقه بعد از واریز به آدرس بالا، افزایش پیدا می کند.",
"securityConsiderations": "باتوجه به ملاحظات امنیتی ممکن است انتقال به حساب با کمی تاخیر صورت بگیرد. می توانید وضعیت برداشت را در همین صفحه از بخش ترکنش های واریز/برداشت ببینید.",
"network": "شبکه",
- "selectNetwork": " شبکه را انتخاب کنید"
+ "selectNetwork": " شبکه را انتخاب کنید",
+ "gettingAddress": "درحال گرفتن آدرس...",
+ "errorGettingAddress": "خطا در گرفتن آدرس"
},
"CallbackPage": {
"ok": "واریز وجه با موفقیت انجام شد.",
diff --git a/public/index.html b/public/index.html
index 340f4f8..0048c8d 100644
--- a/public/index.html
+++ b/public/index.html
@@ -5,7 +5,7 @@
-
+
@@ -32,7 +32,6 @@
-
%REACT_APP_TITLE%
diff --git a/src/assets/images.js b/src/assets/images.js
index 6301795..142659b 100644
--- a/src/assets/images.js
+++ b/src/assets/images.js
@@ -16,6 +16,8 @@ import litecoin from "./images/src/litecoin.svg";
import tether from "./images/src/tether.svg";
import binance from "./images/src/binance.svg";
import binanceUSD from "./images/src/binanceUSD.svg";
+import tron from "./images/src/tron.svg";
+import testTron from "./images/src/testTron.svg";
import ethereumLight from "./images/src/ethereumLight.svg";
import toman from "./images/src/toman.svg";
import spaceStar from "./images/src/spaceStar.png";
@@ -58,6 +60,8 @@ export const images = {
USDT: tether,
BNB: binance,
BUSD: binanceUSD,
+ TRX: tron,
+ TTRX: testTron,
ETH: ethereumLight,
IRT: toman,
spaceStar: spaceStar,
diff --git a/src/assets/images/src/testTron.svg b/src/assets/images/src/testTron.svg
new file mode 100644
index 0000000..45fae3c
--- /dev/null
+++ b/src/assets/images/src/testTron.svg
@@ -0,0 +1,19 @@
+
+
+
diff --git a/src/assets/images/src/tron.svg b/src/assets/images/src/tron.svg
new file mode 100644
index 0000000..e760e63
--- /dev/null
+++ b/src/assets/images/src/tron.svg
@@ -0,0 +1,19 @@
+
+
+
diff --git a/src/components/TextInput/TextInput.js b/src/components/TextInput/TextInput.js
index 3e1c905..bde379c 100644
--- a/src/components/TextInput/TextInput.js
+++ b/src/components/TextInput/TextInput.js
@@ -27,7 +27,7 @@ const TextInput = (props) => {
onChange={onchange}
options={options}
classNamePrefix="select"
- className={`select ${classes.selectBox}`}
+ className={`${classes.selectBox} select`}
{...other}
/>
}
diff --git a/src/index.js b/src/index.js
index 4bbcb59..aa869bd 100644
--- a/src/index.js
+++ b/src/index.js
@@ -28,8 +28,9 @@ const rootReducer = combineReducers({
//add custom title & meta
const meta = document.getElementsByTagName('meta')
-document.title = window.env.REACT_APP_TITLE;
-meta.description.content = window.env.REACT_APP_DESCRIPTION_CONTENT
+document.title = window.env.REACT_APP_TITLE ? window.env.REACT_APP_TITLE : " ";
+meta.description.content = window.env.REACT_APP_DESCRIPTION_CONTENT ? window.env.REACT_APP_DESCRIPTION_CONTENT : " "
+
/**
* Base URL of the website.
diff --git a/src/main/Mobile/Pages/Login/components/ForgetPassword/ForgetPassword.js b/src/main/Mobile/Pages/Login/components/ForgetPassword/ForgetPassword.js
index 5ee46d5..dace50e 100644
--- a/src/main/Mobile/Pages/Login/components/ForgetPassword/ForgetPassword.js
+++ b/src/main/Mobile/Pages/Login/components/ForgetPassword/ForgetPassword.js
@@ -9,6 +9,7 @@ import ReactTooltip from "react-tooltip";
import Icon from "../../../../../../components/Icon/Icon";
import {images} from "../../../../../../assets/images";
import {validateEmail} from "../../../../../../utils/utils";
+import {Buffer} from 'buffer';
const ForgetPassword = ({returnFunc}) => {
const [loading, setLoading] = useState(false);
diff --git a/src/main/Mobile/Pages/Login/components/RegisterForm/RegisterForm.js b/src/main/Mobile/Pages/Login/components/RegisterForm/RegisterForm.js
index ff88131..d1347ce 100644
--- a/src/main/Mobile/Pages/Login/components/RegisterForm/RegisterForm.js
+++ b/src/main/Mobile/Pages/Login/components/RegisterForm/RegisterForm.js
@@ -9,6 +9,7 @@ import Button from "../../../../../../components/Button/Button";
import Icon from "../../../../../../components/Icon/Icon";
import {images} from "../../../../../../assets/images";
import ReactTooltip from "react-tooltip";
+import {Buffer} from 'buffer';
const RegisterForm = () => {
const {t} = useTranslation();
@@ -176,7 +177,7 @@ const RegisterForm = () => {
if (captcha.image.value === undefined) {
return {t('captchaAnswer')}
}
- return
+ return
}
return (
diff --git a/src/main/Mobile/Pages/UserPanel/Secttions/Content/components/Wallet/components/Deposit/Deposit.js b/src/main/Mobile/Pages/UserPanel/Secttions/Content/components/Wallet/components/Deposit/Deposit.js
index dbe4eaa..428b6bf 100644
--- a/src/main/Mobile/Pages/UserPanel/Secttions/Content/components/Wallet/components/Deposit/Deposit.js
+++ b/src/main/Mobile/Pages/UserPanel/Secttions/Content/components/Wallet/components/Deposit/Deposit.js
@@ -1,129 +1,42 @@
-import React, {useEffect, useRef} from 'react';
+import React, {useEffect, useRef, useState} from 'react';
import classes from './Deposit.module.css'
import QRCode from "react-qr-code";
import {Trans, useTranslation} from "react-i18next";
import TextInput from "../../../../../../../../../../components/TextInput/TextInput";
import {useParams} from "react-router-dom";
-import {useGetDepositAddress} from "../../../../../../../../../../queries";
+import {useGetCurrencyInfo, useGetDepositAddress} from "../../../../../../../../../../queries";
import {toast} from "react-hot-toast";
import Loading from "../../../../../../../../../../components/Loading/Loading";
import Error from "../../../../../../../../../../components/Error/Error";
import Icon from "../../../../../../../../../../components/Icon/Icon";
+import Address from "./components/Address/Address";
const Deposit = () => {
const {id} = useParams();
const {t} = useTranslation();
- const addressRef = useRef(null);
useEffect(() => {
toast.dismiss()
}, [])
- const copyToClipboard = () => {
- addressRef.current.select();
- document.execCommand("copy");
- toast.success();
- };
+ const [networkName, setNetworkName] = useState({value: 0, error: []});
- const {data: address, isLoading, error, refetch} = useGetDepositAddress(id)
+ const selectRef = useRef()
+ const {data: currencyInfo, isLoading: CILoading, error: CIError, refetch: refetchCI} = useGetCurrencyInfo(id)
useEffect(() => {
- if (id !== "IRT") refetch()
+ setNetworkName({value: 0, error: []})
+
}, [id]);
- const helpText = () => {
- if (id === "TETH") {
- return