diff options
author | Fabio Berger <me@fabioberger.com> | 2018-11-12 05:11:10 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-11-12 05:11:10 +0800 |
commit | 0391f93490cffdc69f6cb32f11762d174ed04e37 (patch) | |
tree | 3a8b30a04de1193aa21e5b84bd572db24979a8bf /packages/contract-wrappers/src/utils/utils.ts | |
parent | 399a7d5fec9af4f3491a77f0c2d46738f3d8ffa7 (diff) | |
parent | 397b4e289015f9bb0831c1a0ce6fee601670b487 (diff) | |
download | dexon-0x-contracts-0391f93490cffdc69f6cb32f11762d174ed04e37.tar.gz dexon-0x-contracts-0391f93490cffdc69f6cb32f11762d174ed04e37.tar.zst dexon-0x-contracts-0391f93490cffdc69f6cb32f11762d174ed04e37.zip |
merge development
Diffstat (limited to 'packages/contract-wrappers/src/utils/utils.ts')
-rw-r--r-- | packages/contract-wrappers/src/utils/utils.ts | 4 |
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); + }, }; |