diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-12-04 09:52:44 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-12-04 09:52:44 +0800 |
commit | d12b99883bbf73575cd2e14ebba98b1ea1934004 (patch) | |
tree | 784592d5a7d9034496cfedafa1732d5046d5af8c /packages/instant/src/components | |
parent | 1498e013d083ed3815f5d5ea2de93a848161ed07 (diff) | |
parent | a1e985a1cac46ecbc54c7ef5b846fb5faf2bede2 (diff) | |
download | dexon-0x-contracts-d12b99883bbf73575cd2e14ebba98b1ea1934004.tar.gz dexon-0x-contracts-d12b99883bbf73575cd2e14ebba98b1ea1934004.tar.zst dexon-0x-contracts-d12b99883bbf73575cd2e14ebba98b1ea1934004.zip |
Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/website/instant-configurator
Diffstat (limited to 'packages/instant/src/components')
-rw-r--r-- | packages/instant/src/components/erc20_asset_amount_input.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/instant/src/components/erc20_asset_amount_input.tsx b/packages/instant/src/components/erc20_asset_amount_input.tsx index ff900842a..4da82eb73 100644 --- a/packages/instant/src/components/erc20_asset_amount_input.tsx +++ b/packages/instant/src/components/erc20_asset_amount_input.tsx @@ -113,7 +113,7 @@ export class ERC20AssetAmountInput extends React.Component<ERC20AssetAmountInput ); }; private readonly _renderChevronIcon = (): React.ReactNode => { - if (!this._areMultipleAssetsAvailable()) { + if (!this._areAnyAssetsAvailable()) { return null; } return ( @@ -134,14 +134,14 @@ export class ERC20AssetAmountInput extends React.Component<ERC20AssetAmountInput // We don't want to allow opening the token selection panel if there are no assets. // Since styles are inferred from the presence of a click handler, we want to return undefined // instead of providing a noop. - if (!this._areMultipleAssetsAvailable() || _.isUndefined(this.props.onSelectAssetClick)) { + if (!this._areAnyAssetsAvailable() || _.isUndefined(this.props.onSelectAssetClick)) { return undefined; } return this._handleSelectAssetClick; }; - private readonly _areMultipleAssetsAvailable = (): boolean => { + private readonly _areAnyAssetsAvailable = (): boolean => { const { numberOfAssetsAvailable } = this.props; - return !_.isUndefined(numberOfAssetsAvailable) && numberOfAssetsAvailable > 1; + return !_.isUndefined(numberOfAssetsAvailable) && numberOfAssetsAvailable > 0; }; private readonly _handleSelectAssetClick = (): void => { if (this.props.onSelectAssetClick) { |