Skip to content

Commit

Permalink
Merge pull request #1646 from hollaex/testnet
Browse files Browse the repository at this point in the history
Testnet
  • Loading branch information
abeikverdi authored Sep 6, 2022
2 parents 5e01776 + d8f69af commit 009b2cd
Show file tree
Hide file tree
Showing 6 changed files with 128 additions and 117 deletions.
2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"node-cron": "2.0.3",
"nodemailer": "6.4.6",
"npm": "8.19.1",
"npmi": "4.0.0",
"npm-programmatic": "0.0.12",
"otp": "0.1.3",
"pg": "6.4.2",
"pg-hstore": "2.3.2",
Expand Down
60 changes: 21 additions & 39 deletions server/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const { Plugin } = require('../db/models');
const path = require('path');
const fs = require('fs');
const latestVersion = require('latest-version');
const npmi = require('npmi');
const npm = require('npm-programmatic');
const sequelize = require('sequelize');
const _eval = require('eval');
const toolsLib = require('hollaex-tools-lib');
Expand Down Expand Up @@ -76,48 +76,30 @@ const getInstalledLibrary = async (name, version) => {

const installLibrary = async (library) => {
const [name, version = 'latest'] = library.split('@');
const options = {
name,
version,
path: '.',
forceInstall: false,
npmLoad: {
loglevel: 'silent'
}
};


npmi(options, function (err, result) {
if (err) {
if (err.code === npmi.LOAD_ERR) {
loggerPlugin.error(
'plugins/installLibrary',
`Error installing packages for plugin ${name}`,
err.code,
err.message
);
}
else if (err.code === npmi.INSTALL_ERR) {
loggerPlugin.error(
'plugins/installLibrary',
`Error installing packages for plugin ${name}`,
err.code,
err.message
);
}
throw new Error(err.message);
}
try {
const data = await getInstalledLibrary(name, version);
return data;
} catch (err) {
loggerPlugin.verbose(
'plugins/index/installLibrary',
`${name} version ${version} installing`
);

// installed
loggerPlugin.info(
'plugins/installLibrary',
`Successful installation of packages for plugin ${name}`,
options.name+'@'+options.version+' installed successfully in '+path.resolve(options.path)
await npm.install([`${name}@${version}`], {
cwd: path.resolve(__dirname, '../'),
save: true,
output: true
});

loggerPlugin.verbose(
'plugins/index/installLibrary',
`${name} version ${version} installed`
);
});

const lib = require(name);
return lib;
const lib = require(name);
return lib;
}
};

checkStatus()
Expand Down
1 change: 1 addition & 0 deletions web/src/containers/Summary/_Summary.scss
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,7 @@ $trade-tab--arrow-size: 0.4rem;
width: 3rem;

svg {
width: 2.5rem;
.btc0,
.btc1 {
fill: $coin-btc;
Expand Down
9 changes: 8 additions & 1 deletion web/src/containers/TradeTabs/components/MarketRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,14 @@ class MarketRow extends Component {
</td>
<td className="td-chart">
<SparkLine
data={chartData[key] || []}
data={
!chartData[key] ||
(chartData[key] &&
chartData[key].close &&
chartData[key].close.length < 2)
? { close: [0.1, 0.1, 0.1], open: [] }
: chartData[key]
}
containerProps={{ style: { height: '100%', width: '100%' } }}
/>
</td>
Expand Down
2 changes: 2 additions & 0 deletions web/src/containers/TradeTabs/components/_MarketList.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
margin: 0.3rem 0.3rem 0 0.3rem;

svg {
width: 2.5rem !important;
height: 2.5rem !important;
.btc0,
.btc1 {
fill: $coin-btc;
Expand Down
171 changes: 95 additions & 76 deletions web/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,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.chart-embed {
Expand All @@ -379,8 +379,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 @@ -3238,8 +3238,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 @@ -3393,7 +3393,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 @@ -3762,36 +3762,38 @@ table th {
margin-bottom: 8px; }
.summary-container .assets-wrapper .coin-price-container .coin-price {
width: 3rem; }
.summary-container .assets-wrapper .coin-price-container .coin-price svg .btc0,
.summary-container .assets-wrapper .coin-price-container .coin-price svg .btc1 {
fill: var(--coin-btc); }
.summary-container .assets-wrapper .coin-price-container .coin-price svg .eth0,
.summary-container .assets-wrapper .coin-price-container .coin-price svg .eth1 {
fill: var(--coin-eth); }
.summary-container .assets-wrapper .coin-price-container .coin-price svg .bch-icon {
fill: var(--coin-bch); }
.summary-container .assets-wrapper .coin-price-container .coin-price svg .xrp-icon {
fill: var(--coin-xrp); }
.summary-container .assets-wrapper .coin-price-container .coin-price svg .xmr-icon {
fill: var(--coin-xmr); }
.summary-container .assets-wrapper .coin-price-container .coin-price svg .ada-icon {
fill: var(--coin-ada); }
.summary-container .assets-wrapper .coin-price-container .coin-price svg .bnb-icon {
fill: var(--coin-bnb); }
.summary-container .assets-wrapper .coin-price-container .coin-price svg .dai-icon {
fill: var(--coin-dai); }
.summary-container .assets-wrapper .coin-price-container .coin-price svg .eos-icon {
fill: var(--coin-eos); }
.summary-container .assets-wrapper .coin-price-container .coin-price svg .ltc-icon {
fill: var(--coin-ltc); }
.summary-container .assets-wrapper .coin-price-container .coin-price svg .trx-icon {
fill: var(--coin-trx); }
.summary-container .assets-wrapper .coin-price-container .coin-price svg .tusd-icon {
fill: var(--coin-tusd); }
.summary-container .assets-wrapper .coin-price-container .coin-price svg .xlm-icon {
fill: var(--coin-xlm); }
.summary-container .assets-wrapper .coin-price-container .coin-price svg .default-icon {
fill: var(--labels_secondary-inactive-label-text-graphics) !important; }
.summary-container .assets-wrapper .coin-price-container .coin-price svg {
width: 2.5rem; }
.summary-container .assets-wrapper .coin-price-container .coin-price svg .btc0,
.summary-container .assets-wrapper .coin-price-container .coin-price svg .btc1 {
fill: var(--coin-btc); }
.summary-container .assets-wrapper .coin-price-container .coin-price svg .eth0,
.summary-container .assets-wrapper .coin-price-container .coin-price svg .eth1 {
fill: var(--coin-eth); }
.summary-container .assets-wrapper .coin-price-container .coin-price svg .bch-icon {
fill: var(--coin-bch); }
.summary-container .assets-wrapper .coin-price-container .coin-price svg .xrp-icon {
fill: var(--coin-xrp); }
.summary-container .assets-wrapper .coin-price-container .coin-price svg .xmr-icon {
fill: var(--coin-xmr); }
.summary-container .assets-wrapper .coin-price-container .coin-price svg .ada-icon {
fill: var(--coin-ada); }
.summary-container .assets-wrapper .coin-price-container .coin-price svg .bnb-icon {
fill: var(--coin-bnb); }
.summary-container .assets-wrapper .coin-price-container .coin-price svg .dai-icon {
fill: var(--coin-dai); }
.summary-container .assets-wrapper .coin-price-container .coin-price svg .eos-icon {
fill: var(--coin-eos); }
.summary-container .assets-wrapper .coin-price-container .coin-price svg .ltc-icon {
fill: var(--coin-ltc); }
.summary-container .assets-wrapper .coin-price-container .coin-price svg .trx-icon {
fill: var(--coin-trx); }
.summary-container .assets-wrapper .coin-price-container .coin-price svg .tusd-icon {
fill: var(--coin-tusd); }
.summary-container .assets-wrapper .coin-price-container .coin-price svg .xlm-icon {
fill: var(--coin-xlm); }
.summary-container .assets-wrapper .coin-price-container .coin-price svg .default-icon {
fill: var(--labels_secondary-inactive-label-text-graphics) !important; }
.summary-container .asset_wrapper_width {
width: 100%; }
.summary-container .xht_asset_wrapper_width {
Expand Down Expand Up @@ -4096,36 +4098,39 @@ table th {
.market-list__container .market-list__block .market-list__coin-icons {
width: 2.8rem;
margin: 0.3rem 0.3rem 0 0.3rem; }
.market-list__container .market-list__block .market-list__coin-icons svg .btc0,
.market-list__container .market-list__block .market-list__coin-icons svg .btc1 {
fill: var(--coin-btc); }
.market-list__container .market-list__block .market-list__coin-icons svg .eth0,
.market-list__container .market-list__block .market-list__coin-icons svg .eth1 {
fill: var(--coin-eth); }
.market-list__container .market-list__block .market-list__coin-icons svg .bch-icon {
fill: var(--coin-bch); }
.market-list__container .market-list__block .market-list__coin-icons svg .xrp-icon {
fill: var(--coin-xrp); }
.market-list__container .market-list__block .market-list__coin-icons svg .xmr-icon {
fill: var(--coin-xmr); }
.market-list__container .market-list__block .market-list__coin-icons svg .ada-icon {
fill: var(--coin-ada); }
.market-list__container .market-list__block .market-list__coin-icons svg .bnb-icon {
fill: var(--coin-bnb); }
.market-list__container .market-list__block .market-list__coin-icons svg .dai-icon {
fill: var(--coin-dai); }
.market-list__container .market-list__block .market-list__coin-icons svg .eos-icon {
fill: var(--coin-eos); }
.market-list__container .market-list__block .market-list__coin-icons svg .ltc-icon {
fill: var(--coin-ltc); }
.market-list__container .market-list__block .market-list__coin-icons svg .trx-icon {
fill: var(--coin-trx); }
.market-list__container .market-list__block .market-list__coin-icons svg .tusd-icon {
fill: var(--coin-tusd); }
.market-list__container .market-list__block .market-list__coin-icons svg .xlm-icon {
fill: var(--coin-xlm); }
.market-list__container .market-list__block .market-list__coin-icons svg .default-icon {
fill: var(--labels_secondary-inactive-label-text-graphics) !important; }
.market-list__container .market-list__block .market-list__coin-icons svg {
width: 2.5rem !important;
height: 2.5rem !important; }
.market-list__container .market-list__block .market-list__coin-icons svg .btc0,
.market-list__container .market-list__block .market-list__coin-icons svg .btc1 {
fill: var(--coin-btc); }
.market-list__container .market-list__block .market-list__coin-icons svg .eth0,
.market-list__container .market-list__block .market-list__coin-icons svg .eth1 {
fill: var(--coin-eth); }
.market-list__container .market-list__block .market-list__coin-icons svg .bch-icon {
fill: var(--coin-bch); }
.market-list__container .market-list__block .market-list__coin-icons svg .xrp-icon {
fill: var(--coin-xrp); }
.market-list__container .market-list__block .market-list__coin-icons svg .xmr-icon {
fill: var(--coin-xmr); }
.market-list__container .market-list__block .market-list__coin-icons svg .ada-icon {
fill: var(--coin-ada); }
.market-list__container .market-list__block .market-list__coin-icons svg .bnb-icon {
fill: var(--coin-bnb); }
.market-list__container .market-list__block .market-list__coin-icons svg .dai-icon {
fill: var(--coin-dai); }
.market-list__container .market-list__block .market-list__coin-icons svg .eos-icon {
fill: var(--coin-eos); }
.market-list__container .market-list__block .market-list__coin-icons svg .ltc-icon {
fill: var(--coin-ltc); }
.market-list__container .market-list__block .market-list__coin-icons svg .trx-icon {
fill: var(--coin-trx); }
.market-list__container .market-list__block .market-list__coin-icons svg .tusd-icon {
fill: var(--coin-tusd); }
.market-list__container .market-list__block .market-list__coin-icons svg .xlm-icon {
fill: var(--coin-xlm); }
.market-list__container .market-list__block .market-list__coin-icons svg .default-icon {
fill: var(--labels_secondary-inactive-label-text-graphics) !important; }

.market-list__container .market-list__block .market-list__block-table {
width: 100%;
Expand Down Expand Up @@ -5533,8 +5538,7 @@ table th {
height: 0.5px;
opacity: 0.7; }
.modal-market-menu .app-bar-search-field {
flex-direction: row;
padding-left: 0.5rem; }
flex-direction: row; }
.modal-market-menu .app-bar-add-tab-search {
height: 4rem; }
.modal-market-menu .app-bar-tab-menu-list {
Expand All @@ -5556,7 +5560,7 @@ table th {
padding: 0.3rem 0; }
.modal-market-menu .app-bar-add-tab-content .scroll-view {
overflow-y: auto;
height: calc( 100vh - 19rem - 8rem); }
height: calc( 100vh - 19rem - 8rem); }
.modal-market-menu .app-bar-tab-overflow-content {
background-color: var(--base_background);
color: var(--labels_secondary-inactive-label-text-graphics);
Expand Down Expand Up @@ -7706,6 +7710,17 @@ table th {
.field-children .field-valid svg {
width: 1.25rem;
height: 1.25rem; }
.field-children .clear-field {
width: 1.25rem !important;
height: 1.25rem !important;
width: 1.25rem;
height: 1.25rem;
position: absolute;
right: 0px;
bottom: 0.5rem; }
.field-children .clear-field svg {
width: 1.25rem;
height: 1.25rem; }

.input-box-field {
width: 100%;
Expand Down Expand Up @@ -8276,14 +8291,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 Expand Up @@ -10430,7 +10445,7 @@ table th {
margin-left: 0.5rem; }
.app_footer-container .footer-row-content .footer_separter .footer-txt {
width: 23rem;
margin-left: 1.5rem;
margin-left: 2rem !important;
margin-top: 0.5rem; }
.app_footer-container .footer-row-content .footer_separter .footer-logo {
background-size: contain;
Expand Down Expand Up @@ -10943,7 +10958,11 @@ body {
color: var(--labels_important-active-labels-text-graphics);
font-size: 1.1rem !important;
font-family: "Open Sans" !important;
height: 100%; }
height: 100%;
transition: all 0.3s; }

* {
transition: all 0.3s; }

.direction_rtl.apply_rtl {
direction: rtl; }
Expand Down

0 comments on commit 009b2cd

Please sign in to comment.