diff options
Diffstat (limited to 'packages/instant/src/containers/selected_asset_simulated_progress_bar.tsx')
-rw-r--r-- | packages/instant/src/containers/selected_asset_simulated_progress_bar.tsx | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/packages/instant/src/containers/selected_asset_simulated_progress_bar.tsx b/packages/instant/src/containers/selected_asset_simulated_progress_bar.tsx index 1ddb4ae66..adb5daad8 100644 --- a/packages/instant/src/containers/selected_asset_simulated_progress_bar.tsx +++ b/packages/instant/src/containers/selected_asset_simulated_progress_bar.tsx @@ -9,27 +9,23 @@ import { OrderProcessState, OrderState, SimulatedProgress } from '../types'; interface SelectedAssetProgressComponentProps { buyOrderState: OrderState; - simulatedProgress?: SimulatedProgress; } export const SelectedAssetSimulatedProgressComponent: React.StatelessComponent< SelectedAssetProgressComponentProps > = props => { - const { buyOrderState, simulatedProgress } = props; - - console.log('simulatedProgress', simulatedProgress); - - // TODO: uncomment after done testing - // const isOrderStateOk = - // buyOrderState.processState === OrderProcessState.PROCESSING || - // buyOrderState.processState === OrderProcessState.SUCCESS; - const isOrderStateOk = true; - - if (isOrderStateOk && simulatedProgress) { + const { buyOrderState } = props; + + if ( + buyOrderState.processState === OrderProcessState.PROCESSING || + buyOrderState.processState === OrderProcessState.SUCCESS || + buyOrderState.processState === OrderProcessState.FAILURE + ) { + const progress = buyOrderState.progress; return ( <SimulatedProgressBar - startTimeUnix={simulatedProgress.startTimeUnix} - expectedEndTimeUnix={simulatedProgress.expectedEndTimeUnix} - ended={simulatedProgress.ended} + startTimeUnix={progress.startTimeUnix} + expectedEndTimeUnix={progress.expectedEndTimeUnix} + ended={progress.ended} /> ); } |