);
}
-
}
diff --git a/js/src/views/Signer/components/TransactionPending/TransactionPending.js b/js/src/views/Signer/components/TransactionPending/TransactionPending.js
index 55e4f6405..55f09ac97 100644
--- a/js/src/views/Signer/components/TransactionPending/TransactionPending.js
+++ b/js/src/views/Signer/components/TransactionPending/TransactionPending.js
@@ -16,7 +16,6 @@
import React, { Component, PropTypes } from 'react';
-import CircularProgress from 'material-ui/CircularProgress';
import TransactionMainDetails from '../TransactionMainDetails';
import TransactionPendingForm from '../TransactionPendingForm';
import TransactionSecondaryDetails from '../TransactionSecondaryDetails';
@@ -43,7 +42,8 @@ export default class TransactionPending extends Component {
onConfirm: PropTypes.func.isRequired,
onReject: PropTypes.func.isRequired,
isSending: PropTypes.bool.isRequired,
- className: PropTypes.string
+ className: PropTypes.string,
+ isTest: PropTypes.bool.isRequired
};
static defaultProps = {
@@ -51,7 +51,6 @@ export default class TransactionPending extends Component {
};
state = {
- chain: null,
fromBalance: null,
toBalance: null
};
@@ -64,28 +63,12 @@ export default class TransactionPending extends Component {
const gasToDisplay = tUtil.getGasDisplay(gas);
this.setState({ gasPriceEthmDisplay, totalValue, gasToDisplay });
- this.context.api.parity.netChain()
- .then((chain) => {
- this.setState({ chain });
- })
- .catch((err) => {
- console.error('could not fetch chain', err);
- });
-
const { from, to } = this.props;
this.fetchBalance(from, 'fromBalance');
if (to) this.fetchBalance(to, 'toBalance');
}
render () {
- if (!this.state.chain) {
- return (
-
-
-
- );
- }
-
const { totalValue, gasPriceEthmDisplay, gasToDisplay } = this.state;
const { className, id, date, data, from } = this.props;
diff --git a/js/src/views/Signer/components/TransactionSecondaryDetails/TransactionSecondaryDetails.js b/js/src/views/Signer/components/TransactionSecondaryDetails/TransactionSecondaryDetails.js
index 61c1260d4..fb0a329e0 100644
--- a/js/src/views/Signer/components/TransactionSecondaryDetails/TransactionSecondaryDetails.js
+++ b/js/src/views/Signer/components/TransactionSecondaryDetails/TransactionSecondaryDetails.js
@@ -59,10 +59,13 @@ export default class TransactionSecondaryDetails extends Component {
}
renderGasPrice () {
- if (!this.props.gasPriceEthmDisplay && !this.props.gasToDisplay) return null;
+ if (!this.props.gasPriceEthmDisplay && !this.props.gasToDisplay) {
+ return null;
+ }
const { id } = this.props;
const { gasPriceEthmDisplay, gasToDisplay } = this.props;
+
return (
{ children || txHash }
diff --git a/js/src/views/Signer/containers/Embedded/embedded.js b/js/src/views/Signer/containers/Embedded/embedded.js
index be3a65d61..e06eaf274 100644
--- a/js/src/views/Signer/containers/Embedded/embedded.js
+++ b/js/src/views/Signer/containers/Embedded/embedded.js
@@ -35,7 +35,8 @@ class Embedded extends Component {
actions: PropTypes.shape({
startConfirmRequest: PropTypes.func.isRequired,
startRejectRequest: PropTypes.func.isRequired
- }).isRequired
+ }).isRequired,
+ isTest: PropTypes.bool.isRequired
};
render () {
@@ -70,7 +71,7 @@ class Embedded extends Component {
}
renderPending = (data) => {
- const { actions } = this.props;
+ const { actions, isTest } = this.props;
const { payload, id, isSending, date } = data;
return (
@@ -83,6 +84,7 @@ class Embedded extends Component {
id={ id }
payload={ payload }
date={ date }
+ isTest={ isTest }
/>
);
}
@@ -93,11 +95,13 @@ class Embedded extends Component {
}
function mapStateToProps (state) {
+ const { isTest } = state.nodeStatus;
const { actions, signer } = state;
return {
actions,
- signer
+ signer,
+ isTest
};
}
diff --git a/js/src/views/Signer/containers/RequestsPage/RequestsPage.js b/js/src/views/Signer/containers/RequestsPage/RequestsPage.js
index 2a0d087e3..bf4968610 100644
--- a/js/src/views/Signer/containers/RequestsPage/RequestsPage.js
+++ b/js/src/views/Signer/containers/RequestsPage/RequestsPage.js
@@ -35,7 +35,8 @@ class RequestsPage extends Component {
actions: PropTypes.shape({
startConfirmRequest: PropTypes.func.isRequired,
startRejectRequest: PropTypes.func.isRequired
- }).isRequired
+ }).isRequired,
+ isTest: PropTypes.bool.isRequired
};
render () {
@@ -96,7 +97,7 @@ class RequestsPage extends Component {
}
renderPending = (data) => {
- const { actions } = this.props;
+ const { actions, isTest } = this.props;
const { payload, id, isSending, date } = data;
return (
@@ -109,11 +110,13 @@ class RequestsPage extends Component {
id={ id }
payload={ payload }
date={ date }
+ isTest={ isTest }
/>
);
}
renderFinished = (data) => {
+ const { isTest } = this.props;
const { payload, id, result, msg, status, error, date } = data;
return (
@@ -127,6 +130,7 @@ class RequestsPage extends Component {
error={ error }
payload={ payload }
date={ date }
+ isTest={ isTest }
/>
);
}
@@ -143,7 +147,14 @@ class RequestsPage extends Component {
}
function mapStateToProps (state) {
- return state;
+ const { isTest } = state.nodeStatus;
+ const { actions, signer } = state;
+
+ return {
+ actions,
+ signer,
+ isTest
+ };
}
function mapDispatchToProps (dispatch) {