diff --git a/install.sh b/install.sh
index d69dc18ea7..808a6e6aa4 100644
--- a/install.sh
+++ b/install.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# Parameter support to specify version of the CLI to install.
-export HOLLAEX_INSTALLER_VERSION_TARGET=${1:-"2.0.0"}
+export HOLLAEX_INSTALLER_VERSION_TARGET=${1:-"master"}
echo "Pulling HollaEx CLI from Github..."
curl -s https://raw.githubusercontent.com/bitholla/hollaex-cli/master/install.sh > cli_installer.sh && \
diff --git a/server/api/swagger/swagger.yaml b/server/api/swagger/swagger.yaml
index 364c740714..d1b50b2fa7 100644
--- a/server/api/swagger/swagger.yaml
+++ b/server/api/swagger/swagger.yaml
@@ -1,6 +1,6 @@
swagger: "2.0"
info:
- version: "2.0.0"
+ version: "2.0.1"
title: HollaEx Kit
host: api.hollaex.com
basePath: /v2
diff --git a/server/db/seeders/20190825120350-add-status.js b/server/db/seeders/20190825120350-add-status.js
index a80862ac0f..9d7ed793f8 100644
--- a/server/db/seeders/20190825120350-add-status.js
+++ b/server/db/seeders/20190825120350-add-status.js
@@ -81,7 +81,7 @@ module.exports = {
information: '',
},
setup_completed: false,
- native_currency: NATIVE_CURRENCY || exchange.coins[0].symbol,
+ native_currency: NATIVE_CURRENCY,
logo_image: LOGO_IMAGE || 'https://dash.testnet.bitholla.com/assets/img/hex-pattern-icon-black-01.svg',
valid_languages: VALID_LANGUAGES || 'en,fa,ko,ar,fr',
new_user_is_activated: (NEW_USER_IS_ACTIVATED && NEW_USER_IS_ACTIVATED === 'true') || false,
diff --git a/server/package.json b/server/package.json
index 204bfa80ed..243921f8ab 100644
--- a/server/package.json
+++ b/server/package.json
@@ -1,5 +1,5 @@
{
- "version": "2.0.0",
+ "version": "2.0.1",
"private": false,
"description": "HollaEx Kit",
"keywords": [
diff --git a/server/tools/dbs/setConfig.js b/server/tools/dbs/setConfig.js
index adc1348b74..fbfc062c41 100644
--- a/server/tools/dbs/setConfig.js
+++ b/server/tools/dbs/setConfig.js
@@ -52,7 +52,7 @@ const kit = {
information: '',
},
setup_completed: false,
- native_currency: NATIVE_CURRENCY,
+ native_currency: NATIVE_CURRENCY || 'usdt',
logo_image: LOGO_IMAGE || 'https://dash.testnet.bitholla.com/assets/img/hex-pattern-icon-black-01.svg',
valid_languages: VALID_LANGUAGES || 'en,fa,ko,ar,fr',
new_user_is_activated: (NEW_USER_IS_ACTIVATED && NEW_USER_IS_ACTIVATED === 'true') || false,
diff --git a/version b/version
index 227cea2156..10bf840ed5 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-2.0.0
+2.0.1
\ No newline at end of file
diff --git a/web/package.json b/web/package.json
index bfae29c251..ebc53b6485 100644
--- a/web/package.json
+++ b/web/package.json
@@ -1,6 +1,6 @@
{
"name": "hollaex-kit",
- "version": "2.0.0",
+ "version": "2.0.1",
"private": true,
"dependencies": {
"@ant-design/compatible": "1.0.5",
diff --git a/web/src/components/AppFooter/index.js b/web/src/components/AppFooter/index.js
index 9c83872324..afb6586b53 100644
--- a/web/src/components/AppFooter/index.js
+++ b/web/src/components/AppFooter/index.js
@@ -9,7 +9,10 @@ import withEdit from 'components/EditProvider/withEdit';
const generateSectionsText = (links = {}, ICONS) => {
let sectionsText = Object.keys(links)
- .filter((sectionKey) => typeof links[sectionKey] === 'object')
+ .filter(
+ (sectionKey) =>
+ typeof links[sectionKey] === 'object' && links[sectionKey].header
+ )
.map((key) => {
const section = links[key];
let heading = Object.keys(section.header)[0];
@@ -73,8 +76,9 @@ const AppFooter = ({
'flex-column': isMobile,
})}
>
- {generateSectionsText(constants.links, ICONS).map(
- ({ TITLE, LINKS }, index) => (
+ {generateSectionsText(constants.links, ICONS)
+ .filter(({ LINKS }) => LINKS.length)
+ .map(({ TITLE, LINKS }, index) => (
diff --git a/web/src/containers/Admin/Chat/index.css b/web/src/containers/Admin/Chat/index.css
index 9dd9e1757b..5650de34ad 100644
--- a/web/src/containers/Admin/Chat/index.css
+++ b/web/src/containers/Admin/Chat/index.css
@@ -1,36 +1,36 @@
-.chat-tabs.ant-tabs {
+.admin-chat-feature-wrapper .chat-tabs.ant-tabs {
width: 100%;
}
-.banlist {
+.admin-chat-feature-wrapper .banlist {
max-width: 250px;
}
-.chat-header {
+.admin-chat-feature-wrapper .chat-header {
color: #ffffff;
font-size: 18px;
}
-.chat-header .small-text {
+.admin-chat-feature-wrapper .chat-header .small-text {
color: #ffffff;
font-size: 13px;
margin: 0 !important;
}
-.switch-label {
+.admin-chat-feature-wrapper .switch-label {
margin: 0px 5px;
font-weight: bold;
font-size: 14px;
color: #ffffff;
}
-.switch-wrapper {
+.admin-chat-feature-wrapper .switch-wrapper {
margin: 1rem 0rem 5rem 0rem;
}
-.switch-wrapper .ant-switch {
+.admin-chat-feature-wrapper .switch-wrapper .ant-switch {
background-color: #000000;
}
-.switch-label::after {
+.admin-chat-feature-wrapper .switch-label::after {
color: #808080;
}
-.switch-wrapper .label-inactive {
+.admin-chat-feature-wrapper .switch-wrapper .label-inactive {
color: #808080;
}
diff --git a/web/src/containers/Admin/Chat/index.js b/web/src/containers/Admin/Chat/index.js
index cb56fbf066..fe500d9015 100644
--- a/web/src/containers/Admin/Chat/index.js
+++ b/web/src/containers/Admin/Chat/index.js
@@ -266,7 +266,7 @@ class Chat extends Component {
isActive,
} = this.state;
return (
-
+
{!ready ? (
) : (
@@ -296,7 +296,7 @@ class Chat extends Component {
- {isActive ?
+ {isActive ? (
- : null
- }
+ ) : null}
)}
diff --git a/web/src/containers/Admin/General/FooterConfig.js b/web/src/containers/Admin/General/FooterConfig.js
index de375e497c..82650eef6f 100644
--- a/web/src/containers/Admin/General/FooterConfig.js
+++ b/web/src/containers/Admin/General/FooterConfig.js
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
-import { Button, Modal } from 'antd';
+import { Modal } from 'antd';
import { PlusOutlined } from '@ant-design/icons';
import _isEqual from 'lodash/isEqual';
@@ -13,46 +13,56 @@ const link_sections = (
fields = {},
links = {},
addLink = () => {},
- addColumn = () => {},
handleRemoveHeader = () => {},
- handleRemoveLinks = () => {}
+ handleRemoveLinks = () => {},
+ isInitial = false
) => {
const sectionFields = {};
Object.keys(links)
- .filter((sectionKey) => typeof links[sectionKey] === 'object')
+ .filter((sectionKey) => {
+ let value = typeof links[sectionKey] === 'object';
+ if (!isInitial) {
+ value =
+ typeof links[sectionKey] === 'object' &&
+ typeof fields[sectionKey] === 'object';
+ }
+ return value;
+ })
.forEach((key) => {
let section = links[key];
let headerFields = {};
let contentFields = {};
- Object.keys(section.header).forEach((key) => {
- headerFields[key] = {
- type: 'input',
- label: key,
- placeholder: key,
- isClosable: true,
- closeCallback: () => handleRemoveHeader(key),
- };
- });
- Object.keys(section.content).forEach((key) => {
- contentFields[key] = {
- type: 'input',
- label: key,
- placeholder: key,
- isClosable: true,
- closeCallback: () => handleRemoveLinks(headerFields, key),
+ if (section.header) {
+ Object.keys(section.header).forEach((key) => {
+ headerFields[key] = {
+ type: 'input',
+ label: key,
+ placeholder: key,
+ isClosable: true,
+ closeCallback: () => handleRemoveHeader(key),
+ };
+ });
+ Object.keys(section.content).forEach((key) => {
+ contentFields[key] = {
+ type: 'input',
+ label: key,
+ placeholder: key,
+ isClosable: true,
+ closeCallback: () => handleRemoveLinks(headerFields, key),
+ };
+ });
+ sectionFields[key] = {
+ className: 'section-wrapper',
+ header: {
+ className: 'section-header',
+ fields: headerFields,
+ },
+ content: {
+ className: 'section-header',
+ fields: contentFields,
+ },
};
- });
- sectionFields[key] = {
- className: 'section-wrapper',
- header: {
- className: 'section-header',
- fields: headerFields,
- },
- content: {
- className: 'section-header',
- fields: contentFields,
- },
- };
+ }
});
// if (is_custom) {
const formFields = {
@@ -63,31 +73,20 @@ const link_sections = (
Object.keys(formFields).forEach((key) => {
const field = formFields[key];
count = count + (field.header ? 1 : 0);
- formFields[key] = {
- ...field,
- bottomLink: (
-
-
addLink(key)}>
-
- Add link
-
-
- ),
- };
+ if (typeof field === 'object' && field.header) {
+ formFields[key] = {
+ ...field,
+ bottomLink: (
+
+
addLink(key)}>
+
+ Add link
+
+
+ ),
+ };
+ }
});
- formFields[`section_${count}`] = {
- className: 'section-wrapper center-content',
- bottomLink: (
-
addColumn(`section_${count}`)}
- className="green-btn"
- >
- Add column
-
- ),
- };
return formFields;
// } else {
// return { section_1, section_2, section_3, section_4, section_5 };
@@ -119,9 +118,9 @@ class FooterConfig extends Component {
{},
this.props.links,
this.addLink,
- this.addColumn,
this.handleRemoveHeader,
- this.handleRemoveLinks
+ this.handleRemoveLinks,
+ true
),
initialCustom: {
column_header_1: 'EXCHANGE',
@@ -142,9 +141,9 @@ class FooterConfig extends Component {
{},
this.props.links,
this.addLink,
- this.addColumn,
this.handleRemoveHeader,
- this.handleRemoveLinks
+ this.handleRemoveLinks,
+ true
),
});
}
@@ -167,7 +166,6 @@ class FooterConfig extends Component {
prevFields,
this.props.links,
this.addLink,
- this.addColumn,
this.handleRemoveHeader,
this.handleRemoveLinks
),
@@ -200,7 +198,6 @@ class FooterConfig extends Component {
this.state.custom_fields,
this.props.links,
this.addLink,
- this.addColumn,
this.handleRemoveHeader,
this.handleRemoveLinks
),
@@ -230,9 +227,19 @@ class FooterConfig extends Component {
: [];
if (!headerKeys.includes(headerName)) {
data[key] = section;
+ } else {
+ data[key] = '';
}
});
- this.setState({ custom_fields: data });
+ this.setState({
+ custom_fields: link_sections(
+ data,
+ this.props.links,
+ this.addLink,
+ this.handleRemoveHeader,
+ this.handleRemoveLinks
+ ),
+ });
};
handleRemoveLinks = (headerFields = {}, fieldName) => {
@@ -307,7 +314,6 @@ class FooterConfig extends Component {
custom_fields,
this.props.links,
this.addLink,
- this.addColumn,
this.handleRemoveHeader,
this.handleRemoveLinks
),
@@ -365,6 +371,8 @@ class FooterConfig extends Component {
header,
content,
};
+ } else {
+ formValues[sectionKey] = '';
}
});
this.props.handleSubmitFooter(formValues, 'links');
@@ -379,6 +387,7 @@ class FooterConfig extends Component {
fields={custom_fields}
initialValues={initialCustom}
customFields={true}
+ addColumn={this.addColumn}
handleSubmitLinks={this.handleSubmitLinks}
/>
{/*
diff --git a/web/src/containers/Admin/General/FooterForm.js b/web/src/containers/Admin/General/FooterForm.js
index 6997d523ec..3229ded7d1 100644
--- a/web/src/containers/Admin/General/FooterForm.js
+++ b/web/src/containers/Admin/General/FooterForm.js
@@ -1,6 +1,8 @@
import React, { Component, Fragment } from 'react';
import { reduxForm } from 'redux-form';
import { Button } from 'antd';
+import _findLast from 'lodash/findLast';
+import _findLastKey from 'lodash/findLastKey';
import renderFields from '../../../components/AdminForm/utils';
@@ -15,44 +17,69 @@ class FormWrapper extends Component {
this.props.handleSubmitLinks(formProps);
};
+ getNewIndexFromFields = (fields = {}) => {
+ const finalColumn = _findLast(fields);
+ if (finalColumn && finalColumn.header && finalColumn.header.fields) {
+ const headerKey = _findLastKey(finalColumn.header.fields);
+ if (headerKey) {
+ let count = headerKey.replace('column_header_', '');
+ return isNaN(count) ? count : parseInt(count, 10) + 1;
+ }
+ }
+ return 1;
+ };
+
renderCustomFields = (fields = {}) => {
const { getFieldDecorator } = this.props.form;
+ let count = this.getNewIndexFromFields(fields);
return (
- {Object.keys(fields).map((key, index) => {
- let section = fields[key];
- return (
-
-
- {section.header ? (
-
-
+ {Object.keys(fields)
+ .filter((key) => typeof fields[key] !== 'string')
+ .map((key, index) => {
+ let section = fields[key];
+ return (
+
+
+ {section.header ? (
+
+
+ {renderFields(
+ section.header.fields,
+ getFieldDecorator,
+ this.props.initialValues
+ )}
+
+
+
+ ) : null}
+ {section.content ? (
+
{renderFields(
- section.header.fields,
+ section.content.fields,
getFieldDecorator,
this.props.initialValues
)}
-
-
- ) : null}
- {section.content ? (
-
- {renderFields(
- section.content.fields,
- getFieldDecorator,
- this.props.initialValues
- )}
-
- ) : null}
- {section.bottomLink ?
{section.bottomLink}
: null}
-
- {index < Object.keys(fields).length - 1 ? (
+ ) : null}
+ {section.bottomLink ? {section.bottomLink}
: null}
+
+ {/* {index < Object.keys(fields).length - 1 ? ( */}
- ) : null}
-
- );
- })}
+ {/* ) : null} */}
+
+ );
+ })}
+
+ this.props.addColumn(`section_${count}`)}
+ className="green-btn"
+ >
+ Add column
+
+
);
};
diff --git a/web/src/containers/Admin/General/InterfaceForm.js b/web/src/containers/Admin/General/InterfaceForm.js
index 77f83c946d..3f8e4a8564 100644
--- a/web/src/containers/Admin/General/InterfaceForm.js
+++ b/web/src/containers/Admin/General/InterfaceForm.js
@@ -20,10 +20,9 @@ const InterfaceForm = ({ initialValues = {}, handleSaveInterface }) => {
};
return (
-
Trading Interface
+
Features
- Select the trading interface that will be available on your exchange.
- All interfaces includes a crypto wallet.
+ Select the features that will be available on your exchange.
-
+
-
@@ -69,7 +68,7 @@ const InterfaceForm = ({ initialValues = {}, handleSaveInterface }) => {
-
+