diff options
Diffstat (limited to 'packages/instant/src/containers/selected_asset_view_transaction_button.tsx')
-rw-r--r-- | packages/instant/src/containers/selected_asset_view_transaction_button.tsx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/packages/instant/src/containers/selected_asset_view_transaction_button.tsx b/packages/instant/src/containers/selected_asset_view_transaction_button.tsx index 064b877be..c74f07209 100644 --- a/packages/instant/src/containers/selected_asset_view_transaction_button.tsx +++ b/packages/instant/src/containers/selected_asset_view_transaction_button.tsx @@ -8,18 +8,22 @@ import { ViewTransactionButton } from '../components/view_transaction_button'; import { OrderProcessState } from '../types'; import { etherscanUtil } from '../util/etherscan'; -export interface SelectedAssetViewTransactionButtonProps {} +export interface SelectedAssetViewTransactionButtonProps { + width?: string; +} interface ConnectedState { onClick: () => void; + width?: string; } -const mapStateToProps = (state: State, _ownProps: {}): ConnectedState => ({ +const mapStateToProps = (state: State, ownProps: SelectedAssetViewTransactionButtonProps): ConnectedState => ({ onClick: () => { if ( state.assetBuyer && (state.buyOrderState.processState === OrderProcessState.PROCESSING || - state.buyOrderState.processState === OrderProcessState.SUCCESS) + state.buyOrderState.processState === OrderProcessState.SUCCESS || + state.buyOrderState.processState === OrderProcessState.FAILURE) ) { const etherscanUrl = etherscanUtil.getEtherScanTxnAddressIfExists( state.buyOrderState.txHash, @@ -31,6 +35,7 @@ const mapStateToProps = (state: State, _ownProps: {}): ConnectedState => ({ } } }, + width: ownProps.width, }); export const SelectedAssetViewTransactionButton: React.ComponentClass< |