aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contract-wrappers/src/utils/utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/contract-wrappers/src/utils/utils.ts')
-rw-r--r--packages/contract-wrappers/src/utils/utils.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/contract-wrappers/src/utils/utils.ts b/packages/contract-wrappers/src/utils/utils.ts
index fbacdaa28..0b3270e78 100644
--- a/packages/contract-wrappers/src/utils/utils.ts
+++ b/packages/contract-wrappers/src/utils/utils.ts
@@ -1,5 +1,6 @@
import { BigNumber } from '@0x/utils';
import { Web3Wrapper } from '@0x/web3-wrapper';
+import * as _ from 'lodash';
import { constants } from './constants';
@@ -14,4 +15,7 @@ export const utils = {
numberPercentageToEtherTokenAmountPercentage(percentage: number): BigNumber {
return Web3Wrapper.toBaseUnitAmount(constants.ONE_AMOUNT, constants.ETHER_TOKEN_DECIMALS).mul(percentage);
},
+ removeUndefinedProperties<T extends object>(obj: T): Partial<T> {
+ return _.pickBy(obj);
+ },
};