From b7f4062ac84159e58d0282a38fb64825c429cbd8 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Wed, 24 Oct 2018 16:17:01 -0700 Subject: feat(instant): Be able to view transaction when transaction is in progress --- packages/instant/src/components/buy_order_state_button.tsx | 6 +++--- packages/instant/src/components/instant_heading.tsx | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'packages/instant/src/components') diff --git a/packages/instant/src/components/buy_order_state_button.tsx b/packages/instant/src/components/buy_order_state_button.tsx index b5b21fd1e..44115e5a1 100644 --- a/packages/instant/src/components/buy_order_state_button.tsx +++ b/packages/instant/src/components/buy_order_state_button.tsx @@ -13,12 +13,12 @@ export interface BuyOrderStateButtonProps { export const BuyOrderStateButton: React.StatelessComponent = props => { if (props.buyOrderProcessingState === OrderProcessState.FAILURE) { return ; - } else if (props.buyOrderProcessingState === OrderProcessState.SUCCESS) { - return ; } else if ( - props.buyOrderProcessingState === OrderProcessState.AWAITING_SIGNATURE || + props.buyOrderProcessingState === OrderProcessState.SUCCESS || props.buyOrderProcessingState === OrderProcessState.PROCESSING ) { + return ; + } else if (props.buyOrderProcessingState === OrderProcessState.AWAITING_SIGNATURE) { return ; } diff --git a/packages/instant/src/components/instant_heading.tsx b/packages/instant/src/components/instant_heading.tsx index 37d87580d..17ac65429 100644 --- a/packages/instant/src/components/instant_heading.tsx +++ b/packages/instant/src/components/instant_heading.tsx @@ -10,6 +10,7 @@ import { format } from '../util/format'; import { AmountPlaceholder } from './amount_placeholder'; import { Container, Flex, Text } from './ui'; import { Icon } from './ui/icon'; +import { Spinner } from './ui/spinner'; export interface InstantHeadingProps { selectedAssetAmount?: BigNumber; @@ -70,6 +71,8 @@ export class InstantHeading extends React.Component { if (processState === OrderProcessState.FAILURE) { return ; + } else if (processState === OrderProcessState.PROCESSING) { + return ; } else if (processState === OrderProcessState.SUCCESS) { return ; } @@ -80,6 +83,8 @@ export class InstantHeading extends React.Component { const processState = this.props.buyOrderState.processState; if (processState === OrderProcessState.FAILURE) { return 'Order failed'; + } else if (processState === OrderProcessState.PROCESSING) { + return 'Processing Order...'; } else if (processState === OrderProcessState.SUCCESS) { return 'Tokens received!'; } -- cgit v1.2.3