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 @@ + +
+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 @@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.