diff options
author | Francesco Agosti <francesco.agosti93@gmail.com> | 2018-11-03 07:26:16 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-03 07:26:16 +0800 |
commit | 66261102de57e3bc86714577c021aa5c7e17c150 (patch) | |
tree | 2a146790ba3d0a632a23c7335a3dcbd9d5a8c881 /packages/instant/public | |
parent | d0f20a4fd5d1ab563d4b1c941b55018da129334e (diff) | |
parent | 6748c36b033798de4eb56e5d4e49d1c4b4e7be1e (diff) | |
download | dexon-0x-contracts-66261102de57e3bc86714577c021aa5c7e17c150.tar dexon-0x-contracts-66261102de57e3bc86714577c021aa5c7e17c150.tar.gz dexon-0x-contracts-66261102de57e3bc86714577c021aa5c7e17c150.tar.bz2 dexon-0x-contracts-66261102de57e3bc86714577c021aa5c7e17c150.tar.lz dexon-0x-contracts-66261102de57e3bc86714577c021aa5c7e17c150.tar.xz dexon-0x-contracts-66261102de57e3bc86714577c021aa5c7e17c150.tar.zst dexon-0x-contracts-66261102de57e3bc86714577c021aa5c7e17c150.zip |
Merge pull request #1204 from 0xProject/feature/instant/maker-asset-datas-interface
[instant] Add `availableAssetDatas` to render method, fetch from asset-buyer if not specified, implement basic token selection
Diffstat (limited to 'packages/instant/public')
-rw-r--r-- | packages/instant/public/index.html | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/packages/instant/public/index.html b/packages/instant/public/index.html index 96a703224..92c8a6c21 100644 --- a/packages/instant/public/index.html +++ b/packages/instant/public/index.html @@ -72,11 +72,11 @@ ]; const queryParams = new Uri(window.location.search); const renderOptionsDefaults = { - liquiditySource: 'https://api.radarrelay.com/0x/v2/', - assetData: '0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498', + orderSource: 'https://api.radarrelay.com/0x/v2/', onClose: () => { console.log('0x Instant Closed') } } - const liquiditySourceOverride = queryParams.getQueryParamValue('liquiditySource'); + const orderSourceOverride = queryParams.getQueryParamValue('orderSource'); + const availableAssetDatasString = queryParams.getQueryParamValue('availableAssetDatas'); const feeRecipientOverride = queryParams.getQueryParamValue('feeRecipient'); const feePercentageOverride = +queryParams.getQueryParamValue('feePercentage'); let affiliateInfoOverride; @@ -87,10 +87,11 @@ }; } const renderOptionsOverrides = { - liquiditySource: liquiditySourceOverride === 'provided' ? providedOrders : liquiditySourceOverride, - assetData: queryParams.getQueryParamValue('assetData'), + orderSource: orderSourceOverride === 'provided' ? [providedOrder] : orderSourceOverride, networkId: +queryParams.getQueryParamValue('networkId') || undefined, defaultAssetBuyAmount: +queryParams.getQueryParamValue('defaultAssetBuyAmount') || undefined, + availableAssetDatas: availableAssetDatasString ? JSON.parse(availableAssetDatasString) : undefined, + defaultSelectedAssetData: queryParams.getQueryParamValue('defaultSelectedAssetData'), affiliateInfo: affiliateInfoOverride, } const renderOptions = Object.assign({}, renderOptionsDefaults, removeUndefined(renderOptionsOverrides)); |