Skip to content

Commit

Permalink
Merge pull request #1350 from bitholla/testnet
Browse files Browse the repository at this point in the history
Testnet
  • Loading branch information
abeikverdi committed Apr 11, 2022
2 parents f1c2d2f + db5d8d0 commit bb4afae
Show file tree
Hide file tree
Showing 15 changed files with 515 additions and 121 deletions.
2 changes: 1 addition & 1 deletion server/api/swagger/swagger.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
swagger: "2.0"
info:
version: "2.3.0"
version: "2.3.1"
title: HollaEx Kit
host: api.hollaex.com
basePath: /v2
Expand Down
26 changes: 18 additions & 8 deletions server/mail/templates/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const generateMessageContent = (
) => {
let title;
let message;
let result
if (
type === MAILTYPE.INVITED_OPERATOR ||
type === MAILTYPE.SMS ||
Expand All @@ -41,11 +42,19 @@ const generateMessageContent = (
}
message = require(`./${type}`)(email, data, language, domain);

let subject = `${API_NAME()} ${title}`;

result = {
subject: subject,
html: TemplateEmail({ title }, message.html, language, domain),
text: message.text
};

} else {
const EMAIL_CONFIGURATIONS = GET_EMAIL();
let new_type = findMailtype(type, data);

if (EMAIL_CONFIGURATIONS[language] && EMAIL_CONFIGURATIONS[language][new_type.toUpperCase()] === undefined) {
if (EMAIL_CONFIGURATIONS[language] === undefined || EMAIL_CONFIGURATIONS[language][new_type.toUpperCase()] === undefined) {
language = 'en';
}

Expand All @@ -55,14 +64,15 @@ const generateMessageContent = (
html: replaceHTMLContent(new_type, MAILTYPE_CONFIGURATIONS['html'].toString(), email, data, language, domain),
text: ''
};
let subject = `${API_NAME()} ${title}`;

result = {
subject: subject,
html: (TemplateEmail({ title }, message.html, language, domain)).replace(/\r?\n|\t|\r/g, ''),
text: message.text
};
}
const subject = `${API_NAME()} ${title}`;

let result = {
subject: subject,
html: (TemplateEmail({ title }, message.html, language, domain)).replace(/\r?\n|\t|\r/g, ''),
text: message.text
};
return result;
};

Expand Down Expand Up @@ -392,7 +402,7 @@ const getTitle = (type, title = '', data) => {
type === MAILTYPE.DEPOSIT_CANCEL ||
type === MAILTYPE.WITHDRAWAL_CANCEL
) {
title = title.replace(/\$\{currency\}/g, data.currency);
title = title.replace(/\$\{currency\}/g, data.currency.toUpperCase() || '');
} else if (
type === MAILTYPE.USER_ID_VERIFICATION_REJECT ||
type === MAILTYPE.USER_BANK_VERIFICATION_REJECT ||
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.3.0",
"version": "2.3.1",
"private": false,
"description": "HollaEx Kit",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.0
2.3.1
2 changes: 1 addition & 1 deletion web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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.3.0",
"version": "2.3.1",
"private": true,
"dependencies": {
"@ant-design/compatible": "1.0.5",
Expand Down
File renamed without changes
File renamed without changes
3 changes: 2 additions & 1 deletion web/src/components/PriceChange/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ class PriceChange extends Component {

UNSAFE_componentWillUpdate(nextProp) {
const {
market,
market: { ticker },
} = this.props;
if (nextProp.market.ticker.close !== ticker.close) {
if (market && ticker && nextProp.market.ticker.close !== ticker.close) {
const tickerDiff = nextProp.market.ticker.close - ticker.close;
this.setState((prevState) => ({
...prevState,
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/QuickTrade/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class QuickTrade extends Component {
const selectedTargetBalance =
selectedTarget &&
userBalance[`${selectedTarget.toLowerCase()}_available`];
const brokerPairs = broker.map((br) => br.symbol);
const brokerPairs = broker && broker.map((br) => br.symbol);
const flipedPair = flipPair(symbol);
let isUseBroker = false;
if (brokerPairs.includes(symbol) || brokerPairs.includes(flipedPair)) {
Expand Down
2 changes: 1 addition & 1 deletion web/src/config/icons/dark.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const nestedIcons = {
EXCHANGE: {
LOGO: '',
FAV_ICON: '/favicon.ico',
LOADER: '/assets/loader-dark.gif',
LOADER: '/assets/dark-spinner.gif',
BOARDING_IMAGE: '/assets/dark-background.jpg',
LANDING_PAGE: '/assets/images/hollaex-background.png',
},
Expand Down
2 changes: 1 addition & 1 deletion web/src/config/icons/light.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import flatten from 'flat';
const options = { safe: true, delimiter: '_' };
const nestedIcons = {
EXCHANGE: {
LOADER: '/assets/loader-dark.gif',
LOADER: '/assets/light-spinner.gif',
BOARDING_IMAGE: '/assets/background.png',
LANDING_PAGE: '/assets/images/hollaex-background.png',
},
Expand Down
Loading

0 comments on commit bb4afae

Please sign in to comment.