diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-11-01 10:20:37 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-11-01 10:21:06 +0800 |
commit | 6091ee732d208eaf9889087b8308dfd0427b9be5 (patch) | |
tree | c13189159cc172c9f82340a8d3a2bd69eed47f6e /packages/instant/src/index.umd.ts | |
parent | 8c336925601127c759ad4cfbca119368a2edfd56 (diff) | |
download | dexon-0x-contracts-6091ee732d208eaf9889087b8308dfd0427b9be5.tar dexon-0x-contracts-6091ee732d208eaf9889087b8308dfd0427b9be5.tar.gz dexon-0x-contracts-6091ee732d208eaf9889087b8308dfd0427b9be5.tar.bz2 dexon-0x-contracts-6091ee732d208eaf9889087b8308dfd0427b9be5.tar.lz dexon-0x-contracts-6091ee732d208eaf9889087b8308dfd0427b9be5.tar.xz dexon-0x-contracts-6091ee732d208eaf9889087b8308dfd0427b9be5.tar.zst dexon-0x-contracts-6091ee732d208eaf9889087b8308dfd0427b9be5.zip |
feat: modify public API to allow for passing in available assets, or fetch assets from SRA
Diffstat (limited to 'packages/instant/src/index.umd.ts')
-rw-r--r-- | packages/instant/src/index.umd.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/instant/src/index.umd.ts b/packages/instant/src/index.umd.ts index dabd45cae..77bdb66e1 100644 --- a/packages/instant/src/index.umd.ts +++ b/packages/instant/src/index.umd.ts @@ -7,8 +7,10 @@ import { ZeroExInstant, ZeroExInstantProps } from './index'; import { assert } from './util/assert'; export const render = (props: ZeroExInstantProps, selector: string = DEFAULT_ZERO_EX_CONTAINER_SELECTOR) => { - assert.isHexString('assetData', props.assetData); - assert.isValidLiquiditySource('liquiditySource', props.liquiditySource); + assert.isValidOrderSource('orderSource', props.orderSource); + if (!_.isUndefined(props.defaultSelectedAssetData)) { + assert.isHexString('defaultSelectedAssetData', props.defaultSelectedAssetData); + } if (!_.isUndefined(props.additionalAssetMetaDataMap)) { assert.isValidAssetMetaDataMap('additionalAssetMetaDataMap', props.additionalAssetMetaDataMap); } |