From 3169b724064c1495b27c67ec92aeb7314a18e177 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Mon, 19 Nov 2018 17:04:15 -0800 Subject: fix(instant): Don't allow changing of assets when order processing --- packages/instant/src/components/erc20_asset_amount_input.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'packages/instant/src/components') 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 @@ -74,11 +75,11 @@ export class ERC20AssetAmountInput extends React.Component {assetUtils.formattedSymbolForAsset(asset)} - {this._renderChevronIcon()} + {isEnabled && this._renderChevronIcon()} -- cgit v1.2.3 From 6de499459cb29f74cabd91c441f85e4c2325a6d7 Mon Sep 17 00:00:00 2001 From: fragosti Date: Mon, 19 Nov 2018 17:10:47 -0800 Subject: fix: do not use document on import --- packages/instant/src/components/zero_ex_instant_provider.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'packages/instant/src/components') diff --git a/packages/instant/src/components/zero_ex_instant_provider.tsx b/packages/instant/src/components/zero_ex_instant_provider.tsx index 8be53ee20..ac246128c 100644 --- a/packages/instant/src/components/zero_ex_instant_provider.tsx +++ b/packages/instant/src/components/zero_ex_instant_provider.tsx @@ -19,8 +19,6 @@ import { Heartbeater } from '../util/heartbeater'; import { generateAccountHeartbeater, generateBuyQuoteHeartbeater } from '../util/heartbeater_factory'; import { providerStateFactory } from '../util/provider_state_factory'; -fonts.include(); - export type ZeroExInstantProviderProps = ZeroExInstantProviderRequiredProps & Partial; @@ -86,6 +84,7 @@ export class ZeroExInstantProvider extends React.Component Date: Tue, 20 Nov 2018 09:51:14 -0800 Subject: Allow user to select other token on success --- packages/instant/src/components/erc20_asset_amount_input.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'packages/instant/src/components') 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 @@ -75,11 +75,11 @@ export class ERC20AssetAmountInput extends React.Component {assetUtils.formattedSymbolForAsset(asset)} - {isEnabled && this._renderChevronIcon()} + {this.props.canSelectOtherAsset && this._renderChevronIcon()} -- cgit v1.2.3 From b7eb2e887d636e2ed61eade4bae01596dba4b4c2 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Tue, 20 Nov 2018 13:59:09 -0800 Subject: isDisabled -> isInputDisabled --- packages/instant/src/components/erc20_asset_amount_input.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'packages/instant/src/components') diff --git a/packages/instant/src/components/erc20_asset_amount_input.tsx b/packages/instant/src/components/erc20_asset_amount_input.tsx index e675d3fc5..b825255c4 100644 --- a/packages/instant/src/components/erc20_asset_amount_input.tsx +++ b/packages/instant/src/components/erc20_asset_amount_input.tsx @@ -22,7 +22,7 @@ export interface ERC20AssetAmountInputProps { onSelectAssetClick?: (asset?: ERC20Asset) => void; startingFontSizePx: number; fontColor?: ColorOption; - isDisabled: boolean; + isInputDisabled: boolean; canSelectOtherAsset: boolean; numberOfAssetsAvailable?: number; } @@ -51,14 +51,15 @@ export class ERC20AssetAmountInput extends React.Component { - const { onChange, ...rest } = this.props; - const amountBorderBottom = this.props.isDisabled ? '' : `1px solid ${transparentWhite}`; + const { onChange, isInputDisabled, ...rest } = this.props; + const amountBorderBottom = isInputDisabled ? '' : `1px solid ${transparentWhite}`; const onSymbolClick = this._generateSelectAssetClickHandler(); return (