From 6091ee732d208eaf9889087b8308dfd0427b9be5 Mon Sep 17 00:00:00 2001 From: fragosti Date: Wed, 31 Oct 2018 19:20:37 -0700 Subject: feat: modify public API to allow for passing in available assets, or fetch assets from SRA --- packages/instant/public/index.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'packages/instant/public') diff --git a/packages/instant/public/index.html b/packages/instant/public/index.html index 9f1dfdb64..74975678a 100644 --- a/packages/instant/public/index.html +++ b/packages/instant/public/index.html @@ -55,15 +55,17 @@ }; const queryParams = new Uri(window.location.search); const renderOptionsDefaults = { - liquiditySource: 'https://api.radarrelay.com/0x/v2/', + orderSource: 'https://api.radarrelay.com/0x/v2/', assetData: '0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498', } - const liquiditySourceOverride = queryParams.getQueryParamValue('liquiditySource'); + const orderSourceOverride = queryParams.getQueryParamValue('orderSource'); const renderOptionsOverrides = { - liquiditySource: liquiditySourceOverride === 'provided' ? [providedOrder] : liquiditySourceOverride, + orderSource: orderSourceOverride === 'provided' ? [providedOrder] : orderSourceOverride, assetData: queryParams.getQueryParamValue('assetData'), networkId: +queryParams.getQueryParamValue('networkId') || undefined, defaultAssetBuyAmount: +queryParams.getQueryParamValue('defaultAssetBuyAmount') || undefined, + availableAssetIdentifiers: JSON.parse(queryParams.getQueryParamValue('availableAssetIdentifiers') || '[]'), + defaultSelectedAssetIdentifier: queryParams.getQueryParamValue('defaultSelectedAssetIdentifier'), } const renderOptions = Object.assign({}, renderOptionsDefaults, removeUndefined(renderOptionsOverrides)); zeroExInstant.render(renderOptions); -- cgit v1.2.3