aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src
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/instant/src
parenta2d09a68b0d6d20359916251e0cc795fb600360e (diff)
downloaddexon-0x-contracts-948d62200a23b4da59278f976e9757cfc3c9234e.tar
dexon-0x-contracts-948d62200a23b4da59278f976e9757cfc3c9234e.tar.gz
dexon-0x-contracts-948d62200a23b4da59278f976e9757cfc3c9234e.tar.bz2
dexon-0x-contracts-948d62200a23b4da59278f976e9757cfc3c9234e.tar.lz
dexon-0x-contracts-948d62200a23b4da59278f976e9757cfc3c9234e.tar.xz
dexon-0x-contracts-948d62200a23b4da59278f976e9757cfc3c9234e.tar.zst
dexon-0x-contracts-948d62200a23b4da59278f976e9757cfc3c9234e.zip
feat: change network to networkId
Diffstat (limited to 'packages/instant/src')
-rw-r--r--packages/instant/src/components/zero_ex_instant.tsx10
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),