aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/containers
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-10-27 07:24:16 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-10-27 07:24:16 +0800
commit0e55f76db860962e4ce06866cbfd3e058c0c2984 (patch)
tree5e60891addfead5fc3f7a310352bc0b5b2062a24 /packages/instant/src/containers
parent1880c34ce066a8e33047690ef9fb90393100abd9 (diff)
downloaddexon-sol-tools-0e55f76db860962e4ce06866cbfd3e058c0c2984.tar
dexon-sol-tools-0e55f76db860962e4ce06866cbfd3e058c0c2984.tar.gz
dexon-sol-tools-0e55f76db860962e4ce06866cbfd3e058c0c2984.tar.bz2
dexon-sol-tools-0e55f76db860962e4ce06866cbfd3e058c0c2984.tar.lz
dexon-sol-tools-0e55f76db860962e4ce06866cbfd3e058c0c2984.tar.xz
dexon-sol-tools-0e55f76db860962e4ce06866cbfd3e058c0c2984.tar.zst
dexon-sol-tools-0e55f76db860962e4ce06866cbfd3e058c0c2984.zip
fix(instant): refactor some props to use isDisabled instead of disabled
Diffstat (limited to 'packages/instant/src/containers')
-rw-r--r--packages/instant/src/containers/selected_erc20_asset_amount_input.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/instant/src/containers/selected_erc20_asset_amount_input.ts b/packages/instant/src/containers/selected_erc20_asset_amount_input.ts
index 6e1957a59..3d741ae97 100644
--- a/packages/instant/src/containers/selected_erc20_asset_amount_input.ts
+++ b/packages/instant/src/containers/selected_erc20_asset_amount_input.ts
@@ -25,7 +25,7 @@ interface ConnectedState {
assetBuyer?: AssetBuyer;
value?: BigNumberInput;
asset?: ERC20Asset;
- disabled: boolean;
+ isDisabled: boolean;
}
interface ConnectedDispatch {
@@ -36,7 +36,7 @@ interface ConnectedProps {
value?: BigNumberInput;
asset?: ERC20Asset;
onChange: (value?: BigNumberInput, asset?: ERC20Asset) => void;
- disabled: boolean;
+ isDisabled: boolean;
}
type FinalProps = ConnectedProps & SelectedERC20AssetAmountInputProps;
@@ -44,13 +44,13 @@ type FinalProps = ConnectedProps & SelectedERC20AssetAmountInputProps;
const mapStateToProps = (state: State, _ownProps: SelectedERC20AssetAmountInputProps): ConnectedState => {
const processState = state.buyOrderState.processState;
const isEnabled = processState === OrderProcessState.NONE || processState === OrderProcessState.FAILURE;
- const disabled = !isEnabled;
+ const isDisabled = !isEnabled;
const selectedAsset = state.selectedAsset;
if (_.isUndefined(selectedAsset) || selectedAsset.metaData.assetProxyId !== AssetProxyId.ERC20) {
return {
value: state.selectedAssetAmount,
- disabled,
+ isDisabled,
};
}
@@ -58,7 +58,7 @@ const mapStateToProps = (state: State, _ownProps: SelectedERC20AssetAmountInputP
assetBuyer: state.assetBuyer,
value: state.selectedAssetAmount,
asset: selectedAsset as ERC20Asset,
- disabled,
+ isDisabled,
};
};
@@ -123,7 +123,7 @@ const mergeProps = (
onChange: (value, asset) => {
connectedDispatch.updateBuyQuote(connectedState.assetBuyer, value, asset);
},
- disabled: connectedState.disabled,
+ isDisabled: connectedState.isDisabled,
};
};