aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/index.umd.ts
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-11-01 10:20:37 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-11-01 10:21:06 +0800
commit6091ee732d208eaf9889087b8308dfd0427b9be5 (patch)
treec13189159cc172c9f82340a8d3a2bd69eed47f6e /packages/instant/src/index.umd.ts
parent8c336925601127c759ad4cfbca119368a2edfd56 (diff)
downloaddexon-sol-tools-6091ee732d208eaf9889087b8308dfd0427b9be5.tar
dexon-sol-tools-6091ee732d208eaf9889087b8308dfd0427b9be5.tar.gz
dexon-sol-tools-6091ee732d208eaf9889087b8308dfd0427b9be5.tar.bz2
dexon-sol-tools-6091ee732d208eaf9889087b8308dfd0427b9be5.tar.lz
dexon-sol-tools-6091ee732d208eaf9889087b8308dfd0427b9be5.tar.xz
dexon-sol-tools-6091ee732d208eaf9889087b8308dfd0427b9be5.tar.zst
dexon-sol-tools-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.ts6
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);
}