Skip to content

Commit

Permalink
Merge pull request #2884 from hollaex/testnet
Browse files Browse the repository at this point in the history
Testnet
  • Loading branch information
abeikverdi authored Jun 20, 2024
2 parents 8ca6189 + 3ff8f64 commit 5bf1453
Show file tree
Hide file tree
Showing 15 changed files with 1,024 additions and 465 deletions.
18 changes: 12 additions & 6 deletions server/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ const checkStatus = () => {
configuration.coins[coin.symbol] = {
...coin,
...configuration?.kit?.fiat_fees?.[coin.symbol]
}
};
} else {
configuration.coins[coin.symbol] = coin;
}
Expand All @@ -162,12 +162,12 @@ const checkStatus = () => {
// only add the network pair if both coins in the market are already subscribed in the exchange
const [ base, quote ] = e.split('-');
if (configuration.coins[base] && configuration.coins[quote]) {
configuration.networkQuickTrades.push(exchange.brokers[e])
configuration.networkQuickTrades.push(exchange.brokers[e]);
return e;
}
});

let quickTradePairs = quickTrades.map((q) => q.symbol)
let quickTradePairs = quickTrades.map((q) => q.symbol);

// check the status of quickTrades
for (let qt of quickTrades) {
Expand Down Expand Up @@ -220,8 +220,8 @@ const checkStatus = () => {
symbol: qt.symbol,
active: qt.active
};
configuration.quicktrade.push(item)
})
configuration.quicktrade.push(item);
});


for (let tier of tiers) {
Expand All @@ -241,7 +241,7 @@ const checkStatus = () => {
};
const defaultFees = DEFAULT_FEES[exchange.plan]
? DEFAULT_FEES[exchange.plan]
: { maker: 0.2, taker: 0.2 }
: { maker: 0.2, taker: 0.2 };

for (let pair of quickTradePairs) {
if (!isNumber(tier.fees.maker[pair])) {
Expand Down Expand Up @@ -328,6 +328,12 @@ const checkStatus = () => {
);
loggerInit.info('init/checkStatus/activation complete');
return networkNodeLib;
})
.catch((err) => {
loggerInit.info('init/checkStatus/catch error', err.message);
setTimeout(() => {
process.exit(0);
}, 5000);
});
};

Expand Down
Empty file.
Empty file.
2 changes: 1 addition & 1 deletion web/src/components/AppBar/_AppBar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1143,7 +1143,7 @@ $app-menu-width: calc(100vw - 40rem);
// }

.app-menu-bar-content {
width: 10rem;
width: 8rem;
}
}
.app-bar-add-tab-menu {
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/Notification/Deposit.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const DepositNotification = ({
</div>
<div className="notification-buttons-wrapper d-flex">
<Button
label={STRINGS['SUMMARY.DEPOSIT']}
label={STRINGS['DEPOSIT.VIEW_DEPOSIT']}
onClick={() => onHandleDeposit()}
className="w-50 mr-2"
/>
Expand Down
13 changes: 8 additions & 5 deletions web/src/config/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@
},
"QR_CODE": "This QR code contains the deposit information and can be scanned with a QR code reader.",
"NO_DATA": "No information available",
"QR_CODE_TITLE": "{0} Deposit Information"
"QR_CODE_TITLE": "{0} Deposit Information",
"VIEW_DEPOSIT": "View Deposit"
},
"QR_CODE": {
"SCAN": "Scan",
Expand Down Expand Up @@ -1373,7 +1374,7 @@
"TABLE_TITLE": "All successful referrals",
"USER": "User / email",
"TIME": "Time of sign up",
"CODE": "Code used",
"CODE": "Code",
"EARNING": "Earnings value",
"HISTORY_DESCRIPTION": "Select specific dates to fetch your referral history data",
"START_DATE": "Start Date",
Expand Down Expand Up @@ -1402,7 +1403,7 @@
"TIME_OF_SETTLEMENT": "Time of settlement",
"CREATION_DATE": "Creation Date",
"REFERRAL_COUNT": "Referral Count",
"YOUR_EARNING_RATE": "Your earning rate:",
"YOUR_EARNING_RATE": "Earning rate:",
"DISCOUNT_GIVEN": "Discount given:",
"LINK": "Link",
"CREATE_REFERRAL_LINK": "Create new referral code/link",
Expand Down Expand Up @@ -1449,7 +1450,8 @@
"INSUFFICIENT_LABEL": "Insufficient Settlement Amount",
"INSUFFICIENT_INFO_1": "Your earnings are currently insufficient for settlement. Please invite more members using your referral link and wait until your unsettled earnings {0} {1}",
"INSUFFICIENT_INFO_2": "exceed 1",
"GO_TO_REFERRAL": "Go To Referral"
"GO_TO_REFERRAL": "Go To Referral",
"REFER_DESC": "Share a link below with friends to Start earning commissions on their trading"
},
"NOT_LOGGEDIN": {
"TEXT_GENERAL": "To view you must login",
Expand Down Expand Up @@ -1718,7 +1720,8 @@
"ORDERBOOK": "Orderbook",
"NETWORK": "Network Broker OTC",
"BROKER": "Local Broker OTC",
"BROKERAGE": "NA - (Brokerage)"
"BROKERAGE": "NA - (Brokerage)",
"LOADING_PRICES": "Loading Prices..."
},
"HOLLAEX_TOKEN": {
"REMOVE_FAVOURITES": "Remove from favourites",
Expand Down
68 changes: 34 additions & 34 deletions web/src/containers/Admin/AdminFinancials/Assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -684,8 +684,8 @@ class Assets extends Component {
} = this.state;

const { owner_id, created_by, verified, type } = selectedAsset;
const showMintAndBurnButtons = verified && owner_id === user_id;
const showConfigureButton = created_by === user_id || owner_id === user_id || type === 'fiat';
const showMintAndBurnButtons = verified && (owner_id === user_id || type === 'fiat');
const showConfigureButton = created_by === user_id || owner_id === user_id ;

if (isConfigure) {
return (
Expand Down Expand Up @@ -736,39 +736,39 @@ class Assets extends Component {
isLoading={isLoading}
/>
</div>
{showConfigureButton && (
<div>
<div className="d-flex">
<Button
type="primary"
className="green-btn"
onClick={this.handleConfigure}
>
Configure
</Button>
<div className="separator" />
{showMintAndBurnButtons && (
<Fragment>
<Button
className="green-btn"
type="primary"
onClick={() => this.handleConfigureEdit('mint')}
>
Mint
</Button>
<div className="separator" />
<Button
className="green-btn"
type="primary"
onClick={() => this.handleConfigureEdit('burn')}
>
Burn
</Button>
</Fragment>
)}
</div>
<div>
<div className="d-flex">
{showConfigureButton && (
<Button
type="primary"
className="green-btn"
onClick={this.handleConfigure}
>
Configure
</Button>
)}
<div className="separator" />
{showMintAndBurnButtons && (
<Fragment>
<Button
className="green-btn"
type="primary"
onClick={() => this.handleConfigureEdit('mint')}
>
Mint
</Button>
<div className="separator" />
<Button
className="green-btn"
type="primary"
onClick={() => this.handleConfigureEdit('burn')}
>
Burn
</Button>
</Fragment>
)}
</div>
)}
</div>
</div>
);
}
Expand Down
27 changes: 16 additions & 11 deletions web/src/containers/DigitalAssets/components/AssetsWrapper.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { withRouter } from 'react-router';
import { isMobile } from 'react-device-detect';
import {
formatPercentage,
formatToCurrency,
countDecimals,
} from 'utils/currency';
import { isMobile } from 'react-device-detect';
import { SearchBox } from 'components';
import STRINGS from 'config/localizedStrings';
import { quicktradePairSelector } from 'containers/QuickTrade/components/utils';
import withConfig from 'components/ConfigProvider/withConfig';
import { getMiniCharts } from 'actions/chartAction';
import AssetsList from 'containers/DigitalAssets/components/AssetsList';
import { RenderLoading } from './utils';

function onHandleInitialLoading(ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
Expand Down Expand Up @@ -243,16 +244,20 @@ class AssetsWrapper extends Component {
/>
</div>
</div>
<AssetsList
loading={isLoading ? true : !data.length}
coinsListData={data}
page={page}
pageSize={pageSize}
count={count}
goToNextPage={this.goToNextPage}
goToPreviousPage={this.goToPreviousPage}
showPaginator={count > pageSize}
/>
{data.length ? (
<AssetsList
loading={isLoading}
coinsListData={data}
page={page}
pageSize={pageSize}
count={count}
goToNextPage={this.goToNextPage}
goToPreviousPage={this.goToPreviousPage}
showPaginator={count > pageSize}
/>
) : (
<RenderLoading />
)}
</div>
);
}
Expand Down
69 changes: 69 additions & 0 deletions web/src/containers/DigitalAssets/components/utils.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import React from 'react';
import { Spin } from 'antd';
import { CaretDownOutlined, CaretUpOutlined } from '@ant-design/icons';
import math from 'mathjs';
import STRINGS from 'config/localizedStrings';
import { createSelector } from 'reselect';
import { DIGITAL_ASSETS_SORT } from 'actions/appActions';
import { unsortedMarketsSelector, getPairs } from 'containers/Trade/utils';
import { getPinnedAssets } from 'containers/Wallet/utils';
import { EditWrapper } from 'components';

const getSortMode = (state) => state.app.digital_assets_sort.mode;
const getSortDir = (state) => state.app.digital_assets_sort.is_descending;
Expand Down Expand Up @@ -147,3 +152,67 @@ export const dataSelector = createSelector(
return Object.values(data);
}
);

export const RenderLoading = () => {
const renderCaret = () => (
<div className="market-list__caret d-flex flex-direction-column mx-1 secondary-text">
<CaretUpOutlined />
<CaretDownOutlined />
</div>
);

return (
<div>
<div className="d-flex justify-content-around custom-header-wrapper">
<div>
<EditWrapper stringId="MARKETS_TABLE.ASSET">
{STRINGS['MARKETS_TABLE.ASSET']}
</EditWrapper>
</div>
<div className="d-flex">
<EditWrapper stringId="MARKETS_TABLE.TRADING_SYMBOL">
{STRINGS['MARKETS_TABLE.TRADING_SYMBOL']}
</EditWrapper>
</div>
<div>
<EditWrapper stringId="MARKETS_TABLE.LAST_PRICE">
{STRINGS['MARKETS_TABLE.LAST_PRICE']}
</EditWrapper>
</div>
<div className="d-flex pointer">
<EditWrapper stringId="MARKETS_TABLE.CHANGE_1D">
{STRINGS['MARKETS_TABLE.CHANGE_1D']}
</EditWrapper>
{renderCaret()}
</div>
<div className="d-flex pointer">
<EditWrapper stringId="MARKETS_TABLE.CHANGE_7D">
{STRINGS['MARKETS_TABLE.CHANGE_7D']}
</EditWrapper>
{renderCaret()}
</div>
<div>
<EditWrapper stringId="MARKETS_TABLE.CHART_7D">
{STRINGS['MARKETS_TABLE.CHART_7D']}
</EditWrapper>
</div>
<div>
<EditWrapper stringId="TRADE_TAB_TRADE">
{STRINGS['TRADE_TAB_TRADE']}
</EditWrapper>
</div>
</div>
<div className="custom-border-bottom"></div>
<Spin
className="d-flex justify-content-center"
loading={true}
size="large"
></Spin>
<div className="text-center">
<EditWrapper stringId="DIGITAL_ASSETS.LOADING_PRICES">
{STRINGS['DIGITAL_ASSETS.LOADING_PRICES']}
</EditWrapper>
</div>
</div>
);
};
Loading

0 comments on commit 5bf1453

Please sign in to comment.