Skip to content

Commit

Permalink
Merge pull request #1211 from bitholla/testnet
Browse files Browse the repository at this point in the history
Testnet
  • Loading branch information
abeikverdi committed Feb 21, 2022
2 parents d1e616a + e173267 commit 3313051
Show file tree
Hide file tree
Showing 27 changed files with 160 additions and 228 deletions.
5 changes: 3 additions & 2 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ steps:
- echo "Current version tag is :" && cat .tags

- name: request_hollacloud_to_run_upgrade
image: bitholla/devops-tools:drone_hollacloud-220121
image: bitholla/devops-tools:drone_hollacloud-220216
environment:
HOLLAEX_EMAIL:
from_secret: hollaex_email
Expand Down Expand Up @@ -166,7 +166,7 @@ steps:
- echo "Current version tag is :" && cat .tags

- name: request_hollacloud_to_run_upgrade
image: bitholla/devops-tools:drone_hollacloud-220121
image: bitholla/devops-tools:drone_hollacloud-220216
environment:
HOLLAEX_EMAIL:
from_secret: next_email
Expand All @@ -175,6 +175,7 @@ steps:
settings:
exchange_id: 539
exchange_name: "Next"
kit_branch: "next"

- name: slack_noti_job_end
image: plugins/slack
Expand Down
21 changes: 3 additions & 18 deletions 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.2.8"
version: "2.2.9"
title: HollaEx Kit
host: api.hollaex.com
basePath: /v2
Expand Down Expand Up @@ -1573,7 +1573,7 @@ paths:
200:
description: Success
schema:
$ref: "#/definitions/BalanceResponse"
$ref: "#/definitions/ObjectResponse"
403:
description: Access Denied
schema:
Expand Down Expand Up @@ -3023,7 +3023,7 @@ paths:
200:
description: Success
schema:
$ref: "#/definitions/BalanceResponse"
$ref: "#/definitions/ObjectResponse"
default:
description: Error
schema:
Expand Down Expand Up @@ -4368,21 +4368,6 @@ definitions:
type: array
items:
$ref: "#/definitions/OrderResponse"
BalanceResponse:
type: object
properties:
btc_balance:
type: number
format: double
btc_available:
type: number
format: double
btc_pending:
type: number
format: double
updated_at:
type: string
format: date-time
KitPut:
type: object
properties:
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.2.8",
"version": "2.2.9",
"private": false,
"description": "HollaEx Kit",
"keywords": [
Expand Down
21 changes: 0 additions & 21 deletions server/utils/hollaex-network-lib/LICENSE

This file was deleted.

2 changes: 1 addition & 1 deletion server/utils/hollaex-network-lib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Nodejs library for operators of HollaEx Kit enabled exchanges to connect to the
## Usage

```javascript
const { Network } = require('hollaex-node-lib');
const Network = require('hollaex-network-lib');

const client = new Network({
apiKey: '<MY_API_KEY>',
Expand Down
70 changes: 27 additions & 43 deletions server/utils/hollaex-network-lib/example/hollaex.js
Original file line number Diff line number Diff line change
@@ -1,45 +1,29 @@
const HollaEx = require('../index');
require('dotenv').load();

const API_KEY = process.env.API_KEY || '';
const API_SECRET = process.env.API_SECRET || '';
const client = new HollaEx({ apiKey: API_KEY, apiSecret: API_SECRET });

client
.getTicker('xht-usdt')
.then((res) => {
let data = JSON.parse(res);
console.log('The volume is', data.volume);
})
.catch((err) => {
console.log(err);
});

// connect to websocket
/*
events (emitted) : trades (trades), orderbook (orderbook), user (userInfo, userWallet, userOrder, userTrades, userUpdate), all
symbols : xht-usdt
*/

const socket1 = client.connect('trades:xht-usdt');

socket1.on('trades', (data) => {
console.log(data);
const Network = require('./index');

const network = new Network({
apiUrl: 'https://api.hollaex.network',
apiKey: '',
apiSecret: '',
activation_code: '',
exchange_id: 1
});

const socket2 = client.connect('all');

socket2.on('orderbook', (data) => {
console.log(data);
});

// You have to use a token to use these otherwise the socket disconnects
socket2.on('userInfo', (data) => {
console.log(data);
});


setTimeout(() => {
socket2.disconnect();
}, 5000);
(async () => {
try {
const init = await network.init();
console.log(init);
console.log(network.exchange_id)

console.log('connecting to websocket')
network.connect(['orderbook:xht-usdt']);
network.ws.on('message', (data) => {
console.log(data)
})

} catch (err) {
console.log(err)
}



}) ();
9 changes: 4 additions & 5 deletions server/utils/hollaex-network-lib/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "hollaex-network-lib",
"version": "2.11.0",
"description": "hollaex api and websocket library for nodejs",
"version": "2.2.8",
"description": "hollaex network api and websocket library for nodejs",
"main": "index.js",
"dependencies": {
"file-type": "16.5.2",
Expand All @@ -24,8 +24,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/bitholla/hollaex-node-lib"
"url": "https://github.com/bitholla/hollaex-kit/tree/master/server/utils/hollaex-network-lib"
},
"author": "bitHolla Inc",
"license": "MIT"
"author": "bitHolla Inc"
}
21 changes: 0 additions & 21 deletions server/utils/hollaex-tools-lib/LICENSE

This file was deleted.

5 changes: 2 additions & 3 deletions server/utils/hollaex-tools-lib/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
{
"name": "hollaex-tools-lib",
"version": "2.15.0",
"version": "2.2.8",
"description": "HollaEx tools library for developers",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "bitHolla Inc",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/bitholla/hollaex-tools-lib"
"url": "https://github.com/bitholla/hollaex-kit/tree/master/server/utils/hollaex-tools-lib"
},
"dependencies": {}
}
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.8
2.2.9
10 changes: 1 addition & 9 deletions web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,5 @@ You can build the project by running `npm run build` and the projects builds the

- Build variables in `.env` file:
- NODE_ENV `['production', 'development']`
- REACT_APP_PUBLIC_URL `https://hollaex.com`
- REACT_APP_SERVER_ENDPOINT `https://api.hollaex.com` (or your own API server)

### Styles

### Steps to configure white and dark theme

1. Modify colors under `colors for white theme` and `colors for dark theme` text in variables.scss file. there is also some common colors that effect in both dark and white theme.
2. Coin colors also categorized by theme in variables.scss file.
3. To apply different colors for chart element outline(slice in dount, bar in bar chart) change the `coin-${symbol}-1` and `dark-coin-${symbol}-1`.
To change the API URL for `PRODUCTION` or `DEVELOPMENT` you can configure `/web/src/config/index.js`. In development mode it connects to https://api.sandbox.hollaex.com by default.
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.2.8",
"version": "2.2.9",
"private": true,
"dependencies": {
"@ant-design/compatible": "1.0.5",
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/Form/validations.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export const evaluateOrder = (
}
}

if (available < orderPrice) {
if (parseFloat(available) < parseFloat(orderPrice)) {
return STRINGS['VALIDATIONS.INSUFFICIENT_BALANCE'];
}
return '';
Expand Down
2 changes: 1 addition & 1 deletion web/src/containers/Admin/AdminFinancials/Assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ const getColumns = (
className="coin-symbol-wrapper"
onClick={() => handlePreview(selectedAsset)}
>
{balance[symbol] || 0}
{balance[`${symbol}_available`] || 0}
</div>
);
},
Expand Down
4 changes: 0 additions & 4 deletions web/src/containers/Admin/AdminFinancials/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,6 @@
text-decoration: underline;
cursor: pointer;
}
.ant-table-row-expand-icon {
color: #2930ff;
border-color: #2930ff;
}
.admin-earnings-container .id-wrapper {
background-color: #288500;
width: 35px;
Expand Down
55 changes: 29 additions & 26 deletions web/src/containers/Admin/AppWrapper/Timer.js
Original file line number Diff line number Diff line change
@@ -1,43 +1,46 @@
import React from 'react';
import moment from 'moment';
import 'moment-timezone';

class Timer extends React.Component {
constructor(prop) {
super(prop);
let date = this.getTimeString();
this.state = {
time: date
};
}
constructor(prop) {
super(prop);
let date = this.getTimeString();
this.state = {
time: date,
};
}

componentDidMount () {
componentDidMount() {
this.timer = setInterval(() => {
const date = this.getTimeString();
this.setState({
time: date
})
time: date,
});
}, 1000);
}
}

getTimeString() {
let date = moment().format('hh:mm:ssA');
if (this.props.isHover) {
date = moment().format('DD/MMM/YYYY, hh:mm:ssA ').toUpperCase() + new Date().toTimeString().slice(9);
}
if (this.props.isHover) {
date =
moment().format('DD/MMM/YYYY, hh:mm:ssA ').toUpperCase() +
moment.tz.guess(true) +
' ' +
new Date().toTimeString().slice(9);
}
return date;
}

componentWillUnmount() {
if (this.timer) {
clearInterval(this.timer);
}
}
componentWillUnmount() {
if (this.timer) {
clearInterval(this.timer);
}
}

render () {
return (
<div>{this.state.time}</div>
)
}
};
render() {
return <div>{this.state.time}</div>;
}
}

export default Timer;
export default Timer;
5 changes: 4 additions & 1 deletion web/src/containers/Admin/General/Description.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,10 @@ class Description extends Component {
buttonClass="green-btn minimal-btn"
onSubmit={this.props.handleSubmitReferralBadge}
disableAllFields={
plan !== 'crypto' && plan !== 'fiat' && type !== 'Enterprise'
plan !== 'crypto' &&
plan !== 'fiat' &&
type !== 'Enterprise' &&
plan !== 'boost'
}
buttonSubmitting={buttonSubmitting}
/>
Expand Down
Loading

0 comments on commit 3313051

Please sign in to comment.