Skip to content

Commit

Permalink
Merge pull request #3096 from hollaex/testnet
Browse files Browse the repository at this point in the history
Testnet
  • Loading branch information
abeikverdi authored Nov 19, 2024
2 parents 8be5f8e + 2b3c96e commit 1b59b1b
Show file tree
Hide file tree
Showing 39 changed files with 2,407 additions and 668 deletions.
2 changes: 1 addition & 1 deletion server/api/swagger/swagger.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const definition = {
swagger: '2.0',
info: {
title: 'HollaEx Kit',
version: '2.13.0'
version: '2.13.1'
},
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.13.0",
"version": "2.13.1",
"private": false,
"description": "HollaEx Kit",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion server/utils/hollaex-network-lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1754,7 +1754,7 @@ class HollaExNetwork {
data.email = true;
}

if (opts.category && ['stake', 'referral', 'internal'].includes(opts.category)) {
if (opts.category) {
data.category = opts.category;
}

Expand Down
9 changes: 6 additions & 3 deletions server/utils/hollaex-tools-lib/tools/p2p.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const fetchP2PDeals = async (opts = {
}
});
} else {
const p2pDeals = await client.getAsync(`p2p-deals${opts.user_id}`);
const p2pDeals = await client.getAsync(`p2p-deals${opts.user_id || 'all'}`);

if (p2pDeals) return JSON.parse(p2pDeals);
else {
Expand All @@ -138,7 +138,7 @@ const fetchP2PDeals = async (opts = {
}
}

await client.setexAsync(`p2p-deals${opts.user_id}`, 30, JSON.stringify(deals));
await client.setexAsync(`p2p-deals${opts.user_id || 'all'}`, 30, JSON.stringify(deals));

return deals;
}
Expand Down Expand Up @@ -352,6 +352,7 @@ const updateP2PDeal = async (data) => {
}
});
await client.delAsync(`p2p-deals${merchant_id}`);
await client.delAsync(`p2p-dealsall`);
await getModel('p2pDeal').update({ status }, { where : { id : edited_ids }});
return { message : 'success' };
}
Expand Down Expand Up @@ -410,7 +411,7 @@ const updateP2PDeal = async (data) => {
};

await client.delAsync(`p2p-deals${merchant_id}`);

await client.delAsync(`p2p-dealsall`);
return p2pDeal.update(data, {
fields: [
'merchant_id',
Expand Down Expand Up @@ -446,6 +447,8 @@ const deleteP2PDeal = async (removed_ids, user_id) => {
};

await client.delAsync(`p2p-deals${user_id}`);
await client.delAsync(`p2p-dealsall`);

const promises = deals.map(async (deal) => {
return await deal.destroy();
});
Expand Down
2 changes: 1 addition & 1 deletion server/utils/hollaex-tools-lib/tools/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3403,7 +3403,7 @@ const getPaymentDetails = async (user_id, opts = {
const query = {
where: {
created_at: timeframe,
user_id,
...(user_id && { user_id }),
...(opts.is_p2p && { is_p2p: opts.is_p2p }),
...(opts.is_fiat_control && { is_fiat_control: opts.is_fiat_control }),
...(opts.status && { status: opts.status })
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.13.0
2.13.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.13.0",
"version": "2.13.1",
"private": true,
"dependencies": {
"@ant-design/compatible": "1.0.5",
Expand Down
27 changes: 23 additions & 4 deletions web/src/components/AppBar/PairTabs.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import classnames from 'classnames';
import { browserHistory } from 'react-router';
import { Dropdown } from 'antd';
Expand All @@ -14,7 +15,10 @@ import withConfig from 'components/ConfigProvider/withConfig';
import { formatToCurrency } from 'utils/currency';
import { MarketsSelector } from 'containers/Trade/utils';
import SparkLine from 'containers/TradeTabs/components/SparkLine';
import { getSparklines } from 'actions/chartAction';
import { changeSparkLineChartData } from 'actions/appActions';

let isMounted = false;
class PairTabs extends Component {
state = {
activePairTab: '',
Expand All @@ -29,9 +33,6 @@ class PairTabs extends Component {
}
this.setState({ activePairTab: active });
this.initTabs(pairs, active);
// getSparklines(Object.keys(pairs)).then((chartData) =>
// this.props.changeSparkLineChartData(chartData)
// );
}

UNSAFE_componentWillReceiveProps(nextProps) {
Expand Down Expand Up @@ -98,6 +99,7 @@ class PairTabs extends Component {
markets,
quicktrade,
sparkLineChartData,
pairs,
} = this.props;
const market = markets.find(({ key }) => key === activePairTab) || {};
const {
Expand All @@ -107,6 +109,13 @@ class PairTabs extends Component {
display_name,
} = market;

if (activePairTab && !isMounted) {
isMounted = true;
getSparklines(Object.keys(pairs)).then((chartData) =>
this.props.changeSparkLineChartData(chartData)
);
}

const filterQuickTrade = quicktrade.filter(({ type }) => type !== 'pro');
return (
<div className="d-flex justify-content-between">
Expand Down Expand Up @@ -278,4 +287,14 @@ const mapStateToProps = (state) => {
};
};

export default connect(mapStateToProps)(withConfig(PairTabs));
const mapDispatchToProps = (dispatch) => ({
changeSparkLineChartData: bindActionCreators(
changeSparkLineChartData,
dispatch
),
});

export default connect(
mapStateToProps,
mapDispatchToProps
)(withConfig(PairTabs));
14 changes: 12 additions & 2 deletions web/src/config/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2092,6 +2092,8 @@
"USER_NAME": "Buyer name:",
"ORDER_INITIATED_VENDOR": "Order has been initiated by",
"CONFIRM_PAYMENT_VENDOR": "Please communicate with the buyer to confirm this transaction.",
"CONFIRM_PAYMENT_RELEASE": "You must confirm and release the crypto.",
"CONFIRM_PAYMENT_TRANSFER": "You must confirm that you've transferred the money",
"ORDER_INITIATED": "You've initiated and created an order with",
"CONFIRM_PAYMENT": "Please communicate with the seller to confirm your incoming payment.",
"YOU": "You",
Expand Down Expand Up @@ -2244,7 +2246,7 @@
"INPUT_PAYMENT_DETAIL_TEXT": "Input the payment detail name",
"UNVERIFIED": "Unverified",
"VERIFIED": "Verified",
"AMOUNT_RECEIVE": "will be released from your balance",
"AMOUNT_RECEIVE": "{0} {1} was released from your wallet balance.",
"DELETE_WARNING": "Are you sure you want to delete this payment method?",
"STEP_1": "Step 1/3",
"STEP_2": "Step 2/3",
Expand Down Expand Up @@ -2278,7 +2280,15 @@
"CANCEL_WARNING_TEXT": "Please note that frequent order cancellations may negatively affect your public P2P profile and could result in your account being suspended.",
"UPDATE": "Update",
"TERMS_ERROR_TEXT": "Please Input Terms field",
"RESPONSE_ERROR_TEXT": "Please Input Response field"
"RESPONSE_ERROR_TEXT": "Please Input Response field",
"CHECK_CONFIRM_TITLE": "Check, confirm and release",
"CHECK_CONFIRM_PAYMENT_DESC_1": "Check that you have indeed received the payment: {0} {1}",
"CHECK_CONFIRM_PAYMENT_DESC_2": "After confirming below the crypto ({0} {1}) will be released.",
"CHECK_CONFIRM_DECLARATION": "I confirm that I have received the correct payment",
"P2P_ORDER_COMPLETE": "P2P Order Complete",
"EXIST_PAYMENT_METHOD_DESC": "You’ve already added a payment method for {0}",
"ADMIN_ORDER_CANCELLATION_MESSAGE": "An exchange operator has cancelled this order. The transaction is closed.",
"TIME_LIMIT_REACHED": "0:00 (Please contact your counter-party)"
},
"VOLUME": {
"VOLUME": "VOLUME",
Expand Down
51 changes: 51 additions & 0 deletions web/src/containers/Admin/Trades/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -791,3 +791,54 @@
.p2p-admin-select-asset .ant-select-item {
cursor: text;
}

.p2p-admin-confirm-warning-popup-wrapper .ant-modal-body {
background-color: #27339d;
color: white;
}

.p2p-admin-confirm-warning-popup-wrapper .p2p-admin-confirm-popup .title {
font-size: 18px;
}

.p2p-admin-confirm-warning-popup-wrapper
.p2p-admin-confirm-popup
.confirm-button-container {
margin-top: 5%;
display: flex;
gap: 5%;
}

.p2p-admin-confirm-warning-popup-wrapper
.p2p-admin-confirm-popup
.confirm-button-container
.green-btn {
border: none;
}

.p2p-admin-confirm-warning-popup-wrapper .ant-modal-close-x {
color: white;
}

.p2p-admin-order-details-popup-wrapper
.p2p-admin-order-details-container
.title {
font-size: 22px;
margin-bottom: 3%;
}

.p2p-admin-order-details-popup-wrapper
.p2p-admin-order-details-container
.order-details {
margin-top: 2%;
display: flex;
align-items: center;
}

.p2p-admin-order-details-popup-wrapper
.p2p-admin-order-details-container
.order-details
.asset-icon {
position: relative;
top: 3px;
}
16 changes: 12 additions & 4 deletions web/src/containers/Admin/Trades/p2p.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
/* eslint-disable */
import React, { useState } from 'react';
import { Tabs } from 'antd';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { Tabs } from 'antd';

import './index.css';
import P2PDeals from './p2pDeals';
import P2PDisputes from './p2pDisputes';
import P2PSettings from './p2pSettings';

import P2PActive from './p2pActive';
import P2PUnverifiedPayments from './p2punverifiedPayments';
import { setExchange } from 'actions/assetActions';
import './index.css';

const TabPane = Tabs.TabPane;

Expand Down Expand Up @@ -39,9 +41,15 @@ const P2P = () => {
<TabPane tab="P2P settings" key="1">
<P2PSettings />
</TabPane>
<TabPane tab="Disputes" key="2">
<TabPane tab="Active" key="2">
<P2PActive />
</TabPane>
<TabPane tab="Disputes" key="3">
<P2PDisputes />
</TabPane>
<TabPane tab="Unverified accounts" key="4">
<P2PUnverifiedPayments />
</TabPane>
</Tabs>
</div>
);
Expand Down
Loading

0 comments on commit 1b59b1b

Please sign in to comment.