diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/instant/src/components/buy_order_progress.tsx | 18 | ||||
-rw-r--r-- | packages/instant/src/components/zero_ex_instant_container.tsx | 3 |
2 files changed, 4 insertions, 17 deletions
diff --git a/packages/instant/src/components/buy_order_progress.tsx b/packages/instant/src/components/buy_order_progress.tsx index 9c73d58af..cb02c8d8c 100644 --- a/packages/instant/src/components/buy_order_progress.tsx +++ b/packages/instant/src/components/buy_order_progress.tsx @@ -13,7 +13,6 @@ export interface BuyOrderProgressProps { export const BuyOrderProgress: React.StatelessComponent<BuyOrderProgressProps> = props => { const { buyOrderState } = props; - let content: React.ReactNode = null; if ( buyOrderState.processState === OrderProcessState.Processing || buyOrderState.processState === OrderProcessState.Success || @@ -22,25 +21,14 @@ export const BuyOrderProgress: React.StatelessComponent<BuyOrderProgressProps> = const progress = buyOrderState.progress; const hasEnded = buyOrderState.processState !== OrderProcessState.Processing; const expectedTimeMs = progress.expectedEndTimeUnix - progress.startTimeUnix; - content = ( - <React.Fragment> + return ( + <Container padding="20px 20px 0px 20px" width="100%"> <Container marginBottom="5px"> <TimeCounter estimatedTimeMs={expectedTimeMs} hasEnded={hasEnded} key={progress.startTimeUnix} /> </Container> <TimedProgressBar expectedTimeMs={expectedTimeMs} hasEnded={hasEnded} key={progress.startTimeUnix} /> - </React.Fragment> - ); - } else { - // Just show a static progress bar if we aren't processing or in an end state - content = ( - <Container marginTop="10px"> - <ProgressBar width="0px" /> </Container> ); } - return ( - <Container padding="20px 20px 0px 20px" width="100%"> - {content} - </Container> - ); + return null; }; diff --git a/packages/instant/src/components/zero_ex_instant_container.tsx b/packages/instant/src/components/zero_ex_instant_container.tsx index 6412c9c66..5c2055a8a 100644 --- a/packages/instant/src/components/zero_ex_instant_container.tsx +++ b/packages/instant/src/components/zero_ex_instant_container.tsx @@ -87,8 +87,7 @@ export class ZeroExInstantContainer extends React.Component<ZeroExInstantContain orderProcessState === OrderProcessState.Failure ) { return <SelectedAssetBuyOrderProgress />; - } - if (orderProcessState === OrderProcessState.None) { + } else { return <ConnectedAccountPaymentMethod />; } return null; |