aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/public
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/public
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/public')
-rw-r--r--packages/instant/public/index.html8
1 files changed, 5 insertions, 3 deletions
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);