From 3e9f05fd3a26da98b88a1b410dd46e5093ca108a Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Fri, 26 May 2023 19:57:21 +0900 Subject: [PATCH 1/9] GZIP configuration --- templates/local/nginx/nginx.conf | 8 ++++++++ version | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/templates/local/nginx/nginx.conf b/templates/local/nginx/nginx.conf index 0345f411da..d11e876781 100644 --- a/templates/local/nginx/nginx.conf +++ b/templates/local/nginx/nginx.conf @@ -10,6 +10,14 @@ events { } http { + gzip on; + gzip_comp_level 6; + gzip_min_length 500; + gzip_buffers 16 8k; + gzip_proxied any; + gzip_vary on; + gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/rss+xml text/javascript image/svg+xml application/vnd.ms-fo + include /etc/nginx/mime.types; include /etc/nginx/proxy.conf; include /etc/nginx/conf.d/upstream*.conf; diff --git a/version b/version index bd4053bfb1..e46a05b196 100644 --- a/version +++ b/version @@ -1 +1 @@ -2.6.3 \ No newline at end of file +2.6.4 \ No newline at end of file From d24f74c18fc7ff06455059bcbd0fe832daba4ed9 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Sat, 27 May 2023 10:55:15 +0900 Subject: [PATCH 2/9] Update version --- version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version b/version index e46a05b196..bd4053bfb1 100644 --- a/version +++ b/version @@ -1 +1 @@ -2.6.4 \ No newline at end of file +2.6.3 \ No newline at end of file From 07c83c6f06c1e0d915fa05357a25257f85f39ab5 Mon Sep 17 00:00:00 2001 From: ram Date: Mon, 29 May 2023 20:12:30 +0530 Subject: [PATCH 3/9] Updated logic in the Exchange API for add/remove the coins/pairs in the Asset of operator control. --- web/src/containers/Admin/AdminFinancials/Assets.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/web/src/containers/Admin/AdminFinancials/Assets.js b/web/src/containers/Admin/AdminFinancials/Assets.js index 44f0c98471..e786b280fb 100644 --- a/web/src/containers/Admin/AdminFinancials/Assets.js +++ b/web/src/containers/Admin/AdminFinancials/Assets.js @@ -523,17 +523,23 @@ class Assets extends Component { handleDelete = async (symbol) => { const { coins, exchange } = this.state; this.setState({ submitting: true }); + const pairedCoins = exchange.pairs.filter((data) => { + let pairData = data.split('-'); + return pairData[0] === symbol || pairData[1] === symbol; + }); try { let formProps = { id: exchange.id, coins: coins .filter((data) => data.symbol !== symbol) .map((data) => data.symbol), - pairs: exchange.pairs.filter((data) => { + }; + if (pairedCoins.length) { + formProps.pairs = exchange.pairs.filter((data) => { let pairData = data.split('-'); return pairData[0] !== symbol && pairData[1] !== symbol; - }), - }; + }); + } await updateExchange(formProps); await this.getMyExchange(); await this.getCoins(); From a5a990260252c2dc58ca720e27fce5b5910977cc Mon Sep 17 00:00:00 2001 From: Ali Beikverdi Date: Sun, 4 Jun 2023 14:31:10 +0900 Subject: [PATCH 4/9] admin transaction format is removed --- web/src/containers/Admin/Deposits/utils.js | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/web/src/containers/Admin/Deposits/utils.js b/web/src/containers/Admin/Deposits/utils.js index 1d0c6e6b53..53b9da7d26 100644 --- a/web/src/containers/Admin/Deposits/utils.js +++ b/web/src/containers/Admin/Deposits/utils.js @@ -9,7 +9,6 @@ import { import { Button, Tooltip } from 'antd'; import { Link } from 'react-router'; import { isSupport } from 'utils/token'; -import { formatCurrencyByIncrementalUnit } from 'utils/currency'; import { formatDate } from 'utils'; /*export const renderBoolean = (value) => ( @@ -234,20 +233,10 @@ export const renderRowContent = ({ return (
- Amount:{' '} - {formatCurrencyByIncrementalUnit( - amount, - coins?.[currency?.toLocaleLowerCase()]?.increment_unit - )}{' '} - {currency} + Amount: {amount} {currency}
- Fee:{' '} - {formatCurrencyByIncrementalUnit( - fee, - coins?.[fee_coin?.toLocaleLowerCase()]?.increment_unit - )}{' '} - {fee_coin} + Fee: {fee} {fee_coin}
{address &&
Address: {address}
}
Timestamp: {formatDate(created_at)}
From edccadc106f53aa909c269fc65a8de69bae7c25e Mon Sep 17 00:00:00 2001 From: Ali Beikverdi Date: Sun, 4 Jun 2023 14:31:45 +0900 Subject: [PATCH 5/9] get all deposit and withdrawal bug fix in operator control for non admin role --- server/api/controllers/deposit.js | 4 ++++ server/api/controllers/withdrawal.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/server/api/controllers/deposit.js b/server/api/controllers/deposit.js index 3cd2a7ae4b..bfcc1b192c 100644 --- a/server/api/controllers/deposit.js +++ b/server/api/controllers/deposit.js @@ -30,6 +30,10 @@ const getAdminDeposits = (req, res) => { format } = req.swagger.params; + if (format.value && req.auth.scopes.indexOf(ROLES.ADMIN) === -1 && !user_id.value) { + return res.status(403).json({ message: API_KEY_NOT_PERMITTED }); + } + toolsLib.wallet.getUserDepositsByKitId( user_id.value, currency.value, diff --git a/server/api/controllers/withdrawal.js b/server/api/controllers/withdrawal.js index 9b7b6ca55b..d79c4a98d2 100644 --- a/server/api/controllers/withdrawal.js +++ b/server/api/controllers/withdrawal.js @@ -267,7 +267,7 @@ const getAdminWithdrawals = (req, res) => { address } = req.swagger.params; - if (format.value && req.auth.scopes.indexOf(ROLES.ADMIN) === -1) { + if (format.value && req.auth.scopes.indexOf(ROLES.ADMIN) === -1 && !user_id.value) { return res.status(403).json({ message: API_KEY_NOT_PERMITTED }); } From 13955263956972bbdc12d54fbfb1bc460a2eaddf Mon Sep 17 00:00:00 2001 From: Ali Beikverdi Date: Sun, 4 Jun 2023 14:34:35 +0900 Subject: [PATCH 6/9] version update --- server/api/swagger/swagger.js | 2 +- server/package.json | 2 +- version | 2 +- web/package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/api/swagger/swagger.js b/server/api/swagger/swagger.js index 0811ec54af..f8496ed2da 100644 --- a/server/api/swagger/swagger.js +++ b/server/api/swagger/swagger.js @@ -4,7 +4,7 @@ const definition = { swagger: '2.0', info: { title: 'HollaEx Kit', - version: '2.6.4' + version: '2.6.5' }, host: 'api.hollaex.com', basePath: '/v2', diff --git a/server/package.json b/server/package.json index 6499feae3e..51e5e03167 100644 --- a/server/package.json +++ b/server/package.json @@ -1,5 +1,5 @@ { - "version": "2.6.4", + "version": "2.6.5", "private": false, "description": "HollaEx Kit", "keywords": [ diff --git a/version b/version index e46a05b196..68167133b9 100644 --- a/version +++ b/version @@ -1 +1 @@ -2.6.4 \ No newline at end of file +2.6.5 \ No newline at end of file diff --git a/web/package.json b/web/package.json index 1687c058f0..6ae9da121f 100644 --- a/web/package.json +++ b/web/package.json @@ -1,6 +1,6 @@ { "name": "hollaex-kit", - "version": "2.6.4", + "version": "2.6.5", "private": true, "dependencies": { "@ant-design/compatible": "1.0.5", From 01298eaf3c587007397beaf594388666dff2280e Mon Sep 17 00:00:00 2001 From: Ali Beikverdi Date: Tue, 6 Jun 2023 15:08:51 +0900 Subject: [PATCH 7/9] display user referral for all admin roles --- server/api/swagger/admin.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/api/swagger/admin.yaml b/server/api/swagger/admin.yaml index 26b48f582a..ae4e263209 100644 --- a/server/api/swagger/admin.yaml +++ b/server/api/swagger/admin.yaml @@ -2669,6 +2669,8 @@ paths: x-security-scopes: - admin - supervisor + - kyc + - support x-token-permissions: - can_read /admin/user/referer: @@ -2699,6 +2701,9 @@ paths: - hmac x-security-scopes: - admin + - supervisor + - kyc + - support x-token-permissions: - can_read /admin/user/wallet: From 8ebd3ef0c5795bae1faa9df4d9a4e05c2bb76b50 Mon Sep 17 00:00:00 2001 From: Amir Hossein Salar Date: Tue, 6 Jun 2023 14:03:12 +0430 Subject: [PATCH 8/9] fix for the field wrapper warning section issue --- .../Form/FormFields/FieldWrapper.js | 42 +++++++++++-------- web/src/containers/Deposit/utils.js | 6 +-- 2 files changed, 27 insertions(+), 21 deletions(-) diff --git a/web/src/components/Form/FormFields/FieldWrapper.js b/web/src/components/Form/FormFields/FieldWrapper.js index e568af59b6..21c97ae5eb 100644 --- a/web/src/components/Form/FormFields/FieldWrapper.js +++ b/web/src/components/Form/FormFields/FieldWrapper.js @@ -14,22 +14,21 @@ const Warning = ({ text, className = '' }) => (
); -const renderWarning = (warning) => { - if (warning) { - if (Array.isArray(warning)) { - return ( -
- {warning.map((msg, index) => ( - - ))} -
- ); - } else { - return ; - } +const WarningContainer = ({ warning, warnings }) => { + if (warnings && Array.isArray(warnings)) { + return ( +
+ {warnings.map((msg, index) => ( + + ))} +
+ ); + } else if (warning) { + return ; } else { return null; } @@ -53,6 +52,7 @@ export const FieldContent = ({ ishorizontalfield = false, dateFieldClassName, warning, + warnings, preview, isEmail, emailMsg, @@ -68,10 +68,14 @@ export const FieldContent = ({ ) : ( label )} - {renderWarning(warning)} + )} - +
Date: Wed, 7 Jun 2023 12:05:43 +0900 Subject: [PATCH 9/9] increase captcha length --- server/api/swagger/common.yaml | 2 +- server/api/swagger/definitions.yaml | 2 +- web/package-lock.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/api/swagger/common.yaml b/server/api/swagger/common.yaml index 4d475016ab..0434fbddac 100644 --- a/server/api/swagger/common.yaml +++ b/server/api/swagger/common.yaml @@ -264,7 +264,7 @@ paths: in: query required: false type: string - maxLength: 1024 + maxLength: 5000 responses: 200: description: Success diff --git a/server/api/swagger/definitions.yaml b/server/api/swagger/definitions.yaml index 6c8edd2d74..8ba3981b27 100644 --- a/server/api/swagger/definitions.yaml +++ b/server/api/swagger/definitions.yaml @@ -25,7 +25,7 @@ definitions: maxLength: 256 captcha: type: string - maxLength: 1024 + maxLength: 5000 referral: type: string maxLength: 256 diff --git a/web/package-lock.json b/web/package-lock.json index 7e5d7f3080..00d18238f1 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -1,6 +1,6 @@ { "name": "hollaex-kit", - "version": "2.6.4", + "version": "2.6.5", "lockfileVersion": 1, "requires": true, "dependencies": {