diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-10-26 09:53:16 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-10-26 09:53:16 +0800 |
commit | 948d62200a23b4da59278f976e9757cfc3c9234e (patch) | |
tree | 5157ab8f25a8336be61ed73e8b09aa0485321f7f /packages/instant/src | |
parent | a2d09a68b0d6d20359916251e0cc795fb600360e (diff) | |
download | dexon-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/instant/src')
-rw-r--r-- | packages/instant/src/components/zero_ex_instant.tsx | 10 |
1 files changed, 5 insertions, 5 deletions
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), |