diff --git a/README.md b/README.md index 299554d0cf..a813965cc5 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # HollaEx Kit [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-green.svg)](https://github.com/facebook/create-react-app/pulls) -HollaEx Kit is an open source crypto exchange software that can be utilized to onboard your users and traders in order to run your white label exchange. In order to run the HollaEx Kit, you need to run HollaEx Server as the back-end and Web as your front-end user interface. HollaEx Kit automatically then connects to HollaEx Network where you have access to markets and liquidity for different digital assets. +HollaEx Kit is an open source crypto exchange software that can be utilized to onboard your users and traders in order to run your white label exchange. In order to run the HollaEx Kit, you need to run HollaEx Server as the back-end and Web as your front-end user interface. HollaEx Kit automatically then connects to HollaEx Network for asset where you have access to markets and liquidity as well as wallets for different digital assets. ## Get Started @@ -10,20 +10,20 @@ git clone https://github.com/bitholla/hollaex-kit.git bash install.sh ``` -Read more on our [Docs](https://docs.bitholla.com/hollaex-kit/get-started)! +Read more on our [Docs](https://docs.hollaex.com)! ## Developers -Checkout Web for the front-end UI/UX modifications. +Checkout [Web](https://github.com/bitholla/hollaex-kit/tree/master/web) for the front-end UI/UX modifications. -Check out Server for back-end and server side operations and endpoints. +Check out [Server](https://github.com/bitholla/hollaex-kit/tree/master/server) for back-end and server side operations and endpoints. -Check out Plugins for developing seamless and flexible custom services that can be added to the HollaEx Kit. +Check out [Plugins](https://github.com/bitholla/hollaex-kit/tree/2.0-develop/server#plugins) for developing seamless and flexible custom services that can be added to the HollaEx Kit. -Check out HollaEx CLI (Command Line Interface) for interacting and deploying your exchange. +Check out [HollaEx CLI](https://github.com/bitholla/hollaex-cli) (Command Line Interface) for interacting and deploying your exchange. ## Community -Join us on the [Forum](https://forum.bitholla.com) and feel free to raise any topic and ask questions from our active community. +Join us on the [Forum](https://forum.hollaex.com) and feel free to raise any topic and ask questions from our active community. [![alt text][1.2]][1] @@ -46,11 +46,6 @@ Join us on the [Forum](https://forum.bitholla.com) and feel free to raise any to ## Useful Resources -- bitHolla Site: https://bitholla.com - Exchange Dashboard: https://dash.bitholla.com -- Documentation: https://docs.bitholla.com -- Forum: https://forum.bitholla.com -- HollaEx CLI (Command Line Interface): https://github.com/bitholla/hollaex-cli -- Vault API Explorer: https://api.bitholla.com/docs - HollaEx Whitepaper: https://hollaex.com/docs/whitepaper.html - HollaEx Official Marketplace: https://hollaex.com diff --git a/server/api/controllers/admin.js b/server/api/controllers/admin.js index 16089ac578..2abc303734 100644 --- a/server/api/controllers/admin.js +++ b/server/api/controllers/admin.js @@ -465,7 +465,7 @@ const transferFund = (req, res) => { const data = req.swagger.params.data.value; - toolsLib.wallet.transferAssetByKitIds(data.sender_id, data.receiver_id, data.currency, data.amount) + toolsLib.wallet.transferAssetByKitIds(data.sender_id, data.receiver_id, data.currency, data.amount, data.description, data.email) .then(() => { return res.json({ message: 'Success' }); }) @@ -479,31 +479,6 @@ const transferFund = (req, res) => { }); }; -const adminCheckTransaction = (req, res) => { - loggerAdmin.verbose( - req.uuid, - 'controllers/admin/adminCheckTransaction auth', - req.auth - ); - const transactionId = req.swagger.params.transaction_id.value; - const address = req.swagger.params.address.value; - const currency = req.swagger.params.currency.value; - const isTestnet = req.swagger.params.is_testnet.value; - - toolsLib.wallet.checkTransaction(currency, transactionId, address, isTestnet) - .then((transaction) => { - return res.json({ message: 'Success', transaction }); - }) - .catch((err) => { - loggerAdmin.error( - req.uuid, - 'controllers/admin/adminCheckTransaction catch', - err.message - ); - return res.status(err.status || 400).json({ message: err.message }); - }); -}; - const completeExchangeSetup = (req, res) => { loggerAdmin.verbose( req.uuid, @@ -719,7 +694,6 @@ module.exports = { getCoins, getPairs, transferFund, - adminCheckTransaction, completeExchangeSetup, putNetworkCredentials, uploadImage, diff --git a/server/api/controllers/user.js b/server/api/controllers/user.js index 092beb594e..f3ebd7ed90 100644 --- a/server/api/controllers/user.js +++ b/server/api/controllers/user.js @@ -636,6 +636,31 @@ const getUserStats = (req, res) => { }); }; +const userCheckTransaction = (req, res) => { + loggerUser.verbose( + req.uuid, + 'controllers/user/userCheckTransaction auth', + req.auth + ); + const transactionId = req.swagger.params.transaction_id.value; + const address = req.swagger.params.address.value; + const currency = req.swagger.params.currency.value; + const isTestnet = req.swagger.params.is_testnet.value; + + toolsLib.wallet.checkTransaction(currency, transactionId, address, isTestnet) + .then((transaction) => { + return res.json({ message: 'Success', transaction }); + }) + .catch((err) => { + loggerUser.error( + req.uuid, + 'controllers/user/userCheckTransaction catch', + err.message + ); + return res.status(err.status || 400).json({ message: err.message }); + }); +}; + module.exports = { signUpUser, getVerifyUser, @@ -656,5 +681,6 @@ module.exports = { getHmacToken, createHmacToken, deleteHmacToken, - getUserStats + getUserStats, + userCheckTransaction }; diff --git a/server/api/swagger/swagger.yaml b/server/api/swagger/swagger.yaml index 8388ede018..11a1d31547 100644 --- a/server/api/swagger/swagger.yaml +++ b/server/api/swagger/swagger.yaml @@ -1,6 +1,6 @@ swagger: "2.0" info: - version: "2.0.6" + version: "2.0.7" title: HollaEx Kit host: api.hollaex.com basePath: /v2 @@ -2189,13 +2189,14 @@ paths: - Bearer: [] x-security-scopes: - admin - /admin/check-transaction: - x-swagger-router-controller: admin + /user/check-transaction: + x-swagger-router-controller: user get: - operationId: adminCheckTransaction + operationId: userCheckTransaction description: Check a blockchain transaction to add create/update deposit tags: - - Admin + - User + - Wallet parameters: - in: query name: currency @@ -2230,10 +2231,7 @@ paths: security: - Bearer: [] x-security-scopes: - - admin - - supervisor - - support - - kyc + - user /admin/users: x-swagger-router-controller: admin get: @@ -4055,6 +4053,8 @@ definitions: amount: type: number format: double + email: + type: boolean ExternalDepositRequest: type: object required: diff --git a/server/package.json b/server/package.json index b6390abe4f..1e608e9766 100644 --- a/server/package.json +++ b/server/package.json @@ -1,5 +1,5 @@ { - "version": "2.0.6", + "version": "2.0.7", "private": false, "description": "HollaEx Kit", "keywords": [ diff --git a/templates/local/nginx/nginx.conf b/templates/local/nginx/nginx.conf index 0f063bf502..927901ddea 100644 --- a/templates/local/nginx/nginx.conf +++ b/templates/local/nginx/nginx.conf @@ -27,8 +27,8 @@ server { listen 80 default_server; server_name _; - error_page 404 /404.html; - location = /404.html { + error_page 404 /404-nodomain.html; + location = /404-nodomain.html { root /usr/share/nginx/html; internal; } @@ -66,6 +66,10 @@ server { proxy_pass http://api; } + location /explorer { + proxy_pass http://api; + } + location /stream { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; @@ -78,6 +82,12 @@ server { proxy_pass http://plugins; } + error_page 404 /404.html; + location = /404.html { + root /usr/share/nginx/html; + internal; + } + error_page 429 /429.html; location = /429.html { root /usr/share/nginx/html; diff --git a/templates/local/nginx/static/404-nodomain.html b/templates/local/nginx/static/404-nodomain.html new file mode 100644 index 0000000000..9a1155ef2b --- /dev/null +++ b/templates/local/nginx/static/404-nodomain.html @@ -0,0 +1,12 @@ + + + 404 Not found + + +

404 There is nothing here!

+

If you are an exchange administrator, and facing this page after the initial setup, You probably missed to setup domain(s) for the exchange.

+

If you haven't bind domain(s) for the exchange yet, please run 'hollaex prod' command to do so.

+

Please visit docs.hollaex.com to see guides, forum.hollaex.com to get further help.

+

Regards, HollaEx Team.

+ + diff --git a/templates/local/nginx/static/404.html b/templates/local/nginx/static/404.html index 12cd989043..0efd625d27 100644 --- a/templates/local/nginx/static/404.html +++ b/templates/local/nginx/static/404.html @@ -4,9 +4,9 @@

404 There is nothing here!

-

If you are an exchange administrator, and facing this page after the initial setup, You probably missed to setup domain(s) for the exchange.

-

If you haven't bind domain(s) for the exchange yet, please run 'hollaex prod' command to do so.

-

Please visit docs.bitholla.com (docs.bitholla.com/hollaex-kit/get-started/setup#opening-the-exchange-to-the-internet) to see guides, forum.bitholla.com to get further help.

+

To view the API health, visit Health Page.

+

To view the API explorer, visit Explorer Page.

+

Please visit docs.hollaex.com to see guides, forum.hollaex.com to get further help.

Regards, HollaEx Team.

diff --git a/version b/version index 703cec9e23..6a0ca2d59d 100644 --- a/version +++ b/version @@ -1 +1 @@ -2.0.6 \ No newline at end of file +2.0.7 \ No newline at end of file diff --git a/web/package-lock.json b/web/package-lock.json index 059faa05f6..d1a0ab1867 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -1,6 +1,6 @@ { "name": "hollaex-kit", - "version": "2.0.4", + "version": "2.0.6", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/web/package.json b/web/package.json index 1b1eeebc64..24f2ea4ad9 100644 --- a/web/package.json +++ b/web/package.json @@ -1,6 +1,6 @@ { "name": "hollaex-kit", - "version": "2.0.6", + "version": "2.0.7", "private": true, "dependencies": { "@ant-design/compatible": "1.0.5", diff --git a/web/src/containers/Admin/General/index.js b/web/src/containers/Admin/General/index.js index e97016d400..10f12f824b 100644 --- a/web/src/containers/Admin/General/index.js +++ b/web/src/containers/Admin/General/index.js @@ -134,8 +134,9 @@ class General extends Component { if (file) { const formData = new FormData(); const { name: fileName } = file; + const uniqueId = Date.now(); const extension = fileName.split('.').pop(); - const name = `${key}__${themeKey}.${extension}`; + const name = `${key}__${themeKey}___${uniqueId}.${extension}`; formData.append('name', name); formData.append('file', file); diff --git a/web/src/containers/Admin/Tiers/ModalForm.js b/web/src/containers/Admin/Tiers/ModalForm.js index a017bc312f..849210f7b7 100644 --- a/web/src/containers/Admin/Tiers/ModalForm.js +++ b/web/src/containers/Admin/Tiers/ModalForm.js @@ -201,8 +201,9 @@ class NewTierForm extends Component { if (file) { const formData = new FormData(); const { name: fileName } = file; + const uniqueId = Date.now(); const extension = fileName.split('.').pop(); - const name = `${key}__${themeKey}.${extension}`; + const name = `${key}__${themeKey}___${uniqueId}.${extension}`; formData.append('name', name); formData.append('file', file); diff --git a/web/src/containers/Admin/Wallets/index.js b/web/src/containers/Admin/Wallets/index.js index 722c1bb34d..0f9a123d3a 100644 --- a/web/src/containers/Admin/Wallets/index.js +++ b/web/src/containers/Admin/Wallets/index.js @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import { Spin, Button, Tag, Card, Alert } from 'antd'; +import { Spin, Card, Alert } from 'antd'; import { connect } from 'react-redux'; import { ReactSVG } from 'react-svg'; @@ -71,7 +71,6 @@ class Wallets extends Component { render() { const { balance, loading, error } = this.state; - const { plugins = { enabled: '' } } = this.state.constants; return (
{error && ( diff --git a/web/src/containers/Deposit/utils.js b/web/src/containers/Deposit/utils.js index 387efbf7bf..860153a5c5 100644 --- a/web/src/containers/Deposit/utils.js +++ b/web/src/containers/Deposit/utils.js @@ -84,13 +84,13 @@ export const renderContent = ( const { fullname } = coins[symbol] || DEFAULT_COIN_DATA; let address = crypto_wallet[symbol]; let destinationAddress = ''; - if (symbol === 'xrp' || symbol === 'xlm') { + if (symbol === 'xrp' || symbol === 'xlm' || coins[symbol].network === 'stellar') { const temp = address.split(':'); address = temp[0] ? temp[0] : address; destinationAddress = temp[1] ? temp[1] : ''; } const additionalText = - symbol === 'xlm' + symbol === 'xlm' || coins[symbol].network === 'stellar' ? STRINGS['DEPOSIT.CRYPTO_LABELS.MEMO'] : STRINGS['DEPOSIT.CRYPTO_LABELS.DESTINATION_TAG']; diff --git a/web/src/containers/OperatorControls/components/AllIconsModal.js b/web/src/containers/OperatorControls/components/AllIconsModal.js index b0c6c514c6..c18b261950 100644 --- a/web/src/containers/OperatorControls/components/AllIconsModal.js +++ b/web/src/containers/OperatorControls/components/AllIconsModal.js @@ -110,8 +110,9 @@ class AllIconsModal extends Component { if (file) { const formData = new FormData(); const { name: fileName } = file; + const uniqueId = Date.now(); const extension = fileName.split('.').pop(); - const name = `${key}__${themeKey}.${extension}`; + const name = `${key}__${themeKey}___${uniqueId}.${extension}`; formData.append('name', name); formData.append('file', file); diff --git a/web/src/containers/OperatorControls/components/UploadIcon.js b/web/src/containers/OperatorControls/components/UploadIcon.js index 2d70273d3f..e68455db0f 100644 --- a/web/src/containers/OperatorControls/components/UploadIcon.js +++ b/web/src/containers/OperatorControls/components/UploadIcon.js @@ -57,8 +57,9 @@ class UploadIcon extends Component { if (file) { const formData = new FormData(); const { name: fileName } = file; + const uniqueId = Date.now(); const extension = fileName.split('.').pop(); - const name = `${key}__${themeKey}.${extension}`; + const name = `${key}__${themeKey}___${uniqueId}.${extension}`; formData.append('name', name); formData.append('file', file); diff --git a/web/src/containers/Withdraw/formUtils.js b/web/src/containers/Withdraw/formUtils.js index 0ec7e9d2d9..d89e74feef 100644 --- a/web/src/containers/Withdraw/formUtils.js +++ b/web/src/containers/Withdraw/formUtils.js @@ -71,7 +71,7 @@ export const generateFormValues = ( placeholder: STRINGS['WITHDRAWALS_FORM_DESTINATION_TAG_PLACEHOLDER'], fullWidth: true, }; - } else if (symbol === 'xlm') { + } else if (symbol === 'xlm' || coins[symbol].network === 'stellar') { fields.destination_tag = { type: 'text', stringId: