aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/pages/instant/configurator.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website/ts/pages/instant/configurator.tsx')
-rw-r--r--packages/website/ts/pages/instant/configurator.tsx19
1 files changed, 11 insertions, 8 deletions
diff --git a/packages/website/ts/pages/instant/configurator.tsx b/packages/website/ts/pages/instant/configurator.tsx
index 0fb6d7ef8..e72f07a70 100644
--- a/packages/website/ts/pages/instant/configurator.tsx
+++ b/packages/website/ts/pages/instant/configurator.tsx
@@ -23,6 +23,10 @@ export class Configurator extends React.Component<ConfiguratorProps> {
instantConfig: {
orderSource: 'https://api.radarrelay.com/0x/v2/',
availableAssetDatas: [],
+ affiliateInfo: {
+ feeRecipient: '',
+ feePercentage: 0.1,
+ },
},
};
public render(): React.ReactNode {
@@ -61,7 +65,6 @@ export class Configurator extends React.Component<ConfiguratorProps> {
};
private readonly _generateCodeDemoCode = (): string => {
const { instantConfig } = this.state;
- console.log(instantConfig.availableAssetDatas);
return `<head>
<script src="https://instant.0xproject.com/instant.js"></script>
</head>
@@ -69,18 +72,18 @@ export class Configurator extends React.Component<ConfiguratorProps> {
<script>
zeroExInstant.render({
liquiditySource: '${instantConfig.orderSource}',${
+ !_.isUndefined(instantConfig.affiliateInfo) && instantConfig.affiliateInfo.feeRecipient
+ ? `\n\t\taffiliateInfo: {
+ feeRecipient: '${instantConfig.affiliateInfo.feeRecipient}',
+ feePercentage: ${instantConfig.affiliateInfo.feePercentage}
+ }`
+ : ''
+ }${
!_.isUndefined(instantConfig.availableAssetDatas)
? `\n\t\tavailableAssetDatas: ${this._renderAvailableAssetDatasString(
instantConfig.availableAssetDatas,
)}`
: ''
- }${
- !_.isUndefined(instantConfig.affiliateInfo)
- ? `affiliateInfo: {
- feeRecipient: '${instantConfig.affiliateInfo.feeRecipient}',
- feePercentage: ${instantConfig.affiliateInfo.feePercentage}
- }`
- : ''
}
}, 'body');
</script>