diff --git a/server/api/swagger/swagger.yaml b/server/api/swagger/swagger.yaml index da6b4af4c0..239a78fa26 100644 --- a/server/api/swagger/swagger.yaml +++ b/server/api/swagger/swagger.yaml @@ -1,6 +1,6 @@ swagger: "2.0" info: - version: "2.0.13" + version: "2.0.14" title: HollaEx Kit host: api.hollaex.com basePath: /v2 diff --git a/server/package.json b/server/package.json index 35d5176567..2bca5ec4f6 100644 --- a/server/package.json +++ b/server/package.json @@ -1,5 +1,5 @@ { - "version": "2.0.13", + "version": "2.0.14", "private": false, "description": "HollaEx Kit", "keywords": [ diff --git a/server/tools/nginx/logs/nginx.pid b/server/tools/nginx/logs/nginx.pid new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/server/tools/nginx/logs/nginx.pid @@ -0,0 +1 @@ +1 diff --git a/version b/version index 476ede462b..5ad8f21ac9 100644 --- a/version +++ b/version @@ -1 +1 @@ -2.0.13 \ No newline at end of file +2.0.14 \ No newline at end of file diff --git a/web/package-lock.json b/web/package-lock.json index 347972c397..1e1cd97a2d 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -1,6 +1,6 @@ { "name": "hollaex-kit", - "version": "2.0.12", + "version": "2.0.13", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -10608,11 +10608,6 @@ "verror": "1.10.0" } }, - "jssha": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/jssha/-/jssha-2.3.1.tgz", - "integrity": "sha1-FHshJTaQNcpLL30hDcU58Amz3po=" - }, "jsx-ast-utils": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.4.1.tgz", @@ -20166,15 +20161,6 @@ "makeerror": "1.0.x" } }, - "wallet-address-validator": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/wallet-address-validator/-/wallet-address-validator-0.2.4.tgz", - "integrity": "sha512-3fp0pVdhaCA6UoPK3CQFx9Y+ckQgFlCa9rOQ7DZr2Uzlh0kYKs3NaSwIDn4FSceDsi1g6W28EWDrlr9Pr3mI3Q==", - "requires": { - "base-x": "^3.0.4", - "jssha": "2.3.1" - } - }, "warning": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", diff --git a/web/package.json b/web/package.json index 638b7d57aa..094ff8b235 100644 --- a/web/package.json +++ b/web/package.json @@ -1,6 +1,6 @@ { "name": "hollaex-kit", - "version": "2.0.13", + "version": "2.0.14", "private": true, "dependencies": { "@ant-design/compatible": "1.0.5", diff --git a/web/src/components/Form/validations.js b/web/src/components/Form/validations.js index c3e3620a99..e4639396e4 100644 --- a/web/src/components/Form/validations.js +++ b/web/src/components/Form/validations.js @@ -4,6 +4,7 @@ import math from 'mathjs'; import bchaddr from 'bchaddrjs'; import { roundNumber } from '../../utils/currency'; import STRINGS from '../../config/localizedStrings'; +import { getDecimals } from 'utils/utils'; const passwordRegEx = /^(?=.*[a-zA-Z])(?=.*\d).{8,}$/; const usernameRegEx = /^[a-z0-9_]{3,15}$/; @@ -241,10 +242,16 @@ export const normalizeInt = (value) => { return ''; } }; -export const normalizeFloat = (value) => { +export const normalizeFloat = (value = '', increment = 0.01) => { if (validator.isFloat(value)) { + const incrementPrecision = getDecimals(increment); + const valuePrecision = (value + '.').split('.')[1].length; + const precision = math.min(valuePrecision, incrementPrecision); if (validator.toFloat(value)) { - return math.format(validator.toFloat(value), { notation: 'fixed' }); + return math.format(validator.toFloat(value), { + notation: 'fixed', + precision, + }); } else { return 0; } diff --git a/web/src/containers/Admin/Tiers/Fees.js b/web/src/containers/Admin/Tiers/Fees.js index 7f187ca004..c85efa7c3c 100644 --- a/web/src/containers/Admin/Tiers/Fees.js +++ b/web/src/containers/Admin/Tiers/Fees.js @@ -15,6 +15,8 @@ const getHeaders = (userTiers, ICONS, onEditFees) => { title: 'Pairs', dataIndex: 'pair_base', key: 'pair_base', + width: 150, + fixed: 'left', render: (pair_base, { name }) => (
@@ -26,6 +28,8 @@ const getHeaders = (userTiers, ICONS, onEditFees) => { title: 'Fee type', dataIndex: 'type', key: 'type', + width: 140, + fixed: 'left', className: 'type-column', render: () => (
@@ -61,6 +65,7 @@ const getHeaders = (userTiers, ICONS, onEditFees) => { dataIndex: 'name', key: level, className: 'type-column', + width: 120, render: (name) => (
@@ -82,6 +87,8 @@ const getHeaders = (userTiers, ICONS, onEditFees) => { dataIndex: 'name', key: 'action', align: 'right', + width: 150, + fixed: 'right', render: (name) => ( onEditFees(name)}> Adjust fees @@ -128,6 +135,7 @@ const Fees = ({ dataSource={coinsData} rowKey={(data) => data.id} bordered + scroll={{ x: 'auto' }} />
diff --git a/web/src/containers/Admin/Tiers/Limits.js b/web/src/containers/Admin/Tiers/Limits.js index fdcd12ce27..8a94eccfdc 100644 --- a/web/src/containers/Admin/Tiers/Limits.js +++ b/web/src/containers/Admin/Tiers/Limits.js @@ -25,6 +25,8 @@ const getHeaders = (userTiers, ICONS, constants = {}, onEditLimit) => { title: 'Asset', dataIndex: 'symbol', key: 'symbol', + width: 150, + fixed: 'left', render: (symbol, { fullname }) => (
@@ -36,6 +38,8 @@ const getHeaders = (userTiers, ICONS, constants = {}, onEditLimit) => { title: 'Limit type', dataIndex: 'type', key: 'type', + width: 140, + fixed: 'left', className: 'type-column', render: () => (
@@ -77,6 +81,7 @@ const getHeaders = (userTiers, ICONS, constants = {}, onEditLimit) => { dataIndex: 'name', key: 'name', className: 'type-column', + width: 120, render: (name) => (
@@ -97,6 +102,8 @@ const getHeaders = (userTiers, ICONS, constants = {}, onEditLimit) => { title: 'Adjust limit values', dataIndex: 'type', key: 'type', + fixed: 'right', + width: 150, align: 'right', render: () => ( @@ -145,6 +152,7 @@ const Limits = ({ dataSource={coinsData} rowKey={(data) => data.id} bordered + scroll={{ x: 'auto' }} />
diff --git a/web/src/containers/Admin/Tiers/index.css b/web/src/containers/Admin/Tiers/index.css index 82e26e7c59..bc75126774 100644 --- a/web/src/containers/Admin/Tiers/index.css +++ b/web/src/containers/Admin/Tiers/index.css @@ -112,3 +112,11 @@ .admin-tiers-wrapper .ant-pagination-item-active:hover { border-color: #288500 !important; } + +.admin-tiers-wrapper .ant-table-tbody { + overflow-x: auto; +} + +.admin-tiers-wrapper .ant-table-container { + overflow-x: auto; +} diff --git a/web/src/containers/Trade/components/OrderEntry.js b/web/src/containers/Trade/components/OrderEntry.js index 17ad92d838..38d3411560 100644 --- a/web/src/containers/Trade/components/OrderEntry.js +++ b/web/src/containers/Trade/components/OrderEntry.js @@ -8,7 +8,6 @@ import mathjs from 'mathjs'; import Review from './OrderEntryReview'; import Form, { FORM_NAME } from './OrderEntryForm'; import { - toFixed, formatNumber, // formatBaseAmount, roundNumber, @@ -362,7 +361,7 @@ class OrderEntry extends Component { label: 'Trigger price', type: 'number', placeholder: '0', - normalize: normalizeFloat, + normalize: (value = '') => normalizeFloat(value, increment_price), step: increment_price, ...(side === 'buy' ? { @@ -387,7 +386,7 @@ class OrderEntry extends Component { label: STRINGS['PRICE'], type: 'number', placeholder: '0', - normalize: normalizeFloat, + normalize: (value = '') => normalizeFloat(value, increment_price), step: increment_price, min: min_price, max: max_price, @@ -429,28 +428,12 @@ class OrderEntry extends Component { ), type: 'number', placeholder: '0.00', - normalize: normalizeFloat, + normalize: (value = '') => normalizeFloat(value, increment_size), step: increment_size, min: min_size, max: max_size, validate: [required, minValue(min_size), maxValue(max_size)], currency: symbol.toUpperCase(), - parse: (value = '') => { - let decimal = getDecimals(increment_size); - let decValue = toFixed(value); - let valueDecimal = getDecimals(decValue); - - let result = value; - if (decimal < valueDecimal) { - result = decValue - .toString() - .substring( - 0, - decValue.toString().length - (valueDecimal - decimal) - ); - } - return result; - }, setRef: this.props.setSizeRef, }, slider: { diff --git a/web/src/containers/Withdraw/index.js b/web/src/containers/Withdraw/index.js index 2229859c2d..4d9200d5a8 100644 --- a/web/src/containers/Withdraw/index.js +++ b/web/src/containers/Withdraw/index.js @@ -36,6 +36,7 @@ class Withdraw extends Component { formValues: {}, initialValues: {}, checked: false, + currency: '', }; componentWillMount() { @@ -165,11 +166,12 @@ class Withdraw extends Component { dispatch, verification_level, coins, + config_level = {}, } = this.props; + const { withdrawal_limit } = config_level[verification_level] || {}; const { currency } = this.state; const balanceAvailable = balance[`${currency}_available`]; - const { increment_unit, withdrawal_limits = {} } = - coins[currency] || DEFAULT_COIN_DATA; + const { increment_unit } = coins[currency] || DEFAULT_COIN_DATA; // if (currency === BASE_CURRENCY) { // const fee = calculateBaseFee(balanceAvailable); // const amount = math.number( @@ -183,13 +185,13 @@ class Withdraw extends Component { if (amount < 0) { amount = 0; } else if ( - math.larger(amount, math.number(withdrawal_limits[verification_level])) && - withdrawal_limits[verification_level] !== 0 && - withdrawal_limits[verification_level] !== -1 + math.larger(amount, math.number(withdrawal_limit)) && + withdrawal_limit !== 0 && + withdrawal_limit !== -1 ) { amount = math.number( math.subtract( - math.fraction(withdrawal_limits[verification_level]), + math.fraction(withdrawal_limit), math.fraction(selectedFee) ) ); @@ -308,6 +310,7 @@ const mapStateToProps = (store) => ({ coins: store.app.coins, activeTheme: store.app.theme, constants: store.app.constants, + config_level: store.app.config_level, }); const mapDispatchToProps = (dispatch) => ({ diff --git a/web/src/index.css b/web/src/index.css index 00b499e273..533548e6fd 100644 --- a/web/src/index.css +++ b/web/src/index.css @@ -330,13 +330,13 @@ table th { height: auto; flex: 1; } .app_container.layout-mobile .app_container-content { - min-height: calc( 100vh - 10rem); - max-height: calc( 100vh - 10rem); + min-height: calc( 100vh - 10rem); + max-height: calc( 100vh - 10rem); max-width: 100vw; overflow-y: scroll; } .app_container.layout-mobile .content-with-bar { - min-height: calc( 100vh - 17rem); - max-height: calc( 100vh - 17rem); + min-height: calc( 100vh - 17rem); + max-height: calc( 100vh - 17rem); max-width: 100vw; padding: 1rem; margin: 0; @@ -917,8 +917,8 @@ table th { height: calc(100% - 4rem) !important; } .layout-mobile.home_container .app_container-content { - min-height: calc( 100vh - 4rem); - max-height: calc( 100vh - 4rem); } + min-height: calc( 100vh - 4rem); + max-height: calc( 100vh - 4rem); } .home_container { background-repeat: no-repeat; @@ -2172,8 +2172,8 @@ table th { .layout-mobile .quote-container { background-color: transparent; overflow-y: scroll; - min-height: calc( 100vh - 17rem); - max-height: calc( 100vh - 17rem); } + min-height: calc( 100vh - 17rem); + max-height: calc( 100vh - 17rem); } .layout-mobile .quote-container .quick_trade-wrapper { flex: 1; min-width: 100vw; @@ -2260,7 +2260,7 @@ table th { .layout-mobile .presentation_container.verification_container { padding-top: 0 !important; - max-height: calc( 100vh - 10rem); } + max-height: calc( 100vh - 10rem); } .layout-mobile .presentation_container.verification_container .header-content { font-size: 12px !important; } @@ -6289,14 +6289,14 @@ table th { right: 0 !important; min-width: 100vw; max-width: 100vw; - min-height: calc( 100vh - 4rem); - max-height: calc( 100vh - 4rem); + min-height: calc( 100vh - 4rem); + max-height: calc( 100vh - 4rem); border-radius: 0 !important; padding: 0 !important; } .layout-mobile .ReactModal__Content .dialog-mobile-content { padding: 2.5rem !important; - min-height: calc( 100vh - 8rem); - max-height: calc( 100vh - 8rem); + min-height: calc( 100vh - 8rem); + max-height: calc( 100vh - 8rem); display: flex; } .layout-mobile.LogoutModal .ReactModal__Content {