aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/utils.ts
diff options
context:
space:
mode:
authorLeonid <logvinov.leon@gmail.com>2017-06-22 22:21:56 +0800
committerGitHub <noreply@github.com>2017-06-22 22:21:56 +0800
commit94cab6f694027d47971d661bca33beac42f4ade1 (patch)
treec411ec567878a8178aa64313bd9b76dfcb455fc7 /src/utils/utils.ts
parent25a9ba90f508e0d147c060f60a9e3683e07d45e4 (diff)
downloaddexon-sol-tools-94cab6f694027d47971d661bca33beac42f4ade1.tar.gz
dexon-sol-tools-94cab6f694027d47971d661bca33beac42f4ade1.tar.zst
dexon-sol-tools-94cab6f694027d47971d661bca33beac42f4ade1.zip
Revert "Use different lodash import syntax which allows to include only used functions"
Diffstat (limited to 'src/utils/utils.ts')
-rw-r--r--src/utils/utils.ts9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/utils/utils.ts b/src/utils/utils.ts
index 2db611ccb..bad5b6498 100644
--- a/src/utils/utils.ts
+++ b/src/utils/utils.ts
@@ -1,5 +1,4 @@
-import map = require('lodash/map');
-import includes = require('lodash/includes');
+import * as _ from 'lodash';
import * as BN from 'bn.js';
import * as ethABI from 'ethereumjs-abi';
import * as ethUtil from 'ethereumjs-util';
@@ -21,7 +20,7 @@ export const utils = {
console.log(message);
},
isParityNode(nodeVersion: string): boolean {
- return includes(nodeVersion, 'Parity');
+ return _.includes(nodeVersion, 'Parity');
},
isValidOrderHash(orderHashHex: string): boolean {
const isValid = /^0x[0-9A-F]{64}$/i.test(orderHashHex);
@@ -45,8 +44,8 @@ export const utils = {
{value: utils.bigNumberToBN(order.expirationUnixTimestampSec), type: SolidityTypes.uint256},
{value: utils.bigNumberToBN(order.salt), type: SolidityTypes.uint256},
];
- const types = map(orderParts, o => o.type);
- const values = map(orderParts, o => o.value);
+ const types = _.map(orderParts, o => o.type);
+ const values = _.map(orderParts, o => o.value);
const hashBuff = ethABI.soliditySHA3(types, values);
const hashHex = ethUtil.bufferToHex(hashBuff);
return hashHex;