-
+
+
+
);
@@ -81,10 +106,12 @@ const CheckDeposit = ({
const CheckDepositForm = reduxForm({
form: FORM_NAME,
+ enableReinitialize: true,
})(CheckDeposit);
const mapStateToProps = (state) => ({
formValues: getFormValues(FORM_NAME)(state),
+ coins: state.app.coins,
});
export default connect(mapStateToProps)(withConfig(CheckDepositForm));
diff --git a/web/src/components/Form/validations.js b/web/src/components/Form/validations.js
index 41d2af0518..72a99220d9 100644
--- a/web/src/components/Form/validations.js
+++ b/web/src/components/Form/validations.js
@@ -229,7 +229,7 @@ export const normalizeInt = (value) => {
};
export const normalizeFloat = (value) => {
if (validator.isFloat(value)) {
- return validator.toFloat(value);
+ return math.format(validator.toFloat(value), { notation: 'fixed' });
} else if (value === '0' || value === 0) {
return 0;
} else {
diff --git a/web/src/components/Notification/InviteFriends.js b/web/src/components/Notification/InviteFriends.js
index 3b392cd765..daa162dc21 100644
--- a/web/src/components/Notification/InviteFriends.js
+++ b/web/src/components/Notification/InviteFriends.js
@@ -8,6 +8,7 @@ import DumbField from '../Form/FormFields/DumbField';
import Button from '../Button';
import STRINGS from '../../config/localizedStrings';
import { getUserReferralCount } from '../../actions/userAction';
+import { setSnackNotification } from '../../actions/appActions';
import { EditWrapper } from 'components';
const RenderDumbField = (props) =>
;
@@ -24,6 +25,14 @@ class InviteFriends extends Component {
this.props.getUserReferralCount();
}
+ handleCopy = () => {
+ const { icons: ICONS, setSnackNotification } = this.props;
+ setSnackNotification({
+ icon: ICONS.COPY_NOTIFICATION,
+ content: STRINGS['COPY_SUCCESS_TEXT'],
+ });
+ };
+
render() {
const { affiliation_code } = this.props.data;
const { affiliation, icons: ICONS } = this.props;
@@ -96,6 +105,7 @@ const mapStateToProps = (store) => ({
const mapDispatchToProps = (dispatch) => ({
getUserReferralCount: bindActionCreators(getUserReferralCount, dispatch),
+ setSnackNotification: bindActionCreators(setSnackNotification, dispatch),
});
export default connect(mapStateToProps, mapDispatchToProps)(InviteFriends);
diff --git a/web/src/components/Sidebar/_Sidebar.scss b/web/src/components/Sidebar/_Sidebar.scss
index 5f66828f7d..a0af14d05d 100644
--- a/web/src/components/Sidebar/_Sidebar.scss
+++ b/web/src/components/Sidebar/_Sidebar.scss
@@ -154,6 +154,9 @@ $row--size: calc(#{$row--height} - #{$sidebar-sections-padding});
fill: transparent;
}
}
+ img.sidebar-bottom-icon {
+ @include size(3rem);
+ }
}
}
diff --git a/web/src/components/Sidebar/index.js b/web/src/components/Sidebar/index.js
index 25200832ec..81364c0ed5 100644
--- a/web/src/components/Sidebar/index.js
+++ b/web/src/components/Sidebar/index.js
@@ -31,7 +31,7 @@ const Sidebar = ({
})}
>
- {enabledPlugins.includes('announcement') ? (
+ {enabledPlugins.includes('announcements') ? (
{STRINGS['TRADE_TAB_POSTS'].toUpperCase()}
diff --git a/web/src/config/lang/en.js b/web/src/config/lang/en.js
index e115577473..a425c74c8a 100644
--- a/web/src/config/lang/en.js
+++ b/web/src/config/lang/en.js
@@ -1408,9 +1408,9 @@ const nestedContent = {
STATUS_DESCRIPTION:
'You can check the status of your deposit by passing the transaction ID (hash) below.',
TRANSACTION_ID: 'Transaction ID (hash)',
- SEARCH_SUCCESS: 'Transaction found!',
- SEARCH_ERROR:
- 'Transaction not found. Please check the ID and try again. If your believe there is a problem please contact support.',
+ SEARCH_SUCCESS: 'Search complete', // new
+ ADDRESS_FIELD_LABEL: 'Paste your address', // new
+ CURRENCY_FIELD_LABEL: 'Select the currency', // new
},
CANCEL_ORDERS: {
HEADING: 'Cancel orders',
diff --git a/web/src/containers/Admin/General/FooterConfig.js b/web/src/containers/Admin/General/FooterConfig.js
index 82650eef6f..0bdef25a2c 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 { Modal } from 'antd';
+import { message, Modal } from 'antd';
import { PlusOutlined } from '@ant-design/icons';
import _isEqual from 'lodash/isEqual';
@@ -322,35 +322,45 @@ class FooterConfig extends Component {
};
handleAddLink = (formProps) => {
- const custom_fields = { ...this.state.custom_fields };
- let currentField = custom_fields[this.state.currentSection];
- let currentFieldContent = currentField.content || {};
- let currentFieldHeader = currentField.header || {};
- let currentContentFields = currentFieldContent.fields || {};
- custom_fields[this.state.currentSection] = {
- ...currentField,
- content: {
- ...currentFieldContent,
- fields: {
- ...currentContentFields,
- [formProps.link.toLowerCase()]: {
- type: 'input',
- label: formProps.link,
- placeholder: 'http://',
- isClosable: true,
- closeCallback: () =>
- this.handleRemoveLinks(
- currentFieldHeader.fields,
- formProps.link.toLowerCase()
- ),
+ let initialCustom = { ...this.state.initialCustom };
+ if (
+ formProps.link &&
+ Object.keys(initialCustom).includes(formProps.link.toLowerCase())
+ ) {
+ message.warn('Link already exist');
+ } else {
+ const custom_fields = { ...this.state.custom_fields };
+ let currentField = custom_fields[this.state.currentSection];
+ let currentFieldContent = currentField.content || {};
+ let currentFieldHeader = currentField.header || {};
+ let currentContentFields = currentFieldContent.fields || {};
+ custom_fields[this.state.currentSection] = {
+ ...currentField,
+ content: {
+ ...currentFieldContent,
+ fields: {
+ ...currentContentFields,
+ [formProps.link.toLowerCase()]: {
+ type: 'input',
+ label: formProps.link,
+ placeholder: 'http://',
+ isClosable: true,
+ closeCallback: () =>
+ this.handleRemoveLinks(
+ currentFieldHeader.fields,
+ formProps.link.toLowerCase()
+ ),
+ },
},
},
- },
- };
- this.setState({
- custom_fields,
- });
- this.onCancel();
+ };
+ initialCustom[formProps.link.toLowerCase()] = '';
+ this.setState({
+ initialCustom,
+ custom_fields,
+ });
+ this.onCancel();
+ }
};
handleSubmitLinks = (formProps) => {
diff --git a/web/src/containers/Admin/MoveToDash/index.js b/web/src/containers/Admin/MoveToDash/index.js
index 8efa7cc0fc..adeb40882d 100644
--- a/web/src/containers/Admin/MoveToDash/index.js
+++ b/web/src/containers/Admin/MoveToDash/index.js
@@ -17,7 +17,7 @@ const MoveToDash = () => {
/>
-
+ {ReactDOM.createPortal(
+
,
+ document.getElementsByTagName('body')[0]
+ )}
{STRINGS['TRADE_TAB_POSTS']}
- {enabledPlugins.includes('announcement') ? (
+ {enabledPlugins.includes('announcements') ? (
) : null}
diff --git a/web/src/containers/Summary/_Summary.scss b/web/src/containers/Summary/_Summary.scss
index 67095888b7..b0f320b1dd 100644
--- a/web/src/containers/Summary/_Summary.scss
+++ b/web/src/containers/Summary/_Summary.scss
@@ -70,6 +70,7 @@ $trade-tab--arrow-size: 0.4rem;
// width: 17rem;
}
.assets-wrapper {
+ margin-top: 40px;
.price-text {
font-size: $font-size-mobile-txt !important;
}
@@ -152,7 +153,7 @@ $trade-tab--arrow-size: 0.4rem;
font-weight: bold;
}
.summary-section_1 {
- height: 26rem;
+ height: 30rem;
.assets-wrapper {
.donut-container {
@@ -678,9 +679,6 @@ $trade-tab--arrow-size: 0.4rem;
.summary-content-txt {
font-size: 1.2rem !important;
}
- .assets-wrapper {
- margin-top: 40px;
- }
}
}
@media (min-width: 1920px) {
@@ -714,9 +712,9 @@ $trade-tab--arrow-size: 0.4rem;
.requirement-wrapper {
width: 65% !important;
}
- .summary-section_1 {
- height: 29rem !important;
- }
+ // .summary-section_1 {
+ // height: 31rem !important;
+ // }
.summary-section_2 {
height: 43rem !important;
}
@@ -736,7 +734,7 @@ $trade-tab--arrow-size: 0.4rem;
font-size: 0.9rem;
}
.summary-section_1 {
- height: 29rem !important;
+ height: 31rem !important;
}
.summary-section_2 {
height: 44rem !important;
diff --git a/web/src/containers/TransactionsHistory/HistoryDisplay.js b/web/src/containers/TransactionsHistory/HistoryDisplay.js
index f4179d5a30..e1834aefd0 100644
--- a/web/src/containers/TransactionsHistory/HistoryDisplay.js
+++ b/web/src/containers/TransactionsHistory/HistoryDisplay.js
@@ -9,12 +9,13 @@ import {
Dialog,
} from '../../components';
import classnames from 'classnames';
+import { SubmissionError } from 'redux-form';
import STRINGS from '../../config/localizedStrings';
import { EditWrapper } from 'components';
import withConfig from 'components/ConfigProvider/withConfig';
import { STATIC_ICONS } from 'config/icons';
-import { searchUserDeposits } from 'actions/walletActions';
+import { searchTransaction } from 'actions/walletActions';
import CheckDeposit from '../../components/CheckDeposit';
const HistoryDisplay = (props) => {
@@ -31,47 +32,31 @@ const HistoryDisplay = (props) => {
handleDownload,
icons: ICONS,
activeTab,
- setDeposit = () => {},
- setDepositStatusPage = () => {},
} = props;
const [dialogIsOpen, setDialogOpen] = useState(false);
const [isLoading, setLoading] = useState(false);
- const [message, setMessage] = useState('');
+ const [statusMessage, setMessage] = useState('');
+ const [initialValue, setInitialValues] = useState({});
const requestDeposit = (params = {}) => {
setLoading(true);
- searchUserDeposits(params)
+ setInitialValues(params);
+ setMessage('');
+ return searchTransaction(params)
.then((res) => {
setLoading(false);
- if (res.data.data.length === 0) {
- setMessage(STRINGS['DEPOSIT_STATUS.SEARCH_ERROR']);
- } else if (res && res.data && res.data.data && res.data.data.length) {
- let statusTempData = res.data.data[0];
- setDeposit({ ...statusTempData, is_new: true });
- setDepositStatusPage(statusTempData.transaction_id);
+ if (res) {
setMessage(STRINGS['DEPOSIT_STATUS.SEARCH_SUCCESS']);
}
})
.catch((err) => {
+ let _error = err && err.data ? err.data.message : err.message;
setLoading(false);
+ throw new SubmissionError({ _error });
});
};
- const handleSearch = (values) => {
- if (values && values.transaction_id) {
- const filterData = data.filter(
- (item) => item.transaction_id === values.transaction_id
- );
- if (filterData.length !== 0) {
- setDepositStatusPage(values.transaction_id);
- setMessage(STRINGS['DEPOSIT_STATUS.SEARCH_SUCCESS']);
- } else {
- requestDeposit(values);
- }
- }
- };
-
const openDialog = () => {
setDialogOpen(true);
};
@@ -136,12 +121,10 @@ const HistoryDisplay = (props) => {
>
diff --git a/web/src/containers/TransactionsHistory/index.js b/web/src/containers/TransactionsHistory/index.js
index c1ddffe8e7..d1f8dfc687 100644
--- a/web/src/containers/TransactionsHistory/index.js
+++ b/web/src/containers/TransactionsHistory/index.js
@@ -11,7 +11,6 @@ import {
getUserWithdrawals,
withdrawalCancel,
downloadUserTrades,
- setDeposit,
} from '../../actions/walletActions';
import {
@@ -33,7 +32,7 @@ import {
} from './utils';
import TradeAndOrderFilters from './components/TradeAndOrderFilters';
import DepositAndWithdrawlFilters from './components/DepositAndWithdrawlFilters';
-import { RECORD_LIMIT, TABLE_PAGE_SIZE } from './constants';
+import { RECORD_LIMIT } from './constants';
import HistoryDisplay from './HistoryDisplay';
import STRINGS from '../../config/localizedStrings';
@@ -244,21 +243,6 @@ class TransactionsHistory extends Component {
this.onCloseDialog();
};
- setDepositStatusPage = (transactionId) => {
- const { deposits } = this.props;
- const index = deposits.data.findIndex(
- (element) => element.transactionId === transactionId
- );
- const page = index / TABLE_PAGE_SIZE;
- if (this.state.jumpToPage === parseInt(page)) {
- this.setState({ jumpToPage: 0 }, () => {
- this.setState({ jumpToPage: parseInt(page) });
- });
- } else {
- this.setState({ jumpToPage: parseInt(page) });
- }
- };
-
handleNext = (pageCount, pageNumber) => {
const { orders, trades, deposits, withdrawals } = this.props;
const { params } = this.state;
@@ -390,14 +374,7 @@ class TransactionsHistory extends Component {
return
;
}
- return (
-
- );
+ return
;
};
render() {
@@ -563,7 +540,6 @@ const mapDispatchToProps = (dispatch) => ({
downloadUserDeposit: () => dispatch(downloadUserTrades('deposit')),
downloadUserWithdrawal: () => dispatch(downloadUserTrades('withdrawal')),
downloadUserOrders: () => dispatch(downloadUserTrades('orders')),
- setDeposit: (params) => dispatch(setDeposit(params)),
});
export default connect(
diff --git a/web/src/index.css b/web/src/index.css
index e65a5d4ed2..5a8b4b8c24 100644
--- a/web/src/index.css
+++ b/web/src/index.css
@@ -329,13 +329,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;
@@ -916,8 +916,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;
@@ -2171,8 +2171,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;
@@ -2259,7 +2259,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; }
@@ -2360,11 +2360,12 @@ table th {
.layout-mobile .summary-container .summary-content-txt {
font-size: 12px !important; }
-.layout-mobile .summary-container .assets-wrapper .price-text {
- font-size: 12px !important; }
-
-.layout-mobile .summary-container .assets-wrapper .donut-container {
- height: 30rem; }
+.layout-mobile .summary-container .assets-wrapper {
+ margin-top: 40px; }
+ .layout-mobile .summary-container .assets-wrapper .price-text {
+ font-size: 12px !important; }
+ .layout-mobile .summary-container .assets-wrapper .donut-container {
+ height: 30rem; }
.layout-mobile .summary-container .account-details-wrapper .account-type-menu {
height: auto !important; }
@@ -2411,7 +2412,7 @@ table th {
color: var(--specials_buttons-links-and-highlights);
font-weight: bold; }
.summary-container .summary-section_1 {
- height: 26rem; }
+ height: 30rem; }
.summary-container .summary-section_1 .assets-wrapper .donut-container {
height: 16rem;
width: 100%; }
@@ -2796,9 +2797,7 @@ table th {
.summary-container .summary-block-secondaryTitle {
font-size: 1.8rem; }
.summary-container .summary-content-txt {
- font-size: 1.2rem !important; }
- .summary-container .assets-wrapper {
- margin-top: 40px; } }
+ font-size: 1.2rem !important; } }
@media (min-width: 1920px) {
.summary-container {
@@ -2819,8 +2818,6 @@ table th {
.summary-container .trading-volume-wrapper,
.summary-container .requirement-wrapper {
width: 65% !important; }
- .summary-container .summary-section_1 {
- height: 29rem !important; }
.summary-container .summary-section_2 {
height: 43rem !important; }
.fee-limits-wrapper .content-txt {
@@ -2833,7 +2830,7 @@ table th {
.summary-container .trader-account-wrapper {
font-size: 0.9rem; }
.summary-container .summary-section_1 {
- height: 29rem !important; }
+ height: 31rem !important; }
.summary-container .summary-section_2 {
height: 44rem !important; }
.fee-limits-wrapper .content-txt {
@@ -3941,6 +3938,9 @@ table th {
height: 3rem;
stroke: var(--labels_secondary-inactive-label-text-graphics);
fill: transparent; }
+ .sidebar-bottom-wrapper .sidebar-bottom-button img.sidebar-bottom-icon {
+ width: 3rem;
+ height: 3rem; }
.direction_ltr .sidebar-row .cell-wrapper:not(:last-child) {
border-right: 1px solid var(--calculated_secondary-border); }
@@ -6263,14 +6263,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 {
@@ -8905,7 +8905,7 @@ foreignObject {
border-top: 1px solid var(--calculated_secondary-border);
margin-top: 3rem;
padding: 10px 0; }
- .check-deposit-modal-wrapper .inner-content span {
+ .check-deposit-modal-wrapper .inner-content .field-header {
color: var(--labels_secondary-inactive-label-text-graphics); }
.check-deposit-modal-wrapper .inner-content .success-msg {
width: 320px;
diff --git a/web/src/index.js b/web/src/index.js
index e89ab1dbc2..92f99488cc 100644
--- a/web/src/index.js
+++ b/web/src/index.js
@@ -65,7 +65,7 @@ const getConfigs = async () => {
const kitData = await getKitData();
const {
- meta: { versions: remoteVersions = {} } = {},
+ meta: { versions: remoteVersions = {}, sections = {} } = {},
valid_languages = '',
info: { initialized },
setup_completed,
@@ -73,6 +73,8 @@ const getConfigs = async () => {
logo_image,
} = kitData;
+ kitData['sections'] = sections;
+
const promises = {};
Object.keys(remoteVersions).forEach((key) => {
const localVersion = localVersions[key];
diff --git a/web/src/reducers/walletReducer.js b/web/src/reducers/walletReducer.js
index 8c94e28095..9cf957b0bb 100644
--- a/web/src/reducers/walletReducer.js
+++ b/web/src/reducers/walletReducer.js
@@ -287,14 +287,6 @@ export default function reducer(state = INITIAL_STATE, { type, payload }) {
loading: false,
},
};
- case ACTION_KEYS.DEPOSIT_STATUS_SUCCESS:
- return {
- ...state,
- trades: {
- ...state.trades,
- data: [payload, ...state.trades.data],
- },
- };
case 'LOGOUT':
return INITIAL_STATE;
default: