aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/components
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-21 01:51:14 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-21 01:51:14 +0800
commit7ad5dbc59dc765d44f01cd1e92511196a54be82c (patch)
tree84b5a9cd71120070a05884e622a731b068ebb5e4 /packages/instant/src/components
parent3169b724064c1495b27c67ec92aeb7314a18e177 (diff)
downloaddexon-sol-tools-7ad5dbc59dc765d44f01cd1e92511196a54be82c.tar
dexon-sol-tools-7ad5dbc59dc765d44f01cd1e92511196a54be82c.tar.gz
dexon-sol-tools-7ad5dbc59dc765d44f01cd1e92511196a54be82c.tar.bz2
dexon-sol-tools-7ad5dbc59dc765d44f01cd1e92511196a54be82c.tar.lz
dexon-sol-tools-7ad5dbc59dc765d44f01cd1e92511196a54be82c.tar.xz
dexon-sol-tools-7ad5dbc59dc765d44f01cd1e92511196a54be82c.tar.zst
dexon-sol-tools-7ad5dbc59dc765d44f01cd1e92511196a54be82c.zip
Allow user to select other token on success
Diffstat (limited to 'packages/instant/src/components')
-rw-r--r--packages/instant/src/components/erc20_asset_amount_input.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/instant/src/components/erc20_asset_amount_input.tsx b/packages/instant/src/components/erc20_asset_amount_input.tsx
index 371e0b0d5..e675d3fc5 100644
--- a/packages/instant/src/components/erc20_asset_amount_input.tsx
+++ b/packages/instant/src/components/erc20_asset_amount_input.tsx
@@ -23,6 +23,7 @@ export interface ERC20AssetAmountInputProps {
startingFontSizePx: number;
fontColor?: ColorOption;
isDisabled: boolean;
+ canSelectOtherAsset: boolean;
numberOfAssetsAvailable?: number;
}
@@ -53,7 +54,6 @@ 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">
@@ -75,11 +75,11 @@ export class ERC20AssetAmountInput extends React.Component<ERC20AssetAmountInput
fontSize={`${this.state.currentFontSizePx}px`}
fontColor={ColorOption.white}
textTransform="uppercase"
- onClick={isEnabled ? onSymbolClick : undefined}
+ onClick={this.props.canSelectOtherAsset ? onSymbolClick : undefined}
>
{assetUtils.formattedSymbolForAsset(asset)}
</Text>
- {isEnabled && this._renderChevronIcon()}
+ {this.props.canSelectOtherAsset && this._renderChevronIcon()}
</Flex>
</Container>
</React.Fragment>