From b895b855cbb555736be838e2630890ab6a69d884 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Fri, 2 Nov 2018 12:03:15 -0700 Subject: feat(instant): add affiliateInfo overrides to dev url --- packages/instant/public/index.html | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'packages/instant/public/index.html') 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); -- cgit v1.2.3