aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-10-26 09:53:16 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-10-26 09:53:16 +0800
commit948d62200a23b4da59278f976e9757cfc3c9234e (patch)
tree5157ab8f25a8336be61ed73e8b09aa0485321f7f /packages
parenta2d09a68b0d6d20359916251e0cc795fb600360e (diff)
downloaddexon-sol-tools-948d62200a23b4da59278f976e9757cfc3c9234e.tar
dexon-sol-tools-948d62200a23b4da59278f976e9757cfc3c9234e.tar.gz
dexon-sol-tools-948d62200a23b4da59278f976e9757cfc3c9234e.tar.bz2
dexon-sol-tools-948d62200a23b4da59278f976e9757cfc3c9234e.tar.lz
dexon-sol-tools-948d62200a23b4da59278f976e9757cfc3c9234e.tar.xz
dexon-sol-tools-948d62200a23b4da59278f976e9757cfc3c9234e.tar.zst
dexon-sol-tools-948d62200a23b4da59278f976e9757cfc3c9234e.zip
feat: change network to networkId
Diffstat (limited to 'packages')
-rw-r--r--packages/instant/public/index.html2
-rw-r--r--packages/instant/src/components/zero_ex_instant.tsx10
2 files changed, 6 insertions, 6 deletions
diff --git a/packages/instant/public/index.html b/packages/instant/public/index.html
index 0ee144a28..9f1dfdb64 100644
--- a/packages/instant/public/index.html
+++ b/packages/instant/public/index.html
@@ -62,7 +62,7 @@
const renderOptionsOverrides = {
liquiditySource: liquiditySourceOverride === 'provided' ? [providedOrder] : liquiditySourceOverride,
assetData: queryParams.getQueryParamValue('assetData'),
- network: +queryParams.getQueryParamValue('network') || undefined,
+ networkId: +queryParams.getQueryParamValue('networkId') || undefined,
defaultAssetBuyAmount: +queryParams.getQueryParamValue('defaultAssetBuyAmount') || undefined,
}
const renderOptions = Object.assign({}, renderOptionsDefaults, removeUndefined(renderOptionsOverrides));
diff --git a/packages/instant/src/components/zero_ex_instant.tsx b/packages/instant/src/components/zero_ex_instant.tsx
index bf7cc9de5..8454de43c 100644
--- a/packages/instant/src/components/zero_ex_instant.tsx
+++ b/packages/instant/src/components/zero_ex_instant.tsx
@@ -31,17 +31,17 @@ export interface ZeroExInstantRequiredProps {
export interface ZeroExInstantOptionalProps {
defaultAssetBuyAmount?: number;
additionalAssetMetaDataMap: ObjectMap<AssetMetaData>;
- network: Network;
+ networkId: Network;
}
export class ZeroExInstant extends React.Component<ZeroExInstantProps> {
private readonly _store: Store;
private static _mergeInitialStateWithProps(props: ZeroExInstantProps, state: State = INITIAL_STATE): State {
- const network = props.network || state.network;
+ const networkId = props.networkId || state.network;
// TODO: Provider needs to not be hard-coded to injected web3.
const provider = getProvider();
const assetBuyerOptions = {
- networkId: network,
+ networkId,
};
let assetBuyer;
if (_.isString(props.liquiditySource)) {
@@ -60,8 +60,8 @@ export class ZeroExInstant extends React.Component<ZeroExInstantProps> {
const storeStateFromProps: State = {
...state,
assetBuyer,
- network,
- selectedAsset: assetUtils.createAssetFromAssetData(props.assetData, completeAssetMetaDataMap, network),
+ network: networkId,
+ selectedAsset: assetUtils.createAssetFromAssetData(props.assetData, completeAssetMetaDataMap, networkId),
selectedAssetAmount: _.isUndefined(props.defaultAssetBuyAmount)
? state.selectedAssetAmount
: new BigNumber(props.defaultAssetBuyAmount),