From e84232cce8b1a1b1e3607d341baa688613dcefde Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 15 Jan 2019 11:32:53 +0100 Subject: Use new check for isBigNumber --- packages/utils/src/sign_typed_data_utils.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'packages/utils') 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 { -- cgit v1.2.3