aboutsummaryrefslogtreecommitdiffstats
path: root/packages/utils
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2019-01-15 18:32:53 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2019-01-15 23:25:25 +0800
commite84232cce8b1a1b1e3607d341baa688613dcefde (patch)
tree848fda704174e8d559be41021110c6c2c7b03b0d /packages/utils
parentde78d6a8ad6104a044e5b56251c47a41b63bf013 (diff)
downloaddexon-sol-tools-e84232cce8b1a1b1e3607d341baa688613dcefde.tar
dexon-sol-tools-e84232cce8b1a1b1e3607d341baa688613dcefde.tar.gz
dexon-sol-tools-e84232cce8b1a1b1e3607d341baa688613dcefde.tar.bz2
dexon-sol-tools-e84232cce8b1a1b1e3607d341baa688613dcefde.tar.lz
dexon-sol-tools-e84232cce8b1a1b1e3607d341baa688613dcefde.tar.xz
dexon-sol-tools-e84232cce8b1a1b1e3607d341baa688613dcefde.tar.zst
dexon-sol-tools-e84232cce8b1a1b1e3607d341baa688613dcefde.zip
Use new check for isBigNumber
Diffstat (limited to 'packages/utils')
-rw-r--r--packages/utils/src/sign_typed_data_utils.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/utils/src/sign_typed_data_utils.ts b/packages/utils/src/sign_typed_data_utils.ts
index 6963b9084..adb66622d 100644
--- a/packages/utils/src/sign_typed_data_utils.ts
+++ b/packages/utils/src/sign_typed_data_utils.ts
@@ -1,8 +1,9 @@
+import { EIP712Object, EIP712ObjectValue, EIP712TypedData, EIP712Types } from '@0x/types';
import * as ethUtil from 'ethereumjs-util';
import * as ethers from 'ethers';
import * as _ from 'lodash';
-import { EIP712Object, EIP712ObjectValue, EIP712TypedData, EIP712Types } from '@0x/types';
+import { BigNumber } from './configured_bignumber';
export const signTypedDataUtils = {
/**
@@ -70,7 +71,7 @@ export const signTypedDataUtils = {
return ethers.utils.defaultAbiCoder.encode(encodedTypes, encodedValues);
},
_normalizeValue(type: string, value: any): EIP712ObjectValue {
- const normalizedValue = type === 'uint256' && _.isObject(value) && value.isBigNumber ? value.toString() : value;
+ const normalizedValue = type === 'uint256' && BigNumber.isBigNumber(value) ? value.toString() : value;
return normalizedValue;
},
_typeHash(primaryType: string, types: EIP712Types): Buffer {