diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-11-17 07:48:55 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-11-17 07:48:55 +0800 |
commit | 51dce3008841b7bdc9080212f8b5e12a90f6cce9 (patch) | |
tree | d2804405aa3cdae00285d2ffea718210df43b18c /packages | |
parent | a4f6cd21bd289eb2baaee8b6b7d09cbb9e0955dc (diff) | |
download | dexon-0x-contracts-51dce3008841b7bdc9080212f8b5e12a90f6cce9.tar.gz dexon-0x-contracts-51dce3008841b7bdc9080212f8b5e12a90f6cce9.tar.zst dexon-0x-contracts-51dce3008841b7bdc9080212f8b5e12a90f6cce9.zip |
feat: add assert for shouldDisablePushToHistory
Diffstat (limited to 'packages')
-rw-r--r-- | packages/instant/src/index.umd.ts | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/packages/instant/src/index.umd.ts b/packages/instant/src/index.umd.ts index 298b7733f..9703c6fc0 100644 --- a/packages/instant/src/index.umd.ts +++ b/packages/instant/src/index.umd.ts @@ -17,28 +17,31 @@ export const render = (config: ZeroExInstantConfig, selector: string = DEFAULT_Z assert.isHexString('defaultSelectedAssetData', config.defaultSelectedAssetData); } if (!_.isUndefined(config.additionalAssetMetaDataMap)) { - assert.isValidAssetMetaDataMap('props.additionalAssetMetaDataMap', config.additionalAssetMetaDataMap); + assert.isValidAssetMetaDataMap('additionalAssetMetaDataMap', config.additionalAssetMetaDataMap); } if (!_.isUndefined(config.defaultAssetBuyAmount)) { - assert.isNumber('props.defaultAssetBuyAmount', config.defaultAssetBuyAmount); + assert.isNumber('defaultAssetBuyAmount', config.defaultAssetBuyAmount); } if (!_.isUndefined(config.networkId)) { - assert.isNumber('props.networkId', config.networkId); + assert.isNumber('networkId', config.networkId); } if (!_.isUndefined(config.availableAssetDatas)) { assert.areValidAssetDatas('availableAssetDatas', config.availableAssetDatas); } if (!_.isUndefined(config.onClose)) { - assert.isFunction('props.onClose', config.onClose); + assert.isFunction('onClose', config.onClose); } if (!_.isUndefined(config.zIndex)) { - assert.isNumber('props.zIndex', config.zIndex); + assert.isNumber('zIndex', config.zIndex); } if (!_.isUndefined(config.affiliateInfo)) { - assert.isValidAffiliateInfo('props.affiliateInfo', config.affiliateInfo); + assert.isValidAffiliateInfo('affiliateInfo', config.affiliateInfo); } if (!_.isUndefined(config.provider)) { - assert.isWeb3Provider('props.provider', config.provider); + assert.isWeb3Provider('provider', config.provider); + } + if (!_.isUndefined(config.shouldDisablePushToHistory)) { + assert.isBoolean('shouldDisablePushToHistory', config.shouldDisablePushToHistory); } assert.isString('selector', selector); // Render instant and return a callback that allows you to remove it from the DOM. |