Skip to content

Commit

Permalink
Merge pull request #2806 from hollaex/beta
Browse files Browse the repository at this point in the history
Beta
  • Loading branch information
abeikverdi authored May 16, 2024
2 parents 9f763b2 + 7f56d7e commit ccc0c41
Show file tree
Hide file tree
Showing 21 changed files with 92 additions and 64 deletions.
2 changes: 1 addition & 1 deletion server/api/swagger/swagger.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const definition = {
swagger: '2.0',
info: {
title: 'HollaEx Kit',
version: '2.10.3'
version: '2.10.4'
},
host: 'api.hollaex.com',
basePath: '/v2',
Expand Down
2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.10.3",
"version": "2.10.4",
"private": false,
"description": "HollaEx Kit",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.10.3
2.10.4
2 changes: 1 addition & 1 deletion web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hollaex-kit",
"version": "2.10.3",
"version": "2.10.4",
"private": true,
"dependencies": {
"@ant-design/compatible": "1.0.5",
Expand Down
9 changes: 8 additions & 1 deletion web/src/components/ConfigProvider/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { Component } from 'react';
import { connect } from 'react-redux';
import { getIconByKey, generateAllIcons, addDefaultLogo } from 'utils/icon';
import { calculateThemes } from 'utils/color';
import { DEFAULT_CAPTCHA_SITEKEY } from 'config/constants';
import merge from 'lodash.merge';

export const ProjectConfig = React.createContext('appConfig');
Expand Down Expand Up @@ -37,7 +38,13 @@ class ConfigProvider extends Component {
sections,
};
}

componentDidMount() {
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)) {
Expand Down
3 changes: 3 additions & 0 deletions web/src/config/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions web/src/config/lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion web/src/config/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
3 changes: 1 addition & 2 deletions web/src/config/lang/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
3 changes: 1 addition & 2 deletions web/src/config/lang/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
3 changes: 1 addition & 2 deletions web/src/config/lang/ur.json
Original file line number Diff line number Diff line change
Expand Up @@ -584,8 +584,7 @@
"INTERNAL": "اندرونی",
"BLOCKCHAIN": "بلاکچین",
"STAKE": "داؤ",
"REFERRAL": "حوالہ",
"QUICK_TRADE_TOOLTIP": "Order executed through convert system"
"REFERRAL": "حوالہ"
},
"ACCOUNT_SECURITY": {
"TITLE_TEXT": "اپنے اکاؤنٹ کے لیے سیکیورٹی کی ترتیبات کو ایڈجسٹ کریں۔ دو عنصر کی توثیق، پاس ورڈ، اے پی ای کیز اور سیکیورٹی سے متعلق دیگر افعال سے۔",
Expand Down
2 changes: 1 addition & 1 deletion web/src/containers/Deposit/Fiat/DepositForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const generateFormValues = (

let { rate: fee } = getFiatDepositFee(symbol);
const customFee = fiat_fees?.[symbol]?.deposit_fee;
const limit = getFiatDepositLimit();
const limit = getFiatDepositLimit(symbol);

const MIN = math.max(fee, min);
const MAX = limit && math.larger(limit, 0) ? math.min(limit, max) : max;
Expand Down
2 changes: 1 addition & 1 deletion web/src/containers/Deposit/Fiat/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ const Form = ({
const { type } = tabs[activeTab] || {};
const isManual = type === 'manual';
const { rate: fee } = getFiatDepositFee(currency);
const limit = getFiatDepositLimit();
const limit = getFiatDepositLimit(currency);

const { min, max, display_name } = coins[currency] || DEFAULT_COIN_DATA;

Expand Down
28 changes: 20 additions & 8 deletions web/src/containers/Deposit/Fiat/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,36 @@ export const getFiatWithdrawalFee = (currency, amount = 0, network) =>
export const getFiatDepositFee = (currency, amount = 0, network) =>
getFiatFee(currency, amount, network, DEPOSIT_FEES_KEY);

export const getFiatLimit = (type) => {
export const getFiatLimit = (type, currency) => {
const transactionType =
type === WITHDRAWAL_LIMIT_KEY ? 'withdrawal' : 'deposit';
const {
app: { transaction_limits },
user: { verification_level },
} = store.getState();

return (
transaction_limits?.find(
(limit) =>
limit.tier === verification_level && limit.type === transactionType
)?.amount || 0
const independentLimit = transaction_limits?.find(
(limit) =>
limit.limit_currency === currency &&
limit.tier === verification_level &&
limit.type === transactionType
);
const defaultLimit = transaction_limits?.find(
(limit) =>
limit.limit_currency === 'default' &&
limit.tier === verification_level &&
limit.type === transactionType
);

const limit = independentLimit || defaultLimit;

return limit?.amount || 0;
};

export const getFiatWithdrawalLimit = () => getFiatLimit(WITHDRAWAL_LIMIT_KEY);
export const getFiatDepositLimit = () => getFiatLimit(DEPOSIT_LIMIT_KEY);
export const getFiatWithdrawalLimit = (symbol) =>
getFiatLimit(WITHDRAWAL_LIMIT_KEY, symbol);
export const getFiatDepositLimit = (symbol) =>
getFiatLimit(DEPOSIT_LIMIT_KEY, symbol);

export const getOnramp = (state, ownProps) =>
state.app.onramp[ownProps.currency][ownProps.method];
Expand Down
40 changes: 26 additions & 14 deletions web/src/containers/DigitalAssets/components/AssetsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const AssetsList = ({
icons,
}) => {
const [isOndDaySort, setIsOneDaySort] = useState(false);
let listData = [];
const handleClickChange = () => {
setIsOneDaySort(false);
if (mode === SORT.CHANGESEVENDAY) {
Expand Down Expand Up @@ -88,21 +89,32 @@ const AssetsList = ({
};

const getSortedList = () => {
return movePinnedItems(
coinsListData.sort((a, b) => {
const aVal = parseFloat(
isOndDaySort
? a.oneDayPriceDifferencePercenVal
: a.priceDifferencePercentVal
);
const bVal = parseFloat(
isOndDaySort
? b.oneDayPriceDifferencePercenVal
: b.priceDifferencePercentVal
);
return is_descending ? bVal - aVal : aVal - bVal;
})
const topAssets = [];

pinned_assets.forEach((pin) => {
const asset = coinsListData.find(({ symbol }) => symbol === pin);
if (asset) {
topAssets.push(asset);
}
});
const restAssets = coinsListData.filter(
(item) => !pinned_assets.includes(item.symbol)
);
const sortedValues = restAssets.sort((a, b) => {
const aVal = parseFloat(
isOndDaySort
? a.oneDayPriceDifferencePercenVal
: a.priceDifferencePercentVal
);
const bVal = parseFloat(
isOndDaySort
? b.oneDayPriceDifferencePercenVal
: b.priceDifferencePercentVal
);
return is_descending ? bVal - aVal : aVal - bVal;
});
listData = [...topAssets, ...sortedValues];
return movePinnedItems(listData);
};

const totalPages = Math.ceil(count / pageSize);
Expand Down
4 changes: 2 additions & 2 deletions web/src/containers/UserSecurity/OTP.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,8 @@ export const OTP = ({
/>
)}
<span className="font-weight-bold mb-3">
<EditWrapper stringId="ACCOUNT_SECURITY.OTP.2FA_DISABLED">
{STRINGS['ACCOUNT_SECURITY.OTP.2FA_DISABLED']}
<EditWrapper stringId="ACCOUNT_SECURITY.OTP.2FA_ENABLED">
{STRINGS['ACCOUNT_SECURITY.OTP.2FA_ENABLED']}
</EditWrapper>
</span>
<span className="text-center d-flex flex-column">
Expand Down
31 changes: 17 additions & 14 deletions web/src/containers/Wallet/CurrencyWallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,20 +327,23 @@ class Wallet extends Component {
currency.toUpperCase()
)}
</EditWrapper>
<EditWrapper stringId="CURRENCY_WALLET.WALLET_DEPOSIT">
{STRINGS.formatString(
STRINGS['CURRENCY_WALLET.WALLET_DEPOSIT'],
<Link
className="deposit-link"
to={`/wallet/${currency}/withdraw`}
>
{currency.toUpperCase()}
</Link>,
<Link className="buy-link" to={`/prices/coin/${currency}`}>
here
</Link>
)}
</EditWrapper>
{coins[currency].allow_deposit && coins[currency].allow_withdrawal ? (
<EditWrapper stringId="CURRENCY_WALLET.WALLET_DEPOSIT">
{STRINGS.formatString(
STRINGS['CURRENCY_WALLET.WALLET_DEPOSIT'],
<Link
className="deposit-link"
to={`/wallet/${currency}/withdraw`}
>
{currency.toUpperCase()}
</Link>,
<Link className="buy-link" to={`/prices/coin/${currency}`}>
here
</Link>
)}
</EditWrapper>
) : null
}
</React.Fragment>
) : chartData.length ? (
<DonutChart
Expand Down
4 changes: 2 additions & 2 deletions web/src/containers/Wallet/MainWallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class Wallet extends Component {
pairs,
total,
oraclePrices,
{ features: { stake_page = false } = {} } = {},
{ features: { stake_page = false, cefi_stake = false } = {} } = {},
contracts = {},
isFetching,
assets
Expand Down Expand Up @@ -231,7 +231,7 @@ class Wallet extends Component {
},
];

if (stake_page) {
if (stake_page || cefi_stake) {
mobileTabs.push({
title: STRINGS['ACCOUNTS.TAB_STAKE'],
content: <Stake />,
Expand Down
2 changes: 1 addition & 1 deletion web/src/containers/Withdraw/Fiat/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class Form extends Component {
const { icons: ICONS, activeTheme, activeLanguage, constants } = this.props;
const balanceAvailable = balance[`${currency}_available`];

const withdrawal_limit = getFiatWithdrawalLimit(verification_level);
const withdrawal_limit = getFiatWithdrawalLimit(currency);
const { rate: withdrawal_fee } = getFiatWithdrawalFee(currency);

const formValues = generateFormValues(
Expand Down
7 changes: 1 addition & 6 deletions web/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12960,11 +12960,6 @@ [email protected]:
"@zxing/library" "^0.17.0"
react-webcam "^5.0.1"

[email protected]:
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, [email protected]:
version "6.0.1"
resolved "https://registry.npmjs.org/react-redux/-/react-redux-6.0.1.tgz"
Expand Down Expand Up @@ -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, "[email protected] || 0.14.x || ^15.0.0-0 || 15.x.x || ^16.0.0-0 || ^16.x.x", [email protected], [email protected]:
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, "[email protected] || 0.14.x || ^15.0.0-0 || 15.x.x || ^16.0.0-0 || ^16.x.x", [email protected], [email protected]:
version "16.13.1"
resolved "https://registry.npmjs.org/react/-/react-16.13.1.tgz"
integrity sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w==
Expand Down

0 comments on commit ccc0c41

Please sign in to comment.