Skip to content

Commit

Permalink
Merge pull request #1005 from bitholla/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
abeikverdi authored Oct 21, 2021
2 parents 0b34bc3 + 401089e commit d0e4d55
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 40 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.2.0"
version: "2.2.1"
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.2.0",
"version": "2.2.1",
"private": false,
"description": "HollaEx Kit",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.0
2.2.1
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.2.0",
"version": "2.2.1",
"private": true,
"dependencies": {
"@ant-design/compatible": "1.0.5",
Expand Down
5 changes: 4 additions & 1 deletion web/src/containers/Trade/components/_TradeBlock.scss
Original file line number Diff line number Diff line change
Expand Up @@ -216,4 +216,7 @@ $tabs-title--margin: 2rem;
min-height: 100% !important;
}
}
}
.trade_block-wrapper {
max-height: 50vh;
}
}
36 changes: 25 additions & 11 deletions web/src/containers/Verification/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { Tabs } from 'antd';
import querystring from 'query-string';
import _get from 'lodash/get';
// import * as d3 from 'd3-selection';
import {
// AppBar,
Expand All @@ -17,7 +18,7 @@ import {
PanelInformationRow,
Button,
SmartTarget,
SuccessDisplay
SuccessDisplay,
} from '../../components';
import withConfig from 'components/ConfigProvider/withConfig';
import STRINGS from '../../config/localizedStrings';
Expand Down Expand Up @@ -87,7 +88,7 @@ class Verification extends Component {
},
],
paramsData: {},
isCustomNotification: false
isCustomNotification: false,
};

componentDidMount() {
Expand All @@ -100,11 +101,11 @@ class Verification extends Component {
const { success_alert, error_alert } = qs;
let paramsData = {};
if (success_alert) {
paramsData = { status: true, message: success_alert }
paramsData = { status: true, message: success_alert };
} else if (error_alert) {
paramsData = { status: false, message: error_alert }
paramsData = { status: false, message: error_alert };
}
this.setState({ paramsData, isCustomNotification: true })
this.setState({ paramsData, isCustomNotification: true });
}
}

Expand Down Expand Up @@ -477,7 +478,12 @@ class Verification extends Component {

renderKYCVerificationContent = (key) => {
const { user } = this.state;
const { activeLanguage, icons: ICONS, openContactForm } = this.props;
const {
activeLanguage,
icons: ICONS,
openContactForm,
constants,
} = this.props;

switch (key) {
case 'identity':
Expand All @@ -487,7 +493,7 @@ class Verification extends Component {
fullName={user.full_name}
moveToNextStep={this.goNextTab}
activeLanguage={activeLanguage}
initialValues={identityInitialValues(user)}
initialValues={identityInitialValues(user, constants)}
openContactForm={openContactForm}
setActivePageContent={this.setActivePageContent}
handleBack={this.handleBack}
Expand Down Expand Up @@ -545,7 +551,12 @@ class Verification extends Component {
kycTabs,
activeKYCTabKey,
} = this.state;
const { activeLanguage, icons: ICONS, openContactForm } = this.props;
const {
activeLanguage,
icons: ICONS,
openContactForm,
constants,
} = this.props;
switch (activePage) {
case 'email':
return (
Expand Down Expand Up @@ -592,7 +603,7 @@ class Verification extends Component {
setActivePageContent={this.setActivePageContent}
handleBack={this.handleBack}
moveToNextStep={this.goNextTab}
initialValues={identityInitialValues(user)}
initialValues={identityInitialValues(user, constants)}
setActiveTab={this.setActiveTab}
>
<Tabs activeKey={activeKYCTabKey} onTabClick={this.setActiveKYCTab}>
Expand All @@ -607,7 +618,10 @@ class Verification extends Component {
case 'sms':
return (
<MobileVerification
initialValues={mobileInitialValues(user.address)}
initialValues={mobileInitialValues(
user.address,
_get(constants, 'defaults')
)}
moveToNextStep={this.goNextTab}
activeLanguage={activeLanguage}
openContactForm={openContactForm}
Expand Down Expand Up @@ -663,7 +677,7 @@ class Verification extends Component {
dialogType,
showVerificationSentModal,
paramsData,
isCustomNotification
isCustomNotification,
} = this.state;
if (activeTab === -1 && tabs.length > 0) {
return (
Expand Down
26 changes: 14 additions & 12 deletions web/src/containers/Verification/utils.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
import PhoneNumber from 'awesome-phonenumber';
import _get from 'lodash/get';

import { initialCountry, COUNTRIES } from '../../utils/countries';

export const mobileInitialValues = ({ country }) => {
return { phone_country: getCountry(country).phoneCode };
export const mobileInitialValues = ({ country }, defaults) => {
let countryVal = country ? country : _get(defaults, 'country');
return { phone_country: getCountry(countryVal).phoneCode };
};

export const identityInitialValues = ({
full_name,
gender,
nationality,
dob,
address,
userData,
}) => {
export const identityInitialValues = (
{ full_name, gender, nationality, dob, address, userData },
constants
) => {
const initialValues = {
full_name: full_name || userData.full_name,
country: initialCountry.value,
nationality: initialCountry.value,
country: getCountry(
_get(constants, 'defaults.country', initialCountry.value)
).value,
nationality: getCountry(
_get(constants, 'defaults.country', initialCountry.value)
).value,
};
if (nationality) {
initialValues.nationality = getCountry(nationality).value;
Expand Down
25 changes: 14 additions & 11 deletions web/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,8 @@ 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 .app_container-content.no_bottom_navigation {
Expand All @@ -366,8 +366,8 @@ table th {
.app_container.layout-mobile .app_container-content .app_container-main.no_bottom_navigation {
height: 100%; }
.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 @@ -2191,6 +2191,9 @@ table th {
max-height: 100% !important;
min-height: 100% !important; }

.layout-mobile .trade_block-wrapper {
max-height: 50vh; }

.trade_order_entry-wrapper.order_side-selector-sell {
flex: 1;
color: var(--labels_secondary-inactive-label-text-graphics); }
Expand Down Expand Up @@ -2727,8 +2730,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 1;
min-width: 95vw !important;
Expand Down Expand Up @@ -2879,7 +2882,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: 13px !important; }

Expand Down Expand Up @@ -7293,14 +7296,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
2 changes: 1 addition & 1 deletion web/src/utils/icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ const sizeLimitInMB = 10;

export const checkFileSize = (file) => {
if (file && file.size) {
const sizeLimit = sizeLimitInMB * 1024 * 10;
const sizeLimit = sizeLimitInMB * 1024 * 1024;
return file.size < sizeLimit;
}
};
Expand Down

0 comments on commit d0e4d55

Please sign in to comment.