From 359fd5374f58955ec41e910d2c94253adf7c4dad Mon Sep 17 00:00:00 2001 From: Ali Beikverdi Date: Sat, 11 May 2024 22:13:16 +0900 Subject: [PATCH 1/5] wallet deposit and withdrawal redirection logic fix based on d/w enabled or disabled --- web/src/containers/Wallet/CurrencyWallet.js | 31 +++++++++++---------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/web/src/containers/Wallet/CurrencyWallet.js b/web/src/containers/Wallet/CurrencyWallet.js index e963cdd18c..70ed489d42 100644 --- a/web/src/containers/Wallet/CurrencyWallet.js +++ b/web/src/containers/Wallet/CurrencyWallet.js @@ -327,20 +327,23 @@ class Wallet extends Component { currency.toUpperCase() )} - - {STRINGS.formatString( - STRINGS['CURRENCY_WALLET.WALLET_DEPOSIT'], - - {currency.toUpperCase()} - , - - here - - )} - + {coins[currency].allow_deposit && coins[currency].allow_withdrawal ? ( + + {STRINGS.formatString( + STRINGS['CURRENCY_WALLET.WALLET_DEPOSIT'], + + {currency.toUpperCase()} + , + + here + + )} + + ) : null + } ) : chartData.length ? ( Date: Tue, 14 May 2024 13:35:18 +0900 Subject: [PATCH 2/5] updated string --- web/package-lock.json | 2 +- web/src/config/lang/de.json | 3 +-- web/src/config/lang/en.json | 2 +- web/src/config/lang/nl.json | 3 +-- web/src/config/lang/pt.json | 3 +-- web/src/config/lang/ur.json | 3 +-- web/yarn.lock | 7 +------ 7 files changed, 7 insertions(+), 16 deletions(-) diff --git a/web/package-lock.json b/web/package-lock.json index 3a40aebdc1..4a7de95ff4 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -1,6 +1,6 @@ { "name": "hollaex-kit", - "version": "2.10.3", + "version": "2.10.4", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/web/src/config/lang/de.json b/web/src/config/lang/de.json index 2e9fae05d0..c1b44efd25 100644 --- a/web/src/config/lang/de.json +++ b/web/src/config/lang/de.json @@ -626,8 +626,7 @@ "INTERNAL": "intern", "BLOCKCHAIN": "Blockchain", "STAKE": "Einsatz", - "REFERRAL": "Verweisung", - "QUICK_TRADE_TOOLTIP": "Order executed through convert system" + "REFERRAL": "Verweisung" }, "ACCOUNT_SECURITY": { "OTP": { diff --git a/web/src/config/lang/en.json b/web/src/config/lang/en.json index b504854bdf..753c26bde9 100644 --- a/web/src/config/lang/en.json +++ b/web/src/config/lang/en.json @@ -609,7 +609,7 @@ "BLOCKCHAIN": "blockchain", "STAKE": "stake", "REFERRAL": "referral", - "QUICK_TRADE_TOOLTIP": "Order executed through convert system" + "QUICK_TRADE_TOOLTIP": "Order executed through OTC" }, "ACCOUNT_SECURITY": { "TITLE_TEXT": "Adjust the security settings for your account. From Two-factor authentication, password, API keys and other security related functions.", diff --git a/web/src/config/lang/nl.json b/web/src/config/lang/nl.json index c051e960dc..57196a0e84 100644 --- a/web/src/config/lang/nl.json +++ b/web/src/config/lang/nl.json @@ -596,8 +596,7 @@ "INTERNAL": "intern", "BLOCKCHAIN": "blockchain", "STAKE": "inzet", - "REFERRAL": "verwijzing", - "QUICK_TRADE_TOOLTIP": "Order executed through convert system" + "REFERRAL": "verwijzing" }, "ACCOUNT_SECURITY": { "TITLE_TEXT": "Pas de beveiligingsinstellingen voor uw account aan. Van tweefactorauthenticatie, wachtwoord, API-sleutels en andere beveiligingsgerelateerde functies.", diff --git a/web/src/config/lang/pt.json b/web/src/config/lang/pt.json index bc65d927db..4fffbe6626 100644 --- a/web/src/config/lang/pt.json +++ b/web/src/config/lang/pt.json @@ -625,8 +625,7 @@ "INTERNAL": "interno", "BLOCKCHAIN": "blockchain", "STAKE": "estaca", - "REFERRAL": "referência", - "QUICK_TRADE_TOOLTIP": "Order executed through convert system" + "REFERRAL": "referência" }, "ACCOUNT_SECURITY": { "TITLE_TEXT": "Ajuste as configurações de segurança para sua conta: autenticação de dois fatores (2FA), senha, chaves API e outras funções relacionadas à segurança.", diff --git a/web/src/config/lang/ur.json b/web/src/config/lang/ur.json index c40d7462b5..9a3fba1478 100644 --- a/web/src/config/lang/ur.json +++ b/web/src/config/lang/ur.json @@ -584,8 +584,7 @@ "INTERNAL": "اندرونی", "BLOCKCHAIN": "بلاکچین", "STAKE": "داؤ", - "REFERRAL": "حوالہ", - "QUICK_TRADE_TOOLTIP": "Order executed through convert system" + "REFERRAL": "حوالہ" }, "ACCOUNT_SECURITY": { "TITLE_TEXT": "اپنے اکاؤنٹ کے لیے سیکیورٹی کی ترتیبات کو ایڈجسٹ کریں۔ دو عنصر کی توثیق، پاس ورڈ، اے پی ای کیز اور سیکیورٹی سے متعلق دیگر افعال سے۔", diff --git a/web/yarn.lock b/web/yarn.lock index 9503caf94b..f4800bb7e9 100644 --- a/web/yarn.lock +++ b/web/yarn.lock @@ -12960,11 +12960,6 @@ react-qr-barcode-scanner@1.0.6: "@zxing/library" "^0.17.0" react-webcam "^5.0.1" -react-recaptcha-v3@2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/react-recaptcha-v3/-/react-recaptcha-v3-2.0.1.tgz" - integrity sha512-ZQ+auotgu+E/6YAbPqk53sf9xgcp8TFvVVfL4bVR7PXj98nQmdaONugdLJEA7g1iTZ4yQqC4mZbcVUGZmwb25Q== - react-redux@^6.0.0, react-redux@6.0.1: version "6.0.1" resolved "https://registry.npmjs.org/react-redux/-/react-redux-6.0.1.tgz" @@ -13143,7 +13138,7 @@ react-with-styles@^3.0.0, react-with-styles@^3.2.0: prop-types "^15.6.2" react-with-direction "^1.3.0" -react@*, "react@^0.14 || ^15 || ^16", "react@^0.14 || ^15.0.0 || ^16.0.0-alpha", "react@^0.14 || ^15.5.4 || ^16.1.1", "react@^0.14 || >=15", "react@^0.14.0 || ^15.0.0 || ^16", "react@^0.14.0 || ^15.0.0 || ^16.0.0", "react@^0.14.0 || ^15.0.0-0 || ^16.0.0", "react@^0.14.0 || ^15.0.0-rc || ^16.0.0-rc || ^16.0.0", "react@^0.14.0 || ^15.0.1 || ^16.0.0 || ^17.0.0", "react@^15.0.0-0 || ^16.0.0-0 || ^17.0.0-0", "react@^15.3.0 || ^16.0.0", "react@^15.5.3 || ^16.0.0", "react@^15.5.4 || ^16.0.0 || ^17.0.0", "react@^15.6.0 || ^16.0.0", "react@^15.6.2 || ^16.0", "react@^15.6.2 || ^16.x", react@^16.0.0, react@^16.13.1, react@^16.3.0, "react@^16.3.0 || ^17.0.0", react@^16.4.0, react@^16.4.0-0, react@^16.8.0, "react@>= 16.3", "react@>= 16.3.0", react@>=0.14, react@>=0.14.0, react@>=15, react@>=15.0.0, react@>=15.3.0, react@>=15.4, react@>=15.x, react@>=16.0.0, react@>=16.3.0, react@>=16.6.0, react@>=16.8.0, react@>=16.9, react@>=16.9.0, "react@0.13.x || 0.14.x || ^15.0.0-0 || 15.x.x || ^16.0.0-0 || ^16.x.x", react@16.13.1, react@16.x: +react@*, "react@^0.14 || ^15 || ^16", "react@^0.14 || ^15.0.0 || ^16.0.0-alpha", "react@^0.14 || ^15.5.4 || ^16.1.1", "react@^0.14 || >=15", "react@^0.14.0 || ^15.0.0 || ^16", "react@^0.14.0 || ^15.0.0 || ^16.0.0", "react@^0.14.0 || ^15.0.0-0 || ^16.0.0", "react@^0.14.0 || ^15.0.0-rc || ^16.0.0-rc || ^16.0.0", "react@^0.14.0 || ^15.0.1 || ^16.0.0 || ^17.0.0", "react@^15.0.0-0 || ^16.0.0-0 || ^17.0.0-0", "react@^15.3.0 || ^16.0.0", "react@^15.5.3 || ^16.0.0", "react@^15.5.4 || ^16.0.0 || ^17.0.0", "react@^15.6.0 || ^16.0.0", "react@^15.6.2 || ^16.0", react@^16.0.0, react@^16.13.1, react@^16.3.0, "react@^16.3.0 || ^17.0.0", react@^16.4.0, react@^16.4.0-0, react@^16.8.0, "react@>= 16.3", "react@>= 16.3.0", react@>=0.14, react@>=0.14.0, react@>=15, react@>=15.0.0, react@>=15.3.0, react@>=15.4, react@>=15.x, react@>=16.0.0, react@>=16.3.0, react@>=16.6.0, react@>=16.8.0, react@>=16.9, react@>=16.9.0, "react@0.13.x || 0.14.x || ^15.0.0-0 || 15.x.x || ^16.0.0-0 || ^16.x.x", react@16.13.1, react@16.x: version "16.13.1" resolved "https://registry.npmjs.org/react/-/react-16.13.1.tgz" integrity sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w== From a6c8ae544caa91b11caccf7feaa8d7d8b79ee39d Mon Sep 17 00:00:00 2001 From: fetok12 Date: Tue, 14 May 2024 12:24:29 +0300 Subject: [PATCH 3/5] init-captcha-in-kit --- web/package.json | 1 + web/src/components/ConfigProvider/index.js | 12 +++++++++++- web/src/config/constants.js | 3 +++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/web/package.json b/web/package.json index 5cc72a85de..c1296cdbc1 100644 --- a/web/package.json +++ b/web/package.json @@ -63,6 +63,7 @@ "react-modal": "3.8.1", "react-moment": "0.9.2", "react-qr-barcode-scanner": "1.0.6", + "react-recaptcha-v3": "^2.0.1", "react-redux": "6.0.1", "react-router": "3.2.1", "react-sortable-hoc": "1.10.1", diff --git a/web/src/components/ConfigProvider/index.js b/web/src/components/ConfigProvider/index.js index 27be6d1a7c..ac852b13ad 100644 --- a/web/src/components/ConfigProvider/index.js +++ b/web/src/components/ConfigProvider/index.js @@ -2,6 +2,8 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import { getIconByKey, generateAllIcons, addDefaultLogo } from 'utils/icon'; import { calculateThemes } from 'utils/color'; +import { loadReCaptcha } from 'react-recaptcha-v3'; +import { DEFAULT_CAPTCHA_SITEKEY } from 'config/constants'; import merge from 'lodash.merge'; export const ProjectConfig = React.createContext('appConfig'); @@ -37,7 +39,15 @@ class ConfigProvider extends Component { sections, }; } - + componentDidMount() { + const { + initialConfig: { captcha = {} }, + } = this.props; + + // ReCaptcha Initialization + const siteKey = captcha.site_key || DEFAULT_CAPTCHA_SITEKEY; + loadReCaptcha(siteKey, () => {}); + } UNSAFE_componentWillUpdate(_, nextState) { const { color, icons } = this.state; if (JSON.stringify(color) !== JSON.stringify(nextState.color)) { diff --git a/web/src/config/constants.js b/web/src/config/constants.js index ef887c41b9..e00c370011 100644 --- a/web/src/config/constants.js +++ b/web/src/config/constants.js @@ -197,6 +197,9 @@ export const EXPLORERS_ENDPOINT = (currency) => { export const BALANCE_ERROR = 'Insufficient balance to perform the order'; +export const DEFAULT_CAPTCHA_SITEKEY = + '6LeuOKoUAAAAAGVoZcSWXJH60GHt4crvIaNXn1YA'; // default recaptcha v3; // default recaptcha v3 + export const TIME_ZONE = process.env.REACT_APP_TIMEZONE || 'GMT'; export const TOKEN_EMAIL = 'token::email'; export const TOKEN_MAX_AGE = 23 * 60 * 60; From 9ec93bc8b76983409b92c4b78a1a1f862a5dc423 Mon Sep 17 00:00:00 2001 From: fetok12 Date: Tue, 14 May 2024 12:25:01 +0300 Subject: [PATCH 4/5] init-captcha-in-kit --- web/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/package.json b/web/package.json index c1296cdbc1..941b9ac0a3 100644 --- a/web/package.json +++ b/web/package.json @@ -63,7 +63,7 @@ "react-modal": "3.8.1", "react-moment": "0.9.2", "react-qr-barcode-scanner": "1.0.6", - "react-recaptcha-v3": "^2.0.1", + "react-recaptcha-v3": "2.0.1", "react-redux": "6.0.1", "react-router": "3.2.1", "react-sortable-hoc": "1.10.1", From e19009df09454d63a8656dcc333003fbb5ba7c2f Mon Sep 17 00:00:00 2001 From: fetok12 Date: Tue, 14 May 2024 12:36:05 +0300 Subject: [PATCH 5/5] init-captcha-in-kit --- web/package.json | 1 - web/src/components/ConfigProvider/index.js | 13 +++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/web/package.json b/web/package.json index 941b9ac0a3..5cc72a85de 100644 --- a/web/package.json +++ b/web/package.json @@ -63,7 +63,6 @@ "react-modal": "3.8.1", "react-moment": "0.9.2", "react-qr-barcode-scanner": "1.0.6", - "react-recaptcha-v3": "2.0.1", "react-redux": "6.0.1", "react-router": "3.2.1", "react-sortable-hoc": "1.10.1", diff --git a/web/src/components/ConfigProvider/index.js b/web/src/components/ConfigProvider/index.js index ac852b13ad..fab12f0f5a 100644 --- a/web/src/components/ConfigProvider/index.js +++ b/web/src/components/ConfigProvider/index.js @@ -2,7 +2,6 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import { getIconByKey, generateAllIcons, addDefaultLogo } from 'utils/icon'; import { calculateThemes } from 'utils/color'; -import { loadReCaptcha } from 'react-recaptcha-v3'; import { DEFAULT_CAPTCHA_SITEKEY } from 'config/constants'; import merge from 'lodash.merge'; @@ -40,14 +39,12 @@ class ConfigProvider extends Component { }; } componentDidMount() { - const { - initialConfig: { captcha = {} }, - } = this.props; - - // ReCaptcha Initialization - const siteKey = captcha.site_key || DEFAULT_CAPTCHA_SITEKEY; - loadReCaptcha(siteKey, () => {}); + const script = document.createElement('script'); + script.src = `https://www.google.com/recaptcha/api.js?render=${DEFAULT_CAPTCHA_SITEKEY}`; + document.body.appendChild(script); + } + UNSAFE_componentWillUpdate(_, nextState) { const { color, icons } = this.state; if (JSON.stringify(color) !== JSON.stringify(nextState.color)) {