diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-11-03 03:03:15 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-11-03 03:03:15 +0800 |
commit | b895b855cbb555736be838e2630890ab6a69d884 (patch) | |
tree | f28def28bee9925daf8dd859b750c94c0cd83f98 | |
parent | 5e66cc8a40759658a8763f85996163e5ae013fcd (diff) | |
download | dexon-sol-tools-b895b855cbb555736be838e2630890ab6a69d884.tar dexon-sol-tools-b895b855cbb555736be838e2630890ab6a69d884.tar.gz dexon-sol-tools-b895b855cbb555736be838e2630890ab6a69d884.tar.bz2 dexon-sol-tools-b895b855cbb555736be838e2630890ab6a69d884.tar.lz dexon-sol-tools-b895b855cbb555736be838e2630890ab6a69d884.tar.xz dexon-sol-tools-b895b855cbb555736be838e2630890ab6a69d884.tar.zst dexon-sol-tools-b895b855cbb555736be838e2630890ab6a69d884.zip |
feat(instant): add affiliateInfo overrides to dev url
-rw-r--r-- | packages/instant/public/index.html | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/instant/public/index.html b/packages/instant/public/index.html index 7580ab132..96a703224 100644 --- a/packages/instant/public/index.html +++ b/packages/instant/public/index.html @@ -77,11 +77,21 @@ onClose: () => { console.log('0x Instant Closed') } } const liquiditySourceOverride = queryParams.getQueryParamValue('liquiditySource'); + const feeRecipientOverride = queryParams.getQueryParamValue('feeRecipient'); + const feePercentageOverride = +queryParams.getQueryParamValue('feePercentage'); + let affiliateInfoOverride; + if (feeRecipientOverride !== undefined && feePercentageOverride !== undefined) { + affiliateInfoOverride = { + feeRecipient: feeRecipientOverride, + feePercentage: feePercentageOverride + }; + } const renderOptionsOverrides = { liquiditySource: liquiditySourceOverride === 'provided' ? providedOrders : liquiditySourceOverride, assetData: queryParams.getQueryParamValue('assetData'), networkId: +queryParams.getQueryParamValue('networkId') || undefined, defaultAssetBuyAmount: +queryParams.getQueryParamValue('defaultAssetBuyAmount') || undefined, + affiliateInfo: affiliateInfoOverride, } const renderOptions = Object.assign({}, renderOptionsDefaults, removeUndefined(renderOptionsOverrides)); zeroExInstant.render(renderOptions); |