diff --git a/ui/app/components/app/confirm-page-container/confirm-detail-row/confirm-detail-row.component.js b/ui/app/components/app/confirm-page-container/confirm-detail-row/confirm-detail-row.component.js
index d4b6cee68..0cdb53a32 100644
--- a/ui/app/components/app/confirm-page-container/confirm-detail-row/confirm-detail-row.component.js
+++ b/ui/app/components/app/confirm-page-container/confirm-detail-row/confirm-detail-row.component.js
@@ -22,12 +22,16 @@ const ConfirmDetailRow = (props) => {
{ label }
-
onHeaderClick && onHeaderClick()}
- >
- { headerText }
-
+ {
+ headerText && (
+
onHeaderClick && onHeaderClick()}
+ >
+ { headerText }
+
+ )
+ }
{
primaryText
? (
diff --git a/ui/app/pages/confirm-transaction-base/confirm-transaction-base.component.js b/ui/app/pages/confirm-transaction-base/confirm-transaction-base.component.js
index 1b44c4376..4c9ab94e1 100644
--- a/ui/app/pages/confirm-transaction-base/confirm-transaction-base.component.js
+++ b/ui/app/pages/confirm-transaction-base/confirm-transaction-base.component.js
@@ -97,6 +97,7 @@ export default class ConfirmTransactionBase extends Component {
hideSenderToRecipient: PropTypes.bool,
showAccountInHeader: PropTypes.bool,
mostRecentOverviewPage: PropTypes.string.isRequired,
+ isMainnet: PropTypes.bool,
}
state = {
@@ -236,12 +237,15 @@ export default class ConfirmTransactionBase extends Component {
hideFiatConversion,
nextNonce,
getNextNonce,
+ isMainnet,
} = this.props
if (hideDetails) {
return null
}
+ const notMainnetOrTest = !(isMainnet || process.env.IN_TEST)
+
return (
detailsComponent || (
@@ -249,12 +253,12 @@ export default class ConfirmTransactionBase extends Component {
this.handleEditGas()}
+ headerText={notMainnetOrTest ? '' : 'Edit'}
+ headerTextClassName={notMainnetOrTest ? '' : 'confirm-detail-row__header-text--edit'}
+ onHeaderClick={notMainnetOrTest ? null : () => this.handleEditGas()}
secondaryText={hideFiatConversion ? this.context.t('noConversionRateAvailable') : ''}
/>
- {advancedInlineGasShown
+ {advancedInlineGasShown || notMainnetOrTest
? (
updateGasAndCalculate({ ...customGas, gasPrice: newGasPrice })}
diff --git a/ui/app/pages/confirm-transaction-base/confirm-transaction-base.container.js b/ui/app/pages/confirm-transaction-base/confirm-transaction-base.container.js
index 7d002356c..08b0f4581 100644
--- a/ui/app/pages/confirm-transaction-base/confirm-transaction-base.container.js
+++ b/ui/app/pages/confirm-transaction-base/confirm-transaction-base.container.js
@@ -177,6 +177,7 @@ const mapStateToProps = (state, ownProps) => {
transactionCategory,
nextNonce,
mostRecentOverviewPage: getMostRecentOverviewPage(state),
+ isMainnet,
}
}
diff --git a/ui/app/pages/send/send-content/send-gas-row/send-gas-row.component.js b/ui/app/pages/send/send-content/send-gas-row/send-gas-row.component.js
index 3d22971d5..622bae0c4 100644
--- a/ui/app/pages/send/send-content/send-gas-row/send-gas-row.component.js
+++ b/ui/app/pages/send/send-content/send-gas-row/send-gas-row.component.js
@@ -26,6 +26,7 @@ export default class SendGasRow extends Component {
gasPrice: PropTypes.string,
gasLimit: PropTypes.string,
insufficientBalance: PropTypes.bool,
+ isMainnet: PropTypes.bool,
}
static contextTypes = {
@@ -35,7 +36,11 @@ export default class SendGasRow extends Component {
renderAdvancedOptionsButton () {
const { metricsEvent } = this.context
- const { showCustomizeGasModal } = this.props
+ const { showCustomizeGasModal, isMainnet } = this.props
+ // Tests should behave in same way as mainnet, but are using Localhost
+ if (!isMainnet && !process.env.IN_TEST) {
+ return null
+ }
return (
)
-
- if (advancedInlineGasShown) {
+ // Tests should behave in same way as mainnet, but are using Localhost
+ if (advancedInlineGasShown || (!isMainnet && !process.env.IN_TEST)) {
return advancedGasInputs
} else if (gasButtonGroupShown) {
return gasPriceButtonGroup
diff --git a/ui/app/pages/send/send-content/send-gas-row/send-gas-row.container.js b/ui/app/pages/send/send-content/send-gas-row/send-gas-row.container.js
index 82e6b4a7d..51a17a40c 100644
--- a/ui/app/pages/send/send-content/send-gas-row/send-gas-row.container.js
+++ b/ui/app/pages/send/send-content/send-gas-row/send-gas-row.container.js
@@ -17,6 +17,7 @@ import {
getBasicGasEstimateLoadingStatus,
getRenderableEstimateDataForSmallButtonsFromGWEI,
getDefaultActiveButtonIndex,
+ getIsMainnet,
} from '../../../../selectors'
import {
isBalanceSufficient,
@@ -74,6 +75,7 @@ function mapStateToProps (state) {
maxModeOn: getSendMaxModeState(state),
sendToken: getSendToken(state),
tokenBalance: getTokenBalance(state),
+ isMainnet: getIsMainnet(state),
}
}
diff --git a/ui/app/pages/send/send-content/send-gas-row/tests/send-gas-row-component.test.js b/ui/app/pages/send/send-content/send-gas-row/tests/send-gas-row-component.test.js
index 9c8224043..f80b294f7 100644
--- a/ui/app/pages/send/send-content/send-gas-row/tests/send-gas-row-component.test.js
+++ b/ui/app/pages/send/send-content/send-gas-row/tests/send-gas-row-component.test.js
@@ -34,6 +34,7 @@ describe('SendGasRow Component', function () {
}}
/>
), { context: { t: (str) => str + '_t', metricsEvent: () => ({}) } })
+ wrapper.setProps({ isMainnet: true })
})
afterEach(function () {