From 5355f3c538bbeb9a7edb6d4d7995bc02294df257 Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 9 Nov 2018 16:16:04 -0800 Subject: fix: remove unused ProgressBar from BuyOrderProgress and fix issue where payment method is not shown for pending metamask confirmation --- packages/instant/src/components/buy_order_progress.tsx | 18 +++--------------- .../src/components/zero_ex_instant_container.tsx | 3 +-- 2 files changed, 4 insertions(+), 17 deletions(-) (limited to 'packages/instant/src') 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 = 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 = const progress = buyOrderState.progress; const hasEnded = buyOrderState.processState !== OrderProcessState.Processing; const expectedTimeMs = progress.expectedEndTimeUnix - progress.startTimeUnix; - content = ( - + return ( + - - ); - } else { - // Just show a static progress bar if we aren't processing or in an end state - content = ( - - ); } - return ( - - {content} - - ); + 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; - } - if (orderProcessState === OrderProcessState.None) { + } else { return ; } return null; -- cgit