Skip to content

Commit

Permalink
Merge pull request #641 from bitholla/hotfix
Browse files Browse the repository at this point in the history
Hotfix
  • Loading branch information
abeikverdi authored Mar 31, 2021
2 parents 22c5f1c + 579f72d commit 6e66157
Show file tree
Hide file tree
Showing 13 changed files with 64 additions and 60 deletions.
2 changes: 1 addition & 1 deletion server/api/swagger/swagger.yaml
Original file line number Diff line number Diff line change
@@ -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
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.0.13",
"version": "2.0.14",
"private": false,
"description": "HollaEx Kit",
"keywords": [
Expand Down
1 change: 1 addition & 0 deletions server/tools/nginx/logs/nginx.pid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.13
2.0.14
16 changes: 1 addition & 15 deletions 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.0.13",
"version": "2.0.14",
"private": true,
"dependencies": {
"@ant-design/compatible": "1.0.5",
Expand Down
11 changes: 9 additions & 2 deletions web/src/components/Form/validations.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}$/;
Expand Down Expand Up @@ -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;
}
Expand Down
8 changes: 8 additions & 0 deletions web/src/containers/Admin/Tiers/Fees.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) => (
<div className="d-flex align-items-center">
<CurrencyBall symbol={pair_base} name={pair_base} size="m" />
Expand All @@ -26,6 +28,8 @@ const getHeaders = (userTiers, ICONS, onEditFees) => {
title: 'Fee type',
dataIndex: 'type',
key: 'type',
width: 140,
fixed: 'left',
className: 'type-column',
render: () => (
<div>
Expand Down Expand Up @@ -61,6 +65,7 @@ const getHeaders = (userTiers, ICONS, onEditFees) => {
dataIndex: 'name',
key: level,
className: 'type-column',
width: 120,
render: (name) => (
<div>
<div className="custom-column-td column-divider">
Expand All @@ -82,6 +87,8 @@ const getHeaders = (userTiers, ICONS, onEditFees) => {
dataIndex: 'name',
key: 'action',
align: 'right',
width: 150,
fixed: 'right',
render: (name) => (
<span className="admin-link-highlight" onClick={() => onEditFees(name)}>
Adjust fees
Expand Down Expand Up @@ -128,6 +135,7 @@ const Fees = ({
dataSource={coinsData}
rowKey={(data) => data.id}
bordered
scroll={{ x: 'auto' }}
/>
</div>
</div>
Expand Down
8 changes: 8 additions & 0 deletions web/src/containers/Admin/Tiers/Limits.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ const getHeaders = (userTiers, ICONS, constants = {}, onEditLimit) => {
title: 'Asset',
dataIndex: 'symbol',
key: 'symbol',
width: 150,
fixed: 'left',
render: (symbol, { fullname }) => (
<div className="d-flex align-items-center">
<CurrencyBall symbol={symbol} name={symbol} size="m" />
Expand All @@ -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: () => (
<div>
Expand Down Expand Up @@ -77,6 +81,7 @@ const getHeaders = (userTiers, ICONS, constants = {}, onEditLimit) => {
dataIndex: 'name',
key: 'name',
className: 'type-column',
width: 120,
render: (name) => (
<div>
<div className="custom-column-td column-divider">
Expand All @@ -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: () => (
<span className="admin-link-highlight" onClick={onEditLimit}>
Expand Down Expand Up @@ -145,6 +152,7 @@ const Limits = ({
dataSource={coinsData}
rowKey={(data) => data.id}
bordered
scroll={{ x: 'auto' }}
/>
</div>
</div>
Expand Down
8 changes: 8 additions & 0 deletions web/src/containers/Admin/Tiers/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
23 changes: 3 additions & 20 deletions web/src/containers/Trade/components/OrderEntry.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import mathjs from 'mathjs';
import Review from './OrderEntryReview';
import Form, { FORM_NAME } from './OrderEntryForm';
import {
toFixed,
formatNumber,
// formatBaseAmount,
roundNumber,
Expand Down Expand Up @@ -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'
? {
Expand All @@ -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,
Expand Down Expand Up @@ -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: {
Expand Down
15 changes: 9 additions & 6 deletions web/src/containers/Withdraw/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class Withdraw extends Component {
formValues: {},
initialValues: {},
checked: false,
currency: '',
};

componentWillMount() {
Expand Down Expand Up @@ -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(
Expand All @@ -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)
)
);
Expand Down Expand Up @@ -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) => ({
Expand Down
26 changes: 13 additions & 13 deletions web/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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; }

Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 6e66157

Please sign in to comment.