diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-20 09:04:15 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-20 09:04:15 +0800 |
commit | 3169b724064c1495b27c67ec92aeb7314a18e177 (patch) | |
tree | 4f09684cf1ff654b3b949359554189647b1bc815 | |
parent | 953f8c119b561eeb3463194494e6725869a68bec (diff) | |
download | dexon-sol-tools-3169b724064c1495b27c67ec92aeb7314a18e177.tar.gz dexon-sol-tools-3169b724064c1495b27c67ec92aeb7314a18e177.tar.zst dexon-sol-tools-3169b724064c1495b27c67ec92aeb7314a18e177.zip |
fix(instant): Don't allow changing of assets when order processing
-rw-r--r-- | packages/instant/src/components/erc20_asset_amount_input.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/instant/src/components/erc20_asset_amount_input.tsx b/packages/instant/src/components/erc20_asset_amount_input.tsx index 520ac33d5..371e0b0d5 100644 --- a/packages/instant/src/components/erc20_asset_amount_input.tsx +++ b/packages/instant/src/components/erc20_asset_amount_input.tsx @@ -53,6 +53,7 @@ export class ERC20AssetAmountInput extends React.Component<ERC20AssetAmountInput const { onChange, ...rest } = this.props; const amountBorderBottom = this.props.isDisabled ? '' : `1px solid ${transparentWhite}`; const onSymbolClick = this._generateSelectAssetClickHandler(); + const isEnabled = !this.props.isDisabled; return ( <React.Fragment> <Container borderBottom={amountBorderBottom} display="inline-block"> @@ -74,11 +75,11 @@ export class ERC20AssetAmountInput extends React.Component<ERC20AssetAmountInput fontSize={`${this.state.currentFontSizePx}px`} fontColor={ColorOption.white} textTransform="uppercase" - onClick={onSymbolClick} + onClick={isEnabled ? onSymbolClick : undefined} > {assetUtils.formattedSymbolForAsset(asset)} </Text> - {this._renderChevronIcon()} + {isEnabled && this._renderChevronIcon()} </Flex> </Container> </React.Fragment> |