From 79709899e4e205bd0d97affc2d273c19473fed93 Mon Sep 17 00:00:00 2001 From: Ali Beikverdi Date: Thu, 21 Oct 2021 23:32:24 +0900 Subject: [PATCH 1/4] fixed the 10mb size --- web/src/utils/icon.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/utils/icon.js b/web/src/utils/icon.js index 703d75a0c9..2b7985c4e6 100644 --- a/web/src/utils/icon.js +++ b/web/src/utils/icon.js @@ -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; } }; From 5638c97cc00e85b48292f640304e470067fa6e38 Mon Sep 17 00:00:00 2001 From: Ali Beikverdi Date: Thu, 21 Oct 2021 23:36:29 +0900 Subject: [PATCH 2/4] version update --- server/api/swagger/swagger.yaml | 2 +- server/package.json | 2 +- version | 2 +- web/package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/api/swagger/swagger.yaml b/server/api/swagger/swagger.yaml index a42f99e05b..36bac07b27 100644 --- a/server/api/swagger/swagger.yaml +++ b/server/api/swagger/swagger.yaml @@ -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 diff --git a/server/package.json b/server/package.json index fa28dfd713..1e1275e59b 100644 --- a/server/package.json +++ b/server/package.json @@ -1,5 +1,5 @@ { - "version": "2.2.0", + "version": "2.2.1", "private": false, "description": "HollaEx Kit", "keywords": [ diff --git a/version b/version index ccbccc3dc6..fae692e41d 100644 --- a/version +++ b/version @@ -1 +1 @@ -2.2.0 +2.2.1 \ No newline at end of file diff --git a/web/package.json b/web/package.json index d32e8a3cb8..eda7caed68 100644 --- a/web/package.json +++ b/web/package.json @@ -1,6 +1,6 @@ { "name": "hollaex-kit", - "version": "2.2.0", + "version": "2.2.1", "private": true, "dependencies": { "@ant-design/compatible": "1.0.5", From 41433dd3b4a36f5800e668b7c85c7ed70cb1d424 Mon Sep 17 00:00:00 2001 From: ram Date: Thu, 21 Oct 2021 20:58:30 +0530 Subject: [PATCH 3/4] Changes for default country values --- web/src/containers/Verification/index.js | 36 ++++++++++++++++-------- web/src/containers/Verification/utils.js | 26 +++++++++-------- 2 files changed, 39 insertions(+), 23 deletions(-) diff --git a/web/src/containers/Verification/index.js b/web/src/containers/Verification/index.js index a3e0cf172c..c1d33c20d3 100644 --- a/web/src/containers/Verification/index.js +++ b/web/src/containers/Verification/index.js @@ -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, @@ -17,7 +18,7 @@ import { PanelInformationRow, Button, SmartTarget, - SuccessDisplay + SuccessDisplay, } from '../../components'; import withConfig from 'components/ConfigProvider/withConfig'; import STRINGS from '../../config/localizedStrings'; @@ -87,7 +88,7 @@ class Verification extends Component { }, ], paramsData: {}, - isCustomNotification: false + isCustomNotification: false, }; componentDidMount() { @@ -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 }); } } @@ -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': @@ -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} @@ -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 ( @@ -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} > @@ -607,7 +618,10 @@ class Verification extends Component { case 'sms': return ( 0) { return ( diff --git a/web/src/containers/Verification/utils.js b/web/src/containers/Verification/utils.js index 1498a6eb3a..45615e561c 100644 --- a/web/src/containers/Verification/utils.js +++ b/web/src/containers/Verification/utils.js @@ -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; From cfd2c2a8358ac8071f4dae67ec440e2fd65fd5c7 Mon Sep 17 00:00:00 2001 From: ram Date: Thu, 21 Oct 2021 21:26:30 +0530 Subject: [PATCH 4/4] Fix for trade tabs in mobile view --- .../Trade/components/_TradeBlock.scss | 5 +++- web/src/index.css | 25 +++++++++++-------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/web/src/containers/Trade/components/_TradeBlock.scss b/web/src/containers/Trade/components/_TradeBlock.scss index accbe8aeda..be01cd24ca 100644 --- a/web/src/containers/Trade/components/_TradeBlock.scss +++ b/web/src/containers/Trade/components/_TradeBlock.scss @@ -216,4 +216,7 @@ $tabs-title--margin: 2rem; min-height: 100% !important; } } -} \ No newline at end of file + .trade_block-wrapper { + max-height: 50vh; + } +} diff --git a/web/src/index.css b/web/src/index.css index 861b07d9ec..1c97135fdc 100644 --- a/web/src/index.css +++ b/web/src/index.css @@ -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 { @@ -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; @@ -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); } @@ -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; @@ -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; } @@ -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 {