aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/containers
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-10-26 06:42:35 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-10-26 06:42:35 +0800
commitced4c893ba412ca401430a66694e194806d46e6b (patch)
treef594cd94048c1bc6ad14429b50e7ff52e840c37c /packages/instant/src/containers
parente3510f3bcf4eea76d93888faedd822117bab7bdb (diff)
downloaddexon-sol-tools-ced4c893ba412ca401430a66694e194806d46e6b.tar
dexon-sol-tools-ced4c893ba412ca401430a66694e194806d46e6b.tar.gz
dexon-sol-tools-ced4c893ba412ca401430a66694e194806d46e6b.tar.bz2
dexon-sol-tools-ced4c893ba412ca401430a66694e194806d46e6b.tar.lz
dexon-sol-tools-ced4c893ba412ca401430a66694e194806d46e6b.tar.xz
dexon-sol-tools-ced4c893ba412ca401430a66694e194806d46e6b.tar.zst
dexon-sol-tools-ced4c893ba412ca401430a66694e194806d46e6b.zip
Show View Transaction button on failure, and allow setting of width for Try Again button and View Txn button
Diffstat (limited to 'packages/instant/src/containers')
-rw-r--r--packages/instant/src/containers/selected_asset_retry_button.tsx6
-rw-r--r--packages/instant/src/containers/selected_asset_view_transaction_button.tsx11
2 files changed, 12 insertions, 5 deletions
diff --git a/packages/instant/src/containers/selected_asset_retry_button.tsx b/packages/instant/src/containers/selected_asset_retry_button.tsx
index b2b140be6..30e564c7b 100644
--- a/packages/instant/src/containers/selected_asset_retry_button.tsx
+++ b/packages/instant/src/containers/selected_asset_retry_button.tsx
@@ -7,7 +7,9 @@ import { Action, actions } from '../redux/actions';
import { RetryButton } from '../components/retry_button';
-export interface SelectedAssetRetryButtonProps {}
+export interface SelectedAssetRetryButtonProps {
+ width?: string;
+}
interface ConnectedDispatch {
onClick: () => void;
@@ -21,6 +23,6 @@ const mapDispatchToProps = (
});
export const SelectedAssetRetryButton: React.ComponentClass<SelectedAssetRetryButtonProps> = connect(
- undefined,
+ _.noop,
mapDispatchToProps,
)(RetryButton);
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<