aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-11-10 08:16:04 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-11-10 08:16:04 +0800
commit5355f3c538bbeb9a7edb6d4d7995bc02294df257 (patch)
tree7b1f9c650f2c973fc6054343ada02c2dd79cd4cd /packages/instant/src
parent478330c12db31abf3035fbec424cda0155020182 (diff)
downloaddexon-sol-tools-5355f3c538bbeb9a7edb6d4d7995bc02294df257.tar
dexon-sol-tools-5355f3c538bbeb9a7edb6d4d7995bc02294df257.tar.gz
dexon-sol-tools-5355f3c538bbeb9a7edb6d4d7995bc02294df257.tar.bz2
dexon-sol-tools-5355f3c538bbeb9a7edb6d4d7995bc02294df257.tar.lz
dexon-sol-tools-5355f3c538bbeb9a7edb6d4d7995bc02294df257.tar.xz
dexon-sol-tools-5355f3c538bbeb9a7edb6d4d7995bc02294df257.tar.zst
dexon-sol-tools-5355f3c538bbeb9a7edb6d4d7995bc02294df257.zip
fix: remove unused ProgressBar from BuyOrderProgress and fix issue where payment method is not shown for pending metamask confirmation
Diffstat (limited to 'packages/instant/src')
-rw-r--r--packages/instant/src/components/buy_order_progress.tsx18
-rw-r--r--packages/instant/src/components/zero_ex_instant_container.tsx3
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;