diff options
Diffstat (limited to 'packages/utils/src')
-rw-r--r-- | packages/utils/src/sign_typed_data_utils.ts | 5 |
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 { |