aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/decorators.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-06-21 19:56:14 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-06-21 19:56:14 +0800
commit40a7be0690c81d2e42543aa075ef8da6606e7b7e (patch)
tree73231f3671133364b53d55074f27e03bd61a1d38 /src/utils/decorators.ts
parent096d3bdb26921cb3e7d05e65dc286ddf49f98a8a (diff)
downloaddexon-0x-contracts-40a7be0690c81d2e42543aa075ef8da6606e7b7e.tar
dexon-0x-contracts-40a7be0690c81d2e42543aa075ef8da6606e7b7e.tar.gz
dexon-0x-contracts-40a7be0690c81d2e42543aa075ef8da6606e7b7e.tar.bz2
dexon-0x-contracts-40a7be0690c81d2e42543aa075ef8da6606e7b7e.tar.lz
dexon-0x-contracts-40a7be0690c81d2e42543aa075ef8da6606e7b7e.tar.xz
dexon-0x-contracts-40a7be0690c81d2e42543aa075ef8da6606e7b7e.tar.zst
dexon-0x-contracts-40a7be0690c81d2e42543aa075ef8da6606e7b7e.zip
Use different lodash import syntax which allows to include only used functions
Diffstat (limited to 'src/utils/decorators.ts')
-rw-r--r--src/utils/decorators.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/utils/decorators.ts b/src/utils/decorators.ts
index a25f2cff5..f8786dbbe 100644
--- a/src/utils/decorators.ts
+++ b/src/utils/decorators.ts
@@ -1,4 +1,4 @@
-import * as _ from 'lodash';
+import includes from 'lodash/includes';
import {constants} from './constants';
import {AsyncMethod, ZeroExError} from '../types';
@@ -20,10 +20,10 @@ export const decorators = {
const result = await originalMethod.apply(this, args);
return result;
} catch (error) {
- if (_.includes(error.message, constants.INVALID_JUMP_PATTERN)) {
+ if (includes(error.message, constants.INVALID_JUMP_PATTERN)) {
throw new Error(ZeroExError.INVALID_JUMP);
}
- if (_.includes(error.message, constants.OUT_OF_GAS_PATTERN)) {
+ if (includes(error.message, constants.OUT_OF_GAS_PATTERN)) {
throw new Error(ZeroExError.OUT_OF_GAS);
}
throw error;