aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/containers/selected_asset_button.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/instant/src/containers/selected_asset_button.tsx')
-rw-r--r--packages/instant/src/containers/selected_asset_button.tsx15
1 files changed, 8 insertions, 7 deletions
diff --git a/packages/instant/src/containers/selected_asset_button.tsx b/packages/instant/src/containers/selected_asset_button.tsx
index 6fad365fa..d368d05e1 100644
--- a/packages/instant/src/containers/selected_asset_button.tsx
+++ b/packages/instant/src/containers/selected_asset_button.tsx
@@ -4,15 +4,16 @@ import { connect } from 'react-redux';
import { SecondaryButton } from '../components/secondary_button';
import { State } from '../redux/reducer';
-import { AsyncProcessState } from '../types';
+import { AsyncProcessState, OrderState } from '../types';
import { PlacingOrderButton } from '../components/placing_order_button';
import { SelectedAssetBuyButton } from './selected_asset_buy_button';
import { SelectedAssetRetryButton } from './selected_asset_retry_button';
+import { SelectedAssetViewTransactionButton } from './selected_asset_view_transaction_button';
interface ConnectedState {
- buyOrderState: AsyncProcessState;
+ buyOrderState: OrderState;
}
export interface SelectedAssetButtonProps {}
const mapStateToProps = (state: State, _ownProps: SelectedAssetButtonProps): ConnectedState => ({
@@ -20,13 +21,13 @@ const mapStateToProps = (state: State, _ownProps: SelectedAssetButtonProps): Con
});
const SelectedAssetButtonPresentationComponent: React.StatelessComponent<{
- buyOrderState: AsyncProcessState;
+ buyOrderState: OrderState;
}> = props => {
- if (props.buyOrderState === AsyncProcessState.FAILURE) {
+ if (props.buyOrderState.processState === AsyncProcessState.FAILURE) {
return <SelectedAssetRetryButton />;
- } else if (props.buyOrderState === AsyncProcessState.SUCCESS) {
- return <SecondaryButton isDisabled={true}>Success</SecondaryButton>;
- } else if (props.buyOrderState === AsyncProcessState.PENDING) {
+ } else if (props.buyOrderState.processState === AsyncProcessState.SUCCESS) {
+ return <SelectedAssetViewTransactionButton />;
+ } else if (props.buyOrderState.processState === AsyncProcessState.PENDING) {
return <PlacingOrderButton />;
}