Skip to content

Commit

Permalink
Merge pull request #578 from bitholla/2.0-develop
Browse files Browse the repository at this point in the history
2.0 develop
  • Loading branch information
abeikverdi authored Feb 26, 2021
2 parents 2d27002 + 4f5a0f5 commit 0f0103c
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 12 deletions.
18 changes: 12 additions & 6 deletions server/api/controllers/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,8 @@ const mintAsset = (req, res) => {
user_id,
currency,
amount,
description
description,
transaction_id
} = req.swagger.params.data.value;

loggerAdmin.info(
Expand All @@ -620,15 +621,17 @@ const mintAsset = (req, res) => {
'currency',
currency,
'amount',
amount
amount,
'transaction_id',
transaction_id
);

toolsLib.user.getUserByKitId(user_id)
.then((user) => {
if (!user) {
throw new Error(USER_NOT_FOUND);
}
return toolsLib.wallet.mintAssetByNetworkId(user.network_id, currency, amount, description);
return toolsLib.wallet.mintAssetByNetworkId(user.network_id, currency, amount, description, transaction_id);
})
.then(() => {
return res.json({ message: 'Success' });
Expand All @@ -649,7 +652,8 @@ const burnAsset = (req, res) => {
user_id,
currency,
amount,
description
description,
transaction_id
} = req.swagger.params.data.value;

loggerAdmin.info(
Expand All @@ -659,15 +663,17 @@ const burnAsset = (req, res) => {
'currency',
currency,
'amount',
amount
amount,
'transaction_id',
transaction_id
);

toolsLib.user.getUserByKitId(user_id)
.then((user) => {
if (!user) {
throw new Error(USER_NOT_FOUND);
}
return toolsLib.wallet.burnAssetByNetworkId(user.network_id, currency, amount, description);
return toolsLib.wallet.burnAssetByNetworkId(user.network_id, currency, amount, description, transaction_id);
})
.then(() => {
return res.json({ message: 'Success' });
Expand Down
6 changes: 4 additions & 2 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.0.7"
version: "2.0.8"
title: HollaEx Kit
host: api.hollaex.com
basePath: /v2
Expand Down Expand Up @@ -4274,4 +4274,6 @@ definitions:
type: string
amount:
type: number
format: double
format: double
transaction_id:
type: string
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.0.7",
"version": "2.0.8",
"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.0.7
2.0.8
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.0.7",
"version": "2.0.8",
"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 @@ -229,7 +229,7 @@ export const normalizeInt = (value) => {
};
export const normalizeFloat = (value) => {
if (validator.isFloat(value)) {
return validator.toFloat(value);
return math.format(validator.toFloat(value), { notation: 'fixed' });
} else if (value === '0' || value === 0) {
return 0;
} else {
Expand Down

0 comments on commit 0f0103c

Please sign in to comment.