diff --git a/server/api/controllers/user.js b/server/api/controllers/user.js
index 04008dc13b..0add639004 100644
--- a/server/api/controllers/user.js
+++ b/server/api/controllers/user.js
@@ -27,6 +27,7 @@ const {
LOGIN_NOT_ALLOW,
NO_IP_FOUND,
INVALID_OTP_CODE,
+ OTP_CODE_NOT_FOUND
} = require('../../messages');
const { DEFAULT_ORDER_RISK_PERCENTAGE, EVENTS_CHANNEL, API_HOST, DOMAIN, TOKEN_TIME_NORMAL, TOKEN_TIME_LONG, HOLLAEX_NETWORK_BASE_URL, NUMBER_OF_ALLOWED_ATTEMPTS } = require('../../constants');
const { all } = require('bluebird');
@@ -155,10 +156,10 @@ const getVerifyUser = (req, res) => {
};
const verifyUser = (req, res) => {
- const { verification_code } = req.swagger.params.data.value;
+ const { verification_code, email } = req.swagger.params.data.value;
const domain = req.headers['x-real-origin'];
- toolsLib.user.verifyUser(null, verification_code, domain)
+ toolsLib.user.verifyUser(email, verification_code, domain)
.then(() => {
return res.json({ message: USER_VERIFIED });
})
@@ -299,6 +300,9 @@ const loginPost = (req, res) => {
return toolsLib.security.checkCaptcha(captcha, ip);
})
.catch(async (err) => {
+ if (!otp_code) {
+ throw new Error(OTP_CODE_NOT_FOUND);
+ }
await toolsLib.user.createUserLogin(user, ip, device, domain, origin, referer, null, long_term, false);
const loginData = await toolsLib.user.findUserLatestLogin(user, false);
const message = createAttemptMessage(loginData, user, domain);
diff --git a/server/api/swagger/admin.yaml b/server/api/swagger/admin.yaml
index a68fd5e4be..a2f47ec562 100644
--- a/server/api/swagger/admin.yaml
+++ b/server/api/swagger/admin.yaml
@@ -2955,7 +2955,6 @@ paths:
description: specify whether or not wallet is wallet
required: false
type: boolean
- default: true
- in: query
name: network
description: Blockchain network of wallet
diff --git a/server/api/swagger/common.yaml b/server/api/swagger/common.yaml
index 4c33a53e6a..32395b66a7 100644
--- a/server/api/swagger/common.yaml
+++ b/server/api/swagger/common.yaml
@@ -187,6 +187,9 @@ paths:
verification_code:
type: string
maxLength: 256
+ email:
+ type: string
+ maxLength: 256
responses:
200:
description: Success
diff --git a/server/api/swagger/swagger.js b/server/api/swagger/swagger.js
index be45d267d2..cdd0501598 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.9.3'
+ version: '2.9.4'
},
host: 'api.hollaex.com',
basePath: '/v2',
diff --git a/server/mail/templates/index.js b/server/mail/templates/index.js
index 8259b85346..f40af8097d 100644
--- a/server/mail/templates/index.js
+++ b/server/mail/templates/index.js
@@ -87,7 +87,7 @@ const replaceHTMLContent = (type, html = '', email, data, language, domain) => {
else if (type === MAILTYPE.SIGNUP) { // ok
html = html.replace(/\$\{name\}/g, email);
html = html.replace(/\$\{api_name\}/g, API_NAME());
- html = html.replace(/\$\{link\}/g, `${domain}/verify/${data}`);
+ html = html.replace(/\$\{link\}/g, `${domain}/verify/${data}?email=${email}`);
}
else if (type === MAILTYPE.WELCOME) { //ok
html = html.replace(/\$\{name\}/g, email || '');
diff --git a/server/messages.js b/server/messages.js
index 2e9d238bc3..3b477cc41d 100644
--- a/server/messages.js
+++ b/server/messages.js
@@ -44,6 +44,7 @@ exports.TOKEN_REVOKED = 'Token is already revoked';
exports.TOKEN_REMOVED = 'Token is successfully revoked';
exports.TOKEN_OTP_ENABLED = 'OTP must be enabled to create a token';
exports.INVALID_OTP_CODE = 'Invalid OTP Code';
+exports.OTP_CODE_NOT_FOUND = 'OTP not found';
exports.WALLET_ERROR_500 =
'Internal error. Withdrawal failed. Please try again in few minutes.';
diff --git a/server/package.json b/server/package.json
index eca42c9d79..21ed3a591e 100644
--- a/server/package.json
+++ b/server/package.json
@@ -1,5 +1,5 @@
{
- "version": "2.9.3",
+ "version": "2.9.4",
"private": false,
"description": "HollaEx Kit",
"keywords": [
diff --git a/version b/version
index eafef0d4c5..d38c63d7e8 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-2.9.3
\ No newline at end of file
+2.9.4
\ No newline at end of file
diff --git a/web/package.json b/web/package.json
index 28c5f6c4ef..e407666f85 100644
--- a/web/package.json
+++ b/web/package.json
@@ -1,6 +1,6 @@
{
"name": "hollaex-kit",
- "version": "2.9.3",
+ "version": "2.9.4",
"private": true,
"dependencies": {
"@ant-design/compatible": "1.0.5",
diff --git a/web/src/containers/Admin/AdminFinancials/TableFilter.js b/web/src/containers/Admin/AdminFinancials/TableFilter.js
index aa2fdf5365..889bf0d491 100644
--- a/web/src/containers/Admin/AdminFinancials/TableFilter.js
+++ b/web/src/containers/Admin/AdminFinancials/TableFilter.js
@@ -1,6 +1,6 @@
import React, { useState } from 'react';
import { connect } from 'react-redux';
-import { DatePicker, Input, Select, Button } from 'antd';
+import { DatePicker, Input, Select, Button, Checkbox } from 'antd';
import { SearchOutlined } from '@ant-design/icons';
import moment from 'moment';
@@ -68,6 +68,10 @@ const FieldComponent = ({
onHandleFieldChange({ currency: value.toLowerCase() });
};
+ const onHandleCheck = (value) => {
+ onHandleFieldChange({ is_valid: value.target.checked });
+ };
+
const handleField = (handleRemove, value) => {
switch (type) {
case 'select':
@@ -88,6 +92,16 @@ const FieldComponent = ({
onChange={onHandle}
/>
);
+ case 'boolean':
+ return (
+
+ Valid Address
+
+ );
case 'time-picker':
return (
{
- data.value = '';
+ if (data.name === 'is_valid') data.value = true;
+ else data.value = '';
});
setOptions([...tempOptions]);
setFieldsData([...fieldsData, ...tempfield]);
diff --git a/web/src/containers/Admin/AdminFinancials/Wallet.js b/web/src/containers/Admin/AdminFinancials/Wallet.js
index 7c802a5e14..7ac80b7c61 100644
--- a/web/src/containers/Admin/AdminFinancials/Wallet.js
+++ b/web/src/containers/Admin/AdminFinancials/Wallet.js
@@ -65,6 +65,13 @@ const filterFields = [
type: 'text',
name: 'network',
},
+ {
+ label: 'Valid',
+ value: true,
+ placeholder: 'Valid',
+ type: 'boolean',
+ name: 'is_valid',
+ },
{
label: 'Time',
name: 'time',
@@ -95,6 +102,11 @@ const filterOptions = [
value: 'network',
name: 'network',
},
+ {
+ label: 'Valid',
+ value: 'is_valid',
+ name: 'is_valid',
+ },
{
label: 'Time',
value: 'time',
diff --git a/web/src/containers/Admin/Transfers/index.js b/web/src/containers/Admin/Transfers/index.js
index ba1e772aa6..7df3cb6d85 100644
--- a/web/src/containers/Admin/Transfers/index.js
+++ b/web/src/containers/Admin/Transfers/index.js
@@ -53,6 +53,7 @@ const getFields = (
type: 'select',
label: 'Currency',
placeholder: 'Currency',
+ showSearch: true,
options: coins,
validate: [validateRequired, validateRange(coins)],
},
diff --git a/web/src/containers/VerificationEmailCode/index.js b/web/src/containers/VerificationEmailCode/index.js
index db39c4244f..329c55bd60 100644
--- a/web/src/containers/VerificationEmailCode/index.js
+++ b/web/src/containers/VerificationEmailCode/index.js
@@ -117,7 +117,8 @@ class VerifyEmailCode extends Component {
onClick={async () => {
this.setState({ confirm: true });
const { code } = this.props.params;
- this.props.verifyCode({ verification_code: code });
+ const { email } = this.props.location.query;
+ this.props.verifyCode({ verification_code: code, email });
}}
style={{
backgroundColor: '#5D63FF',