diff --git a/.eslintrc b/.eslintrc
index 47c40deb0..eebbb5aa5 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -153,6 +153,7 @@
"operator-linebreak": [2, "after", { "overrides": { "?": "ignore", ":": "ignore" } }],
"padded-blocks": "off",
"quotes": [2, "single", {"avoidEscape": true, "allowTemplateLiterals": true}],
+ "react/no-unused-prop-types": "error",
"react/no-unused-state": 2,
"react/jsx-boolean-value": 2,
"react/jsx-curly-brace-presence": [2, { "props": "never", "children": "never" }],
diff --git a/ui/app/components/app/account-details/account-details.component.js b/ui/app/components/app/account-details/account-details.component.js
index e75e777a6..172ea1868 100644
--- a/ui/app/components/app/account-details/account-details.component.js
+++ b/ui/app/components/app/account-details/account-details.component.js
@@ -23,7 +23,6 @@ export default class AccountDetails extends Component {
label: PropTypes.string.isRequired,
checksummedAddress: PropTypes.string.isRequired,
name: PropTypes.string.isRequired,
- history: PropTypes.object.isRequired,
}
state = {
diff --git a/ui/app/components/app/account-details/account-details.container.js b/ui/app/components/app/account-details/account-details.container.js
index 77692a361..11b143653 100644
--- a/ui/app/components/app/account-details/account-details.container.js
+++ b/ui/app/components/app/account-details/account-details.container.js
@@ -1,6 +1,5 @@
import { connect } from 'react-redux'
import { compose } from 'recompose'
-import { withRouter } from 'react-router-dom'
import PropTypes from 'prop-types'
import { hideSidebar, showModal } from '../../../store/actions'
import AccountDetails from './account-details.component'
@@ -15,7 +14,6 @@ function mapDispatchToProps (dispatch) {
}
const AccountDetailsContainer = compose(
- withRouter,
connect(null, mapDispatchToProps)
)(AccountDetails)
diff --git a/ui/app/components/app/confirm-page-container/confirm-page-container.component.js b/ui/app/components/app/confirm-page-container/confirm-page-container.component.js
index 9ebae3d95..404e214f4 100644
--- a/ui/app/components/app/confirm-page-container/confirm-page-container.component.js
+++ b/ui/app/components/app/confirm-page-container/confirm-page-container.component.js
@@ -32,13 +32,6 @@ export default class ConfirmPageContainer extends Component {
contentComponent: PropTypes.node,
errorKey: PropTypes.string,
errorMessage: PropTypes.string,
- fiatTransactionAmount: PropTypes.string,
- fiatTransactionFee: PropTypes.string,
- fiatTransactionTotal: PropTypes.string,
- ethTransactionAmount: PropTypes.string,
- ethTransactionFee: PropTypes.string,
- ethTransactionTotal: PropTypes.string,
- onEditGas: PropTypes.func,
dataComponent: PropTypes.node,
detailsComponent: PropTypes.node,
identiconAddress: PropTypes.string,
diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.component.js b/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.component.js
index daf91eae3..b02778754 100644
--- a/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.component.js
+++ b/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.component.js
@@ -12,13 +12,10 @@ export default class GasModalPageContainer extends Component {
}
static propTypes = {
- hideModal: PropTypes.func,
hideBasic: PropTypes.bool,
updateCustomGasPrice: PropTypes.func,
updateCustomGasLimit: PropTypes.func,
currentTimeEstimate: PropTypes.string,
- customGasPrice: PropTypes.number,
- customGasLimit: PropTypes.number,
insufficientBalance: PropTypes.bool,
fetchBasicGasAndTimeEstimates: PropTypes.func,
fetchGasEstimates: PropTypes.func,
@@ -35,7 +32,6 @@ export default class GasModalPageContainer extends Component {
customModalGasPriceInHex: PropTypes.string,
customModalGasLimitInHex: PropTypes.string,
cancelAndClose: PropTypes.func,
- transactionFee: PropTypes.string,
blockTime: PropTypes.oneOfType([
PropTypes.string,
PropTypes.number,
diff --git a/ui/app/components/app/gas-customization/gas-price-chart/gas-price-chart.component.js b/ui/app/components/app/gas-customization/gas-price-chart/gas-price-chart.component.js
index c0eaf4852..d5f401c2c 100644
--- a/ui/app/components/app/gas-customization/gas-price-chart/gas-price-chart.component.js
+++ b/ui/app/components/app/gas-customization/gas-price-chart/gas-price-chart.component.js
@@ -24,14 +24,15 @@ export default class GasPriceChart extends Component {
updateCustomGasPrice: PropTypes.func,
}
- renderChart ({
- currentPrice,
- gasPrices,
- estimatedTimes,
- gasPricesMax,
- estimatedTimesMax,
- updateCustomGasPrice,
- }) {
+ renderChart () {
+ const {
+ currentPrice,
+ gasPrices,
+ estimatedTimes,
+ gasPricesMax,
+ estimatedTimesMax,
+ updateCustomGasPrice,
+ } = this.props
const chart = generateChart(gasPrices, estimatedTimes, gasPricesMax, estimatedTimesMax, this.context.t)
setTimeout(function () {
setTickPosition('y', 0, -5, 8)
@@ -95,7 +96,7 @@ export default class GasPriceChart extends Component {
}
componentDidMount () {
- this.renderChart(this.props)
+ this.renderChart()
}
render () {
diff --git a/ui/app/components/app/gas-customization/gas-price-chart/tests/gas-price-chart.component.test.js b/ui/app/components/app/gas-customization/gas-price-chart/tests/gas-price-chart.component.test.js
index 9ac60770a..ca9a2007f 100644
--- a/ui/app/components/app/gas-customization/gas-price-chart/tests/gas-price-chart.component.test.js
+++ b/ui/app/components/app/gas-customization/gas-price-chart/tests/gas-price-chart.component.test.js
@@ -93,11 +93,10 @@ describe('GasPriceChart Component', function () {
})
describe('componentDidMount', () => {
- it('should call this.renderChart with the components props', () => {
+ it('should call this.renderChart', () => {
assert(GasPriceChart.prototype.renderChart.callCount, 1)
wrapper.instance().componentDidMount()
assert(GasPriceChart.prototype.renderChart.callCount, 2)
- assert.deepEqual(GasPriceChart.prototype.renderChart.getCall(1).args, [{ ...testProps }])
})
})
diff --git a/ui/app/components/app/modals/notification-modal.js b/ui/app/components/app/modals/notification-modal.js
index ac7af6140..8607b032c 100644
--- a/ui/app/components/app/modals/notification-modal.js
+++ b/ui/app/components/app/modals/notification-modal.js
@@ -70,7 +70,6 @@ NotificationModal.propTypes = {
showCancelButton: PropTypes.bool,
showConfirmButton: PropTypes.bool,
onConfirm: PropTypes.func,
- t: PropTypes.func,
}
const mapDispatchToProps = dispatch => {
diff --git a/ui/app/components/app/transaction-breakdown/transaction-breakdown.component.js b/ui/app/components/app/transaction-breakdown/transaction-breakdown.component.js
index 0e1073337..02cff8a59 100644
--- a/ui/app/components/app/transaction-breakdown/transaction-breakdown.component.js
+++ b/ui/app/components/app/transaction-breakdown/transaction-breakdown.component.js
@@ -13,7 +13,6 @@ export default class TransactionBreakdown extends PureComponent {
}
static propTypes = {
- transaction: PropTypes.object,
className: PropTypes.string,
nativeCurrency: PropTypes.string.isRequired,
showFiat: PropTypes.bool,
@@ -25,7 +24,6 @@ export default class TransactionBreakdown extends PureComponent {
}
static defaultProps = {
- transaction: {},
showFiat: true,
}
diff --git a/ui/app/components/ui/alert/index.js b/ui/app/components/ui/alert/index.js
index 77003aca8..44aff2b07 100644
--- a/ui/app/components/ui/alert/index.js
+++ b/ui/app/components/ui/alert/index.js
@@ -11,15 +11,15 @@ class Alert extends Component {
UNSAFE_componentWillReceiveProps (nextProps) {
if (!this.props.visible && nextProps.visible) {
- this.animateIn(nextProps)
+ this.animateIn(nextProps.msg)
} else if (this.props.visible && !nextProps.visible) {
this.animateOut()
}
}
- animateIn (props) {
+ animateIn (msg) {
this.setState({
- msg: props.msg,
+ msg: msg,
visible: true,
className: 'visible',
})
@@ -51,7 +51,7 @@ class Alert extends Component {
Alert.propTypes = {
visible: PropTypes.bool.isRequired,
- msg: PropTypes.string,
+ msg: PropTypes.string, /* eslint-disable-line react/no-unused-prop-types */
}
module.exports = Alert
diff --git a/ui/app/components/ui/copyButton.js b/ui/app/components/ui/copyButton.js
index 14b54517b..164f902b1 100644
--- a/ui/app/components/ui/copyButton.js
+++ b/ui/app/components/ui/copyButton.js
@@ -29,11 +29,9 @@ class CopyButton extends Component {
}
render () {
- const state = this.state
- const props = this.props
- const value = props.value
- const copied = state.copied
- const message = copied ? this.context.t('copiedButton') : props.title || this.context.t('copyButton')
+ const { title, value } = this.props
+ const { copied } = this.state
+ const message = copied ? this.context.t('copiedButton') : title || this.context.t('copyButton')
return (
{
}
}
-const mergeProps = (stateProps, dispatchProps, ownProps) => {
- const { nativeCurrency, currentCurrency, conversionRate, ...restStateProps } = stateProps
+const mergeProps = (stateProps, _, ownProps) => {
+ const { nativeCurrency, currentCurrency, conversionRate } = stateProps
const {
value,
numberOfDecimals = 2,
@@ -42,8 +42,6 @@ const mergeProps = (stateProps, dispatchProps, ownProps) => {
const suffix = propsSuffix || (hideLabel ? undefined : toCurrency.toUpperCase())
return {
- ...restStateProps,
- ...dispatchProps,
...restOwnProps,
displayValue,
suffix,
diff --git a/ui/app/components/ui/sender-to-recipient/sender-to-recipient.component.js b/ui/app/components/ui/sender-to-recipient/sender-to-recipient.component.js
index 23090af53..a7597e36b 100644
--- a/ui/app/components/ui/sender-to-recipient/sender-to-recipient.component.js
+++ b/ui/app/components/ui/sender-to-recipient/sender-to-recipient.component.js
@@ -21,7 +21,6 @@ export default class SenderToRecipient extends PureComponent {
recipientEns: PropTypes.string,
recipientAddress: PropTypes.string,
recipientNickname: PropTypes.string,
- t: PropTypes.func,
variant: PropTypes.oneOf([DEFAULT_VARIANT, CARDS_VARIANT, FLAT_VARIANT]),
addressOnly: PropTypes.bool,
assetImage: PropTypes.string,
diff --git a/ui/app/components/ui/token-balance/token-balance.component.js b/ui/app/components/ui/token-balance/token-balance.component.js
index af1a32578..60bee381f 100644
--- a/ui/app/components/ui/token-balance/token-balance.component.js
+++ b/ui/app/components/ui/token-balance/token-balance.component.js
@@ -6,9 +6,7 @@ export default class TokenBalance extends PureComponent {
static propTypes = {
string: PropTypes.string,
symbol: PropTypes.string,
- error: PropTypes.string,
className: PropTypes.string,
- withSymbol: PropTypes.bool,
}
render () {
diff --git a/ui/app/helpers/higher-order-components/metametrics/metametrics.provider.js b/ui/app/helpers/higher-order-components/metametrics/metametrics.provider.js
index 6281ddcc6..8b707a354 100644
--- a/ui/app/helpers/higher-order-components/metametrics/metametrics.provider.js
+++ b/ui/app/helpers/higher-order-components/metametrics/metametrics.provider.js
@@ -21,13 +21,18 @@ import {
class MetaMetricsProvider extends Component {
static propTypes = {
- network: PropTypes.string.isRequired,
- environmentType: PropTypes.string.isRequired,
- activeCurrency: PropTypes.string.isRequired,
accountType: PropTypes.string.isRequired,
- metaMetricsSendCount: PropTypes.number.isRequired,
+ activeCurrency: PropTypes.string.isRequired,
children: PropTypes.object.isRequired,
+ confirmTransactionOrigin: PropTypes.string,
+ environmentType: PropTypes.string.isRequired,
history: PropTypes.object.isRequired,
+ metaMetricsId: PropTypes.string,
+ metaMetricsSendCount: PropTypes.number.isRequired,
+ network: PropTypes.string.isRequired,
+ numberOfTokens: PropTypes.number,
+ numberOfAccounts: PropTypes.number,
+ participateInMetaMetrics: PropTypes.bool,
}
static childContextTypes = {
@@ -51,8 +56,18 @@ class MetaMetricsProvider extends Component {
}
getChildContext () {
- const props = this.props
- const { pathname } = location
+ const {
+ network,
+ environmentType,
+ activeCurrency,
+ accountType,
+ confirmTransactionOrigin,
+ metaMetricsId,
+ participateInMetaMetrics,
+ metaMetricsSendCount,
+ numberOfTokens,
+ numberOfAccounts,
+ } = this.props
const { previousPath, currentPath } = this.state
return {
@@ -62,14 +77,20 @@ class MetaMetricsProvider extends Component {
const { pathname: overRidePathName = '' } = overrides
const isSendFlow = Boolean(name.match(/^send|^confirm/) || overRidePathName.match(/send|confirm/))
- if (props.participateInMetaMetrics || config.isOptIn) {
+ if (participateInMetaMetrics || config.isOptIn) {
return sendMetaMetricsEvent({
- ...props,
+ network,
+ environmentType,
+ activeCurrency,
+ accountType,
+ confirmTransactionOrigin,
+ metaMetricsId,
+ numberOfTokens,
+ numberOfAccounts,
...config,
previousPath,
currentPath,
- pathname,
- excludeMetaMetricsId: isSendFlow && !sendCountIsTrackable(props.metaMetricsSendCount + 1),
+ excludeMetaMetricsId: isSendFlow && !sendCountIsTrackable(metaMetricsSendCount + 1),
...overrides,
})
}
diff --git a/ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js b/ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js
index 04e9c8dcf..c727f4605 100644
--- a/ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js
+++ b/ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js
@@ -12,7 +12,6 @@ export default class ConfirmAddSuggestedToken extends Component {
static propTypes = {
history: PropTypes.object,
- clearPendingTokens: PropTypes.func,
addToken: PropTypes.func,
pendingTokens: PropTypes.object,
removeSuggestedTokens: PropTypes.func,
diff --git a/ui/app/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js b/ui/app/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js
index b41674946..0bccef7f9 100644
--- a/ui/app/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js
+++ b/ui/app/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js
@@ -13,13 +13,10 @@ export default class ConfirmApproveContent extends Component {
}
static propTypes = {
- amount: PropTypes.string,
- txFeeTotal: PropTypes.string,
tokenAmount: PropTypes.string,
customTokenAmount: PropTypes.string,
tokenSymbol: PropTypes.string,
siteImage: PropTypes.string,
- tokenAddress: PropTypes.string,
showCustomizeGasModal: PropTypes.func,
showEditApprovalPermissionModal: PropTypes.func,
origin: PropTypes.string,
diff --git a/ui/app/pages/confirm-approve/confirm-approve.component.js b/ui/app/pages/confirm-approve/confirm-approve.component.js
index a28ef94ee..5dde59b8c 100644
--- a/ui/app/pages/confirm-approve/confirm-approve.component.js
+++ b/ui/app/pages/confirm-approve/confirm-approve.component.js
@@ -84,7 +84,6 @@ export default class ConfirmApprove extends Component {
contentComponent={(
{
this.setState({ customPermissionAmount: newAmount })
}}
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 542a33f38..6cb8b7dd9 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
@@ -27,23 +27,13 @@ export default class ConfirmTransactionBase extends Component {
static propTypes = {
// react-router props
- match: PropTypes.object,
history: PropTypes.object,
// Redux props
balance: PropTypes.string,
cancelTransaction: PropTypes.func,
cancelAllTransactions: PropTypes.func,
clearConfirmTransaction: PropTypes.func,
- clearSend: PropTypes.func,
conversionRate: PropTypes.number,
- currentCurrency: PropTypes.string,
- editTransaction: PropTypes.func,
- ethTransactionAmount: PropTypes.string,
- ethTransactionFee: PropTypes.string,
- ethTransactionTotal: PropTypes.string,
- fiatTransactionAmount: PropTypes.string,
- fiatTransactionFee: PropTypes.string,
- fiatTransactionTotal: PropTypes.string,
fromAddress: PropTypes.string,
fromName: PropTypes.string,
hexTransactionAmount: PropTypes.string,
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 fb5406b83..e391c1877 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
@@ -10,7 +10,6 @@ import {
import {
updateCustomNonce,
- clearSend,
cancelTx,
cancelTxs,
updateAndApproveTx,
@@ -56,7 +55,6 @@ const mapStateToProps = (state, ownProps) => {
conversionRate,
identities,
addressBook,
- currentCurrency,
assetImages,
network,
unapprovedTxs,
@@ -101,12 +99,6 @@ const mapStateToProps = (state, ownProps) => {
const transactionStatus = transaction ? transaction.status : ''
const {
- ethTransactionAmount,
- ethTransactionFee,
- ethTransactionTotal,
- fiatTransactionAmount,
- fiatTransactionFee,
- fiatTransactionTotal,
hexTransactionAmount,
hexTransactionFee,
hexTransactionTotal,
@@ -150,12 +142,6 @@ const mapStateToProps = (state, ownProps) => {
toEns,
toName,
toNickname,
- ethTransactionAmount,
- ethTransactionFee,
- ethTransactionTotal,
- fiatTransactionAmount,
- fiatTransactionFee,
- fiatTransactionTotal,
hexTransactionAmount,
hexTransactionFee,
hexTransactionTotal,
@@ -164,7 +150,6 @@ const mapStateToProps = (state, ownProps) => {
methodData,
tokenProps,
isTxReprice,
- currentCurrency,
conversionRate,
transactionStatus,
nonce,
@@ -198,7 +183,6 @@ export const mapDispatchToProps = dispatch => {
dispatch(updateCustomNonce(value))
},
clearConfirmTransaction: () => dispatch(clearConfirmTransaction()),
- clearSend: () => dispatch(clearSend()),
showTransactionConfirmedModal: ({ onSubmit }) => {
return dispatch(showModal({ name: 'TRANSACTION_CONFIRMED', onSubmit }))
},
diff --git a/ui/app/pages/confirm-transaction-base/tests/confirm-transaction-base.container.test.js b/ui/app/pages/confirm-transaction-base/tests/confirm-transaction-base.container.test.js
deleted file mode 100644
index a8045d0e0..000000000
--- a/ui/app/pages/confirm-transaction-base/tests/confirm-transaction-base.container.test.js
+++ /dev/null
@@ -1,20 +0,0 @@
-import assert from 'assert'
-import { mapDispatchToProps } from '../confirm-transaction-base.container'
-
-describe('Confirm Transaction Base Container', () => {
- it('should map dispatch to props correctly', () => {
- const props = mapDispatchToProps(() => 'mockDispatch')
-
- assert.ok(typeof props.updateCustomNonce === 'function')
- assert.ok(typeof props.clearConfirmTransaction === 'function')
- assert.ok(typeof props.clearSend === 'function')
- assert.ok(typeof props.showTransactionConfirmedModal === 'function')
- assert.ok(typeof props.showCustomizeGasModal === 'function')
- assert.ok(typeof props.updateGasAndCalculate === 'function')
- assert.ok(typeof props.showRejectTransactionsConfirmationModal === 'function')
- assert.ok(typeof props.cancelTransaction === 'function')
- assert.ok(typeof props.cancelAllTransactions === 'function')
- assert.ok(typeof props.sendTransaction === 'function')
- assert.ok(typeof props.setMetaMetricsSendCount === 'function')
- })
-})
diff --git a/ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.component.js b/ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.component.js
index fc0606365..268751643 100644
--- a/ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.component.js
+++ b/ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.component.js
@@ -23,8 +23,6 @@ import {
export default class ConfirmTransactionSwitch extends Component {
static propTypes = {
txData: PropTypes.object,
- isEtherTransaction: PropTypes.bool,
- isTokenMethod: PropTypes.bool,
}
redirectToTransaction () {
diff --git a/ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.container.js b/ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.container.js
index 230a931ad..d13291806 100644
--- a/ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.container.js
+++ b/ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.container.js
@@ -1,11 +1,5 @@
import { connect } from 'react-redux'
import ConfirmTransactionSwitch from './confirm-transaction-switch.component'
-import {
- TOKEN_METHOD_TRANSFER,
- TOKEN_METHOD_APPROVE,
- TOKEN_METHOD_TRANSFER_FROM,
- SEND_ETHER_ACTION_KEY,
-} from '../../helpers/constants/transactions'
import { unconfirmedTransactionsListSelector } from '../../selectors/confirm-transaction'
const mapStateToProps = (state, ownProps) => {
@@ -23,8 +17,6 @@ const mapStateToProps = (state, ownProps) => {
return {
txData: transaction,
- isEtherTransaction: transaction && transaction.transactionCategory === SEND_ETHER_ACTION_KEY,
- isTokenMethod: [TOKEN_METHOD_APPROVE, TOKEN_METHOD_TRANSFER, TOKEN_METHOD_TRANSFER_FROM].includes(transaction && transaction.transactionCategory && transaction.transactionCategory.toLowerCase()),
}
}
diff --git a/ui/app/pages/confirm-transaction/confirm-transaction.component.js b/ui/app/pages/confirm-transaction/confirm-transaction.component.js
index eb87c57ba..ed25258f4 100644
--- a/ui/app/pages/confirm-transaction/confirm-transaction.component.js
+++ b/ui/app/pages/confirm-transaction/confirm-transaction.component.js
@@ -30,11 +30,8 @@ export default class ConfirmTransaction extends Component {
static propTypes = {
history: PropTypes.object.isRequired,
totalUnapprovedCount: PropTypes.number.isRequired,
- match: PropTypes.object,
send: PropTypes.object,
- unconfirmedTransactions: PropTypes.array,
setTransactionToConfirm: PropTypes.func,
- confirmTransaction: PropTypes.object,
clearConfirmTransaction: PropTypes.func,
fetchBasicGasAndTimeEstimates: PropTypes.func,
transaction: PropTypes.object,
@@ -45,7 +42,6 @@ export default class ConfirmTransaction extends Component {
isTokenMethodAction: PropTypes.bool,
fullScreenVsPopupTestGroup: PropTypes.string,
trackABTest: PropTypes.bool,
- conversionRate: PropTypes.number,
}
componentDidMount () {
diff --git a/ui/app/pages/confirm-transaction/confirm-transaction.container.js b/ui/app/pages/confirm-transaction/confirm-transaction.container.js
index 7c3986441..e097942dc 100644
--- a/ui/app/pages/confirm-transaction/confirm-transaction.container.js
+++ b/ui/app/pages/confirm-transaction/confirm-transaction.container.js
@@ -25,9 +25,7 @@ const mapStateToProps = (state, ownProps) => {
send,
unapprovedTxs,
abTests: { fullScreenVsPopup },
- conversionRate,
},
- confirmTransaction,
} = state
const { match: { params = {} } } = ownProps
const { id } = params
@@ -44,17 +42,14 @@ const mapStateToProps = (state, ownProps) => {
return {
totalUnapprovedCount: totalUnconfirmed,
send,
- confirmTransaction,
unapprovedTxs,
id,
paramsTransactionId: id && String(id),
transactionId: transactionId && String(transactionId),
- unconfirmedTransactions,
transaction,
isTokenMethodAction: isTokenMethodAction(transactionCategory),
trackABTest,
fullScreenVsPopupTestGroup: fullScreenVsPopup,
- conversionRate,
}
}
diff --git a/ui/app/pages/create-account/connect-hardware/account-list.js b/ui/app/pages/create-account/connect-hardware/account-list.js
index af9f58210..eaac5668e 100644
--- a/ui/app/pages/create-account/connect-hardware/account-list.js
+++ b/ui/app/pages/create-account/connect-hardware/account-list.js
@@ -191,7 +191,6 @@ AccountList.propTypes = {
getPage: PropTypes.func.isRequired,
network: PropTypes.string,
selectedAccount: PropTypes.string,
- history: PropTypes.object,
onUnlockAccount: PropTypes.func,
onCancel: PropTypes.func,
onAccountRestriction: PropTypes.func,
diff --git a/ui/app/pages/create-account/connect-hardware/index.js b/ui/app/pages/create-account/connect-hardware/index.js
index 62a1980ee..91831eb69 100644
--- a/ui/app/pages/create-account/connect-hardware/index.js
+++ b/ui/app/pages/create-account/connect-hardware/index.js
@@ -206,7 +206,6 @@ class ConnectHardwareForm extends Component {
onAccountChange={this.onAccountChange}
network={this.props.network}
getPage={this.getPage}
- history={this.props.history}
onUnlockAccount={this.onUnlockAccount}
onForgetDevice={this.onForgetDevice}
onCancel={this.onCancel}
@@ -226,9 +225,6 @@ class ConnectHardwareForm extends Component {
}
ConnectHardwareForm.propTypes = {
- hideModal: PropTypes.func,
- showImportPage: PropTypes.func,
- showConnectPage: PropTypes.func,
connectHardware: PropTypes.func,
checkHardwareStatus: PropTypes.func,
forgetDevice: PropTypes.func,
@@ -236,9 +232,7 @@ ConnectHardwareForm.propTypes = {
hideAlert: PropTypes.func,
unlockHardwareWalletAccount: PropTypes.func,
setHardwareWalletDefaultHdPath: PropTypes.func,
- numberOfExistingAccounts: PropTypes.number,
history: PropTypes.object,
- t: PropTypes.func,
network: PropTypes.string,
accounts: PropTypes.object,
address: PropTypes.string,
@@ -247,10 +241,9 @@ ConnectHardwareForm.propTypes = {
const mapStateToProps = state => {
const {
- metamask: { network, selectedAddress, identities = {} },
+ metamask: { network, selectedAddress },
} = state
const accounts = getMetaMaskAccounts(state)
- const numberOfExistingAccounts = Object.keys(identities).length
const {
appState: { defaultHdPaths },
} = state
@@ -259,7 +252,6 @@ const mapStateToProps = state => {
network,
accounts,
address: selectedAddress,
- numberOfExistingAccounts,
defaultHdPaths,
}
}
@@ -281,8 +273,6 @@ const mapDispatchToProps = dispatch => {
unlockHardwareWalletAccount: (index, deviceName, hdPath) => {
return dispatch(actions.unlockHardwareWalletAccount(index, deviceName, hdPath))
},
- showImportPage: () => dispatch(actions.showImportPage()),
- showConnectPage: () => dispatch(actions.showConnectPage()),
showAlert: (msg) => dispatch(actions.showAlert(msg)),
hideAlert: () => dispatch(actions.hideAlert()),
}
diff --git a/ui/app/pages/create-account/create-account.component.js b/ui/app/pages/create-account/create-account.component.js
index 90c9105b7..a1617daa3 100644
--- a/ui/app/pages/create-account/create-account.component.js
+++ b/ui/app/pages/create-account/create-account.component.js
@@ -71,7 +71,6 @@ export default class CreateAccountPage extends Component {
CreateAccountPage.propTypes = {
location: PropTypes.object,
history: PropTypes.object,
- t: PropTypes.func,
}
CreateAccountPage.contextTypes = {
diff --git a/ui/app/pages/create-account/import-account/json.js b/ui/app/pages/create-account/import-account/json.js
index 7fd27264d..065a62737 100644
--- a/ui/app/pages/create-account/import-account/json.js
+++ b/ui/app/pages/create-account/import-account/json.js
@@ -123,13 +123,11 @@ class JsonImportSubview extends Component {
JsonImportSubview.propTypes = {
error: PropTypes.string,
- goHome: PropTypes.func,
displayWarning: PropTypes.func,
firstAddress: PropTypes.string,
importNewJsonAccount: PropTypes.func,
history: PropTypes.object,
setSelectedAddress: PropTypes.func,
- t: PropTypes.func,
}
const mapStateToProps = state => {
@@ -141,7 +139,6 @@ const mapStateToProps = state => {
const mapDispatchToProps = dispatch => {
return {
- goHome: () => dispatch(actions.goHome()),
displayWarning: warning => dispatch(actions.displayWarning(warning)),
importNewJsonAccount: options => dispatch(actions.importNewAccount('JSON File', options)),
setSelectedAddress: (address) => dispatch(actions.setSelectedAddress(address)),
diff --git a/ui/app/pages/create-account/new-account.component.js b/ui/app/pages/create-account/new-account.component.js
index fbb5e128f..5c463f6a6 100644
--- a/ui/app/pages/create-account/new-account.component.js
+++ b/ui/app/pages/create-account/new-account.component.js
@@ -80,14 +80,9 @@ export default class NewAccountCreateForm extends Component {
}
NewAccountCreateForm.propTypes = {
- hideModal: PropTypes.func,
- showImportPage: PropTypes.func,
- showConnectPage: PropTypes.func,
createAccount: PropTypes.func,
- numberOfExistingAccounts: PropTypes.number,
newAccountNumber: PropTypes.number,
history: PropTypes.object,
- t: PropTypes.func,
}
NewAccountCreateForm.contextTypes = {
diff --git a/ui/app/pages/create-account/new-account.container.js b/ui/app/pages/create-account/new-account.container.js
index 9f3af5003..5f2a1c159 100644
--- a/ui/app/pages/create-account/new-account.container.js
+++ b/ui/app/pages/create-account/new-account.container.js
@@ -10,7 +10,6 @@ const mapStateToProps = state => {
return {
network,
address: selectedAddress,
- numberOfExistingAccounts,
newAccountNumber,
}
}
@@ -18,7 +17,6 @@ const mapStateToProps = state => {
const mapDispatchToProps = dispatch => {
return {
toCoinbase: address => dispatch(actions.buyEth({ network: '1', address, amount: 0 })),
- hideModal: () => dispatch(actions.hideModal()),
createAccount: newAccountName => {
return dispatch(actions.addNewAccount())
.then(newAccountAddress => {
@@ -27,8 +25,6 @@ const mapDispatchToProps = dispatch => {
}
})
},
- showImportPage: () => dispatch(actions.showImportPage()),
- showConnectPage: () => dispatch(actions.showConnectPage()),
}
}
diff --git a/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.component.js b/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.component.js
index 4555b1d84..9de7d61c4 100644
--- a/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.component.js
+++ b/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.component.js
@@ -26,9 +26,7 @@ export default class ConfirmSeedPhrase extends PureComponent {
static propTypes = {
hideSeedPhraseBackupAfterOnboarding: PropTypes.func,
history: PropTypes.object,
- onSubmit: PropTypes.func,
seedPhrase: PropTypes.string,
- selectedAddress: PropTypes.string,
initializeThreeBox: PropTypes.func,
setSeedPhraseBackedUp: PropTypes.func,
showingSeedPhraseBackupAfterOnboarding: PropTypes.bool,
@@ -196,8 +194,6 @@ export default class ConfirmSeedPhrase extends PureComponent {
key={index}
seedIndex={index}
index={index}
- draggingSeedIndex={this.state.draggingSeedIndex}
- setDraggingSeedIndex={this.setDraggingSeedIndex}
setHoveringIndex={this.setHoveringIndex}
onDrop={this.onDrop}
className="confirm-seed-phrase__seed-word--shuffled"
diff --git a/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.container.js b/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.container.js
index a78c65adc..83e96990f 100644
--- a/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.container.js
+++ b/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.container.js
@@ -5,14 +5,12 @@ import {
hideSeedPhraseBackupAfterOnboarding,
initializeThreeBox,
} from '../../../../store/actions'
-import { getSelectedAddress } from '../../../../selectors/selectors'
const mapStateToProps = state => {
const { appState: { showingSeedPhraseBackupAfterOnboarding } } = state
return {
showingSeedPhraseBackupAfterOnboarding,
- selectedAddress: getSelectedAddress(state),
}
}
diff --git a/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/draggable-seed.component.js b/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/draggable-seed.component.js
index 5008c6685..7a23738ff 100644
--- a/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/draggable-seed.component.js
+++ b/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/draggable-seed.component.js
@@ -16,11 +16,9 @@ class DraggableSeed extends Component {
onClick: PropTypes.func,
setHoveringIndex: PropTypes.func.isRequired,
index: PropTypes.number,
- draggingSeedIndex: PropTypes.number,
word: PropTypes.string,
className: PropTypes.string,
selected: PropTypes.bool,
- droppable: PropTypes.bool,
}
static defaultProps = {
diff --git a/ui/app/pages/first-time-flow/seed-phrase/seed-phrase.component.js b/ui/app/pages/first-time-flow/seed-phrase/seed-phrase.component.js
index 963dd4a6f..2f74c1628 100644
--- a/ui/app/pages/first-time-flow/seed-phrase/seed-phrase.component.js
+++ b/ui/app/pages/first-time-flow/seed-phrase/seed-phrase.component.js
@@ -15,7 +15,6 @@ import MetaFoxLogo from '../../../components/ui/metafox-logo'
export default class SeedPhrase extends PureComponent {
static propTypes = {
- address: PropTypes.string,
history: PropTypes.object,
seedPhrase: PropTypes.string,
verifySeedPhrase: PropTypes.func,
diff --git a/ui/app/pages/first-time-flow/welcome/welcome.component.js b/ui/app/pages/first-time-flow/welcome/welcome.component.js
index c720d2572..8ba9d33ad 100644
--- a/ui/app/pages/first-time-flow/welcome/welcome.component.js
+++ b/ui/app/pages/first-time-flow/welcome/welcome.component.js
@@ -8,7 +8,6 @@ import { INITIALIZE_CREATE_PASSWORD_ROUTE, INITIALIZE_SELECT_ACTION_ROUTE } from
export default class Welcome extends PureComponent {
static propTypes = {
history: PropTypes.object,
- isInitialized: PropTypes.bool,
participateInMetaMetrics: PropTypes.bool,
welcomeScreenSeen: PropTypes.bool,
}
diff --git a/ui/app/pages/first-time-flow/welcome/welcome.container.js b/ui/app/pages/first-time-flow/welcome/welcome.container.js
index ce4b2b471..cc1988a19 100644
--- a/ui/app/pages/first-time-flow/welcome/welcome.container.js
+++ b/ui/app/pages/first-time-flow/welcome/welcome.container.js
@@ -5,11 +5,10 @@ import { closeWelcomeScreen } from '../../../store/actions'
import Welcome from './welcome.component'
const mapStateToProps = ({ metamask }) => {
- const { welcomeScreenSeen, isInitialized, participateInMetaMetrics } = metamask
+ const { welcomeScreenSeen, participateInMetaMetrics } = metamask
return {
welcomeScreenSeen,
- isInitialized,
participateInMetaMetrics,
}
}
diff --git a/ui/app/pages/keychains/restore-vault.js b/ui/app/pages/keychains/restore-vault.js
index 8f7f399b0..725c73d07 100644
--- a/ui/app/pages/keychains/restore-vault.js
+++ b/ui/app/pages/keychains/restore-vault.js
@@ -17,7 +17,6 @@ class RestoreVaultPage extends Component {
}
static propTypes = {
- warning: PropTypes.string,
createNewVaultAndRestore: PropTypes.func.isRequired,
leaveImportSeedScreenState: PropTypes.func,
history: PropTypes.object,
@@ -192,7 +191,7 @@ class RestoreVaultPage extends Component {
}
export default connect(
- ({ appState: { warning, isLoading } }) => ({ warning, isLoading }),
+ ({ appState: { isLoading } }) => ({ isLoading }),
dispatch => ({
leaveImportSeedScreenState: () => {
dispatch(unMarkPasswordForgotten())
diff --git a/ui/app/pages/send/account-list-item/account-list-item.component.js b/ui/app/pages/send/account-list-item/account-list-item.component.js
index 8c676f419..6dd879ce3 100644
--- a/ui/app/pages/send/account-list-item/account-list-item.component.js
+++ b/ui/app/pages/send/account-list-item/account-list-item.component.js
@@ -12,8 +12,6 @@ export default class AccountListItem extends Component {
static propTypes = {
account: PropTypes.object,
className: PropTypes.string,
- conversionRate: PropTypes.number,
- currentCurrency: PropTypes.string,
displayAddress: PropTypes.bool,
displayBalance: PropTypes.bool,
handleClick: PropTypes.func,
diff --git a/ui/app/pages/send/account-list-item/account-list-item.container.js b/ui/app/pages/send/account-list-item/account-list-item.container.js
index 3fadec4f8..2e393ba58 100644
--- a/ui/app/pages/send/account-list-item/account-list-item.container.js
+++ b/ui/app/pages/send/account-list-item/account-list-item.container.js
@@ -1,7 +1,5 @@
import { connect } from 'react-redux'
import {
- getConversionRate,
- getCurrentCurrency,
getNativeCurrency,
} from '../send.selectors.js'
import {
@@ -18,8 +16,6 @@ function mapStateToProps (state) {
const isMainnet = getIsMainnet(state)
return {
- conversionRate: getConversionRate(state),
- currentCurrency: getCurrentCurrency(state),
nativeCurrency: getNativeCurrency(state),
balanceIsCached: isBalanceCached(state),
showFiat: (isMainnet || !!showFiatInTestnets),
diff --git a/ui/app/pages/send/account-list-item/tests/account-list-item-container.test.js b/ui/app/pages/send/account-list-item/tests/account-list-item-container.test.js
index 1580fd497..0c0fd83aa 100644
--- a/ui/app/pages/send/account-list-item/tests/account-list-item-container.test.js
+++ b/ui/app/pages/send/account-list-item/tests/account-list-item-container.test.js
@@ -30,8 +30,6 @@ describe('account-list-item container', () => {
it('should map the correct properties to props', () => {
assert.deepEqual(mapStateToProps({ isMainnet: true, showFiatInTestnets: false }), {
- conversionRate: 'mockConversionRate',
- currentCurrency: 'mockCurrentCurrency',
nativeCurrency: 'mockNativeCurrency',
balanceIsCached: 'mockBalanceIsCached',
showFiat: true,
@@ -40,8 +38,6 @@ describe('account-list-item container', () => {
it('should map the correct properties to props when in mainnet and showFiatInTestnet is true', () => {
assert.deepEqual(mapStateToProps({ isMainnet: true, showFiatInTestnets: true }), {
- conversionRate: 'mockConversionRate',
- currentCurrency: 'mockCurrentCurrency',
nativeCurrency: 'mockNativeCurrency',
balanceIsCached: 'mockBalanceIsCached',
showFiat: true,
@@ -50,8 +46,6 @@ describe('account-list-item container', () => {
it('should map the correct properties to props when not in mainnet and showFiatInTestnet is true', () => {
assert.deepEqual(mapStateToProps({ isMainnet: false, showFiatInTestnets: true }), {
- conversionRate: 'mockConversionRate',
- currentCurrency: 'mockCurrentCurrency',
nativeCurrency: 'mockNativeCurrency',
balanceIsCached: 'mockBalanceIsCached',
showFiat: true,
@@ -60,8 +54,6 @@ describe('account-list-item container', () => {
it('should map the correct properties to props when not in mainnet and showFiatInTestnet is false', () => {
assert.deepEqual(mapStateToProps({ isMainnet: false, showFiatInTestnets: false }), {
- conversionRate: 'mockConversionRate',
- currentCurrency: 'mockCurrentCurrency',
nativeCurrency: 'mockNativeCurrency',
balanceIsCached: 'mockBalanceIsCached',
showFiat: false,
diff --git a/ui/app/pages/send/send-content/add-recipient/add-recipient.component.js b/ui/app/pages/send/send-content/add-recipient/add-recipient.component.js
index 40382cdd5..de4e3a89e 100644
--- a/ui/app/pages/send/send-content/add-recipient/add-recipient.component.js
+++ b/ui/app/pages/send/send-content/add-recipient/add-recipient.component.js
@@ -11,7 +11,6 @@ import { ellipsify } from '../../send.utils'
export default class AddRecipient extends Component {
static propTypes = {
- className: PropTypes.string,
query: PropTypes.string,
ownedAccounts: PropTypes.array,
addressBook: PropTypes.array,
@@ -21,9 +20,6 @@ export default class AddRecipient extends Component {
toError: PropTypes.string,
toWarning: PropTypes.string,
ensResolutionError: PropTypes.string,
- selectedToken: PropTypes.object,
- hasHexData: PropTypes.bool,
- tokens: PropTypes.array,
addressBookEntryName: PropTypes.string,
contacts: PropTypes.array,
nonContacts: PropTypes.array,
diff --git a/ui/app/pages/send/send-content/add-recipient/ens-input.component.js b/ui/app/pages/send/send-content/add-recipient/ens-input.component.js
index 4f342d857..15aa3db24 100644
--- a/ui/app/pages/send/send-content/add-recipient/ens-input.component.js
+++ b/ui/app/pages/send/send-content/add-recipient/ens-input.component.js
@@ -26,7 +26,6 @@ export default class EnsInput extends Component {
selectedAddress: PropTypes.string,
selectedName: PropTypes.string,
onChange: PropTypes.func,
- updateSendTo: PropTypes.func,
updateEnsResolution: PropTypes.func,
scanQrCode: PropTypes.func,
updateEnsResolutionError: PropTypes.func,
diff --git a/ui/app/pages/send/send-content/send-amount-row/send-amount-row.component.js b/ui/app/pages/send/send-content/send-amount-row/send-amount-row.component.js
index 495de58b5..1f4b51e7c 100644
--- a/ui/app/pages/send/send-content/send-amount-row/send-amount-row.component.js
+++ b/ui/app/pages/send/send-content/send-amount-row/send-amount-row.component.js
@@ -15,7 +15,6 @@ export default class SendAmountRow extends Component {
]),
balance: PropTypes.string,
conversionRate: PropTypes.number,
- convertedCurrency: PropTypes.string,
gasTotal: PropTypes.string,
inError: PropTypes.bool,
primaryCurrency: PropTypes.string,
diff --git a/ui/app/pages/send/send-content/send-amount-row/send-amount-row.container.js b/ui/app/pages/send/send-content/send-amount-row/send-amount-row.container.js
index 2b3470da4..6f280c2da 100644
--- a/ui/app/pages/send/send-content/send-amount-row/send-amount-row.container.js
+++ b/ui/app/pages/send/send-content/send-amount-row/send-amount-row.container.js
@@ -2,7 +2,6 @@ import { connect } from 'react-redux'
import {
getAmountConversionRate,
getConversionRate,
- getCurrentCurrency,
getGasTotal,
getPrimaryCurrency,
getSelectedToken,
@@ -31,7 +30,6 @@ function mapStateToProps (state) {
amountConversionRate: getAmountConversionRate(state),
balance: getSendFromBalance(state),
conversionRate: getConversionRate(state),
- convertedCurrency: getCurrentCurrency(state),
gasTotal: getGasTotal(state),
inError: sendAmountIsInError(state),
primaryCurrency: getPrimaryCurrency(state),
diff --git a/ui/app/pages/send/send-content/send-amount-row/tests/send-amount-row-container.test.js b/ui/app/pages/send/send-content/send-amount-row/tests/send-amount-row-container.test.js
index dada1c5e9..bceadb914 100644
--- a/ui/app/pages/send/send-content/send-amount-row/tests/send-amount-row-container.test.js
+++ b/ui/app/pages/send/send-content/send-amount-row/tests/send-amount-row-container.test.js
@@ -2,7 +2,6 @@ import assert from 'assert'
import proxyquire from 'proxyquire'
import sinon from 'sinon'
-let mapStateToProps
let mapDispatchToProps
const actionSpies = {
@@ -15,23 +14,11 @@ const duckActionSpies = {
proxyquire('../send-amount-row.container.js', {
'react-redux': {
- connect: (ms, md) => {
- mapStateToProps = ms
+ connect: (_, md) => {
mapDispatchToProps = md
return () => ({})
},
},
- '../../send.selectors': {
- getAmountConversionRate: (s) => `mockAmountConversionRate:${s}`,
- getConversionRate: (s) => `mockConversionRate:${s}`,
- getCurrentCurrency: (s) => `mockConvertedCurrency:${s}`,
- getGasTotal: (s) => `mockGasTotal:${s}`,
- getPrimaryCurrency: (s) => `mockPrimaryCurrency:${s}`,
- getSelectedToken: (s) => `mockSelectedToken:${s}`,
- getSendAmount: (s) => `mockAmount:${s}`,
- getSendFromBalance: (s) => `mockBalance:${s}`,
- getTokenBalance: (s) => `mockTokenBalance:${s}`,
- },
'./send-amount-row.selectors': { sendAmountIsInError: (s) => `mockInError:${s}` },
'../../send.utils': {
getAmountErrorObject: (mockDataObject) => ({ ...mockDataObject, mockChange: true }),
@@ -43,25 +30,6 @@ proxyquire('../send-amount-row.container.js', {
describe('send-amount-row container', () => {
- describe('mapStateToProps()', () => {
-
- it('should map the correct properties to props', () => {
- assert.deepEqual(mapStateToProps('mockState'), {
- amount: 'mockAmount:mockState',
- amountConversionRate: 'mockAmountConversionRate:mockState',
- balance: 'mockBalance:mockState',
- conversionRate: 'mockConversionRate:mockState',
- convertedCurrency: 'mockConvertedCurrency:mockState',
- gasTotal: 'mockGasTotal:mockState',
- inError: 'mockInError:mockState',
- primaryCurrency: 'mockPrimaryCurrency:mockState',
- selectedToken: 'mockSelectedToken:mockState',
- tokenBalance: 'mockTokenBalance:mockState',
- })
- })
-
- })
-
describe('mapDispatchToProps()', () => {
let dispatchSpy
let mapDispatchToPropsObject
diff --git a/ui/app/pages/send/send-content/send-content.component.js b/ui/app/pages/send/send-content/send-content.component.js
index 55e0e30e2..6ae20f19e 100644
--- a/ui/app/pages/send/send-content/send-content.component.js
+++ b/ui/app/pages/send/send-content/send-content.component.js
@@ -15,11 +15,8 @@ export default class SendContent extends Component {
static propTypes = {
updateGas: PropTypes.func,
- scanQrCode: PropTypes.func,
showAddToAddressBookModal: PropTypes.func,
showHexData: PropTypes.bool,
- ownedAccounts: PropTypes.array,
- addressBook: PropTypes.array,
contact: PropTypes.object,
isOwnedAccount: PropTypes.bool,
}
diff --git a/ui/app/pages/send/send-content/send-content.container.js b/ui/app/pages/send/send-content/send-content.container.js
index a122aca1a..8146fc708 100644
--- a/ui/app/pages/send/send-content/send-content.container.js
+++ b/ui/app/pages/send/send-content/send-content.container.js
@@ -29,11 +29,11 @@ function mapDispatchToProps (dispatch) {
}
function mergeProps (stateProps, dispatchProps, ownProps) {
+ const { to, ...restStateProps } = stateProps
return {
...ownProps,
- ...stateProps,
- ...dispatchProps,
- showAddToAddressBookModal: () => dispatchProps.showAddToAddressBookModal(stateProps.to),
+ ...restStateProps,
+ showAddToAddressBookModal: () => dispatchProps.showAddToAddressBookModal(to),
}
}
diff --git a/ui/app/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js b/ui/app/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js
index b69ddba0f..a7a59f999 100644
--- a/ui/app/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js
+++ b/ui/app/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js
@@ -6,9 +6,6 @@ import { PRIMARY, SECONDARY } from '../../../../../helpers/constants/common'
export default class GasFeeDisplay extends Component {
static propTypes = {
- conversionRate: PropTypes.number,
- primaryCurrency: PropTypes.string,
- convertedCurrency: PropTypes.string,
gasLoadingError: PropTypes.bool,
gasTotal: PropTypes.string,
onReset: PropTypes.func,
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 f42f4bf3a..4a7470b38 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
@@ -9,8 +9,6 @@ export default class SendGasRow extends Component {
static propTypes = {
balance: PropTypes.string,
- conversionRate: PropTypes.number,
- convertedCurrency: PropTypes.string,
gasFeeError: PropTypes.bool,
gasLoadingError: PropTypes.bool,
gasTotal: PropTypes.string,
@@ -76,8 +74,6 @@ export default class SendGasRow extends Component {
renderContent () {
const {
- conversionRate,
- convertedCurrency,
gasLoadingError,
gasTotal,
showCustomizeGasModal,
@@ -119,8 +115,6 @@ export default class SendGasRow extends Component {
)
const gasFeeDisplay = (
{
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 10eaa50b8..8d17dd239 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
@@ -1,7 +1,6 @@
import { connect } from 'react-redux'
import {
getConversionRate,
- getCurrentCurrency,
getGasTotal,
getGasPrice,
getGasLimit,
@@ -58,8 +57,6 @@ function mapStateToProps (state) {
return {
balance: getSendFromBalance(state),
- conversionRate,
- convertedCurrency: getCurrentCurrency(state),
gasTotal,
gasFeeError: gasFeeIsInError(state),
gasLoadingError: getGasLoadingError(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 9cbb31e94..f9d559549 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
@@ -60,16 +60,12 @@ describe('SendGasRow Component', function () {
assert(wrapper.find(SendRowWrapper).childAt(0).is(GasFeeDisplay))
})
- it('should render the GasFeeDisplay with the correct props', () => {
+ it('should render the GasFeeDisplay', () => {
const {
- conversionRate,
- convertedCurrency,
gasLoadingError,
gasTotal,
onReset,
} = wrapper.find(SendRowWrapper).childAt(0).props()
- assert.equal(conversionRate, 20)
- assert.equal(convertedCurrency, 'mockConvertedCurrency')
assert.equal(gasLoadingError, false)
assert.equal(gasTotal, 'mockGasTotal')
assert.equal(propsMethodSpies.resetGasButtons.callCount, 0)
diff --git a/ui/app/pages/send/send-content/send-gas-row/tests/send-gas-row-container.test.js b/ui/app/pages/send/send-content/send-gas-row/tests/send-gas-row-container.test.js
index 4acb310f8..128939152 100644
--- a/ui/app/pages/send/send-content/send-gas-row/tests/send-gas-row-container.test.js
+++ b/ui/app/pages/send/send-content/send-gas-row/tests/send-gas-row-container.test.js
@@ -2,7 +2,6 @@ import assert from 'assert'
import proxyquire from 'proxyquire'
import sinon from 'sinon'
-let mapStateToProps
let mapDispatchToProps
let mergeProps
@@ -25,28 +24,12 @@ const gasDuckSpies = {
proxyquire('../send-gas-row.container.js', {
'react-redux': {
- connect: (ms, md, mp) => {
- mapStateToProps = ms
+ connect: (_, md, mp) => {
mapDispatchToProps = md
mergeProps = mp
return () => ({})
},
},
- '../../../../selectors/selectors': {
- getCurrentEthBalance: (s) => `mockCurrentEthBalance:${s}`,
- getAdvancedInlineGasShown: (s) => `mockAdvancedInlineGasShown:${s}`,
- getSelectedToken: () => false,
- },
- '../../send.selectors.js': {
- getConversionRate: (s) => `mockConversionRate:${s}`,
- getCurrentCurrency: (s) => `mockConvertedCurrency:${s}`,
- getGasTotal: (s) => `mockGasTotal:${s}`,
- getGasPrice: (s) => `mockGasPrice:${s}`,
- getGasLimit: (s) => `mockGasLimit:${s}`,
- getSendAmount: (s) => `mockSendAmount:${s}`,
- getSendFromBalance: (s) => `mockBalance:${s}`,
- getTokenBalance: (s) => `mockTokenBalance:${s}`,
- },
'../send-amount-row/amount-max-button/amount-max-button.selectors': {
getMaxModeOn: (s) => `mockMaxModeOn:${s}`,
},
@@ -59,52 +42,13 @@ proxyquire('../send-gas-row.container.js', {
}) => `${amount}:${gasTotal}:${balance}:${conversionRate}`,
calcGasTotal: (gasLimit, gasPrice) => gasLimit + gasPrice,
},
- './send-gas-row.selectors.js': {
- getGasLoadingError: (s) => `mockGasLoadingError:${s}`,
- gasFeeIsInError: (s) => `mockGasFeeError:${s}`,
- getGasButtonGroupShown: (s) => `mockGetGasButtonGroupShown:${s}`,
- },
'../../../../store/actions': actionSpies,
- '../../../../selectors/custom-gas': {
- getBasicGasEstimateLoadingStatus: (s) => `mockBasicGasEstimateLoadingStatus:${s}`,
- getRenderableEstimateDataForSmallButtonsFromGWEI: (s) => `mockGasButtonInfo:${s}`,
- getDefaultActiveButtonIndex: (gasButtonInfo, gasPrice) => gasButtonInfo.length + gasPrice.length,
- },
'../../../../ducks/send/send.duck': sendDuckSpies,
'../../../../ducks/gas/gas.duck': gasDuckSpies,
})
describe('send-gas-row container', () => {
- describe('mapStateToProps()', () => {
-
- it('should map the correct properties to props', () => {
- assert.deepEqual(mapStateToProps('mockState'), {
- balance: 'mockBalance:mockState',
- conversionRate: 'mockConversionRate:mockState',
- convertedCurrency: 'mockConvertedCurrency:mockState',
- gasTotal: 'mockGasTotal:mockState',
- gasFeeError: 'mockGasFeeError:mockState',
- gasLoadingError: 'mockGasLoadingError:mockState',
- gasPriceButtonGroupProps: {
- buttonDataLoading: `mockBasicGasEstimateLoadingStatus:mockState`,
- defaultActiveButtonIndex: 1,
- newActiveButtonIndex: 49,
- gasButtonInfo: `mockGasButtonInfo:mockState`,
- },
- gasButtonGroupShown: `mockGetGasButtonGroupShown:mockState`,
- advancedInlineGasShown: 'mockAdvancedInlineGasShown:mockState',
- gasLimit: 'mockGasLimit:mockState',
- gasPrice: 'mockGasPrice:mockState',
- insufficientBalance: false,
- maxModeOn: 'mockMaxModeOn:mockState',
- selectedToken: false,
- tokenBalance: 'mockTokenBalance:mockState',
- })
- })
-
- })
-
describe('mapDispatchToProps()', () => {
let dispatchSpy
let mapDispatchToPropsObject
diff --git a/ui/app/pages/send/send-content/send-hex-data-row/send-hex-data-row.component.js b/ui/app/pages/send/send-content/send-hex-data-row/send-hex-data-row.component.js
index ce9bd3a22..418c81092 100644
--- a/ui/app/pages/send/send-content/send-hex-data-row/send-hex-data-row.component.js
+++ b/ui/app/pages/send/send-content/send-hex-data-row/send-hex-data-row.component.js
@@ -4,7 +4,6 @@ import SendRowWrapper from '../send-row-wrapper'
export default class SendHexDataRow extends Component {
static propTypes = {
- data: PropTypes.string,
inError: PropTypes.bool,
updateSendHexData: PropTypes.func.isRequired,
updateGas: PropTypes.func.isRequired,
diff --git a/ui/app/pages/send/send-footer/send-footer.component.js b/ui/app/pages/send/send-footer/send-footer.component.js
index 73a3d3256..679a51848 100644
--- a/ui/app/pages/send/send-footer/send-footer.component.js
+++ b/ui/app/pages/send/send-footer/send-footer.component.js
@@ -10,9 +10,7 @@ export default class SendFooter extends Component {
amount: PropTypes.string,
data: PropTypes.string,
clearSend: PropTypes.func,
- disabled: PropTypes.bool,
editingTransactionId: PropTypes.string,
- errors: PropTypes.object,
from: PropTypes.object,
gasLimit: PropTypes.string,
gasPrice: PropTypes.string,
diff --git a/ui/app/pages/send/send.component.js b/ui/app/pages/send/send.component.js
index 1b2ef82ba..51b3483a2 100644
--- a/ui/app/pages/send/send.component.js
+++ b/ui/app/pages/send/send.component.js
@@ -324,13 +324,11 @@ export default class SendTransactionScreen extends PersistentForm {
}
renderAddRecipient () {
- const { scanQrCode } = this.props
const { toError, toWarning } = this.state
return (
this.updateGas({ to, amount, data })}
- scanQrCode={scanQrCode}
query={this.state.query}
toError={toError}
toWarning={toWarning}
@@ -339,13 +337,12 @@ export default class SendTransactionScreen extends PersistentForm {
}
renderSendContent () {
- const { history, showHexData, scanQrCode } = this.props
+ const { history, showHexData } = this.props
return [
this.updateGas({ to, amount, data })}
- scanQrCode={scanQrCode}
showHexData={showHexData}
/>,
,
diff --git a/ui/app/pages/send/send.container.js b/ui/app/pages/send/send.container.js
index f1bd7f59f..4e991baa6 100644
--- a/ui/app/pages/send/send.container.js
+++ b/ui/app/pages/send/send.container.js
@@ -18,7 +18,6 @@ import {
getRecentBlocks,
getSelectedToken,
getSelectedTokenContract,
- getSelectedTokenToFiatRate,
getSendAmount,
getSendEditingTransactionId,
getSendHexDataFeatureFlagState,
@@ -88,7 +87,6 @@ function mapStateToProps (state) {
tokens: getTokens(state),
tokenBalance: getTokenBalance(state),
tokenContract: getSelectedTokenContract(state),
- tokenToFiatRate: getSelectedTokenToFiatRate(state),
}
}
diff --git a/ui/app/pages/send/tests/send-container.test.js b/ui/app/pages/send/tests/send-container.test.js
index 5afec0148..48221493b 100644
--- a/ui/app/pages/send/tests/send-container.test.js
+++ b/ui/app/pages/send/tests/send-container.test.js
@@ -2,7 +2,6 @@ import assert from 'assert'
import proxyquire from 'proxyquire'
import sinon from 'sinon'
-let mapStateToProps
let mapDispatchToProps
const actionSpies = {
@@ -17,45 +16,13 @@ const duckActionSpies = {
proxyquire('../send.container.js', {
'react-redux': {
- connect: (ms, md) => {
- mapStateToProps = ms
+ connect: (_, md) => {
mapDispatchToProps = md
return () => ({})
},
},
'react-router-dom': { withRouter: () => {} },
'recompose': { compose: (_, arg2) => () => arg2() },
- './send.selectors': {
- getAmountConversionRate: (s) => `mockAmountConversionRate:${s}`,
- getBlockGasLimit: (s) => `mockBlockGasLimit:${s}`,
- getConversionRate: (s) => `mockConversionRate:${s}`,
- getCurrentNetwork: (s) => `mockNetwork:${s}`,
- getGasLimit: (s) => `mockGasLimit:${s}`,
- getGasPrice: (s) => `mockGasPrice:${s}`,
- getGasTotal: (s) => `mockGasTotal:${s}`,
- getPrimaryCurrency: (s) => `mockPrimaryCurrency:${s}`,
- getRecentBlocks: (s) => `mockRecentBlocks:${s}`,
- getSelectedToken: (s) => `mockSelectedToken:${s}`,
- getSelectedTokenContract: (s) => `mockTokenContract:${s}`,
- getSelectedTokenToFiatRate: (s) => `mockTokenToFiatRate:${s}`,
- getSendHexDataFeatureFlagState: (s) => `mockSendHexDataFeatureFlagState:${s}`,
- getSendAmount: (s) => `mockAmount:${s}`,
- getSendTo: (s) => `mockTo:${s}`,
- getSendToNickname: (s) => `mockToNickname:${s}`,
- getSendEditingTransactionId: (s) => `mockEditingTransactionId:${s}`,
- getSendFromObject: (s) => `mockFrom:${s}`,
- getTokenBalance: (s) => `mockTokenBalance:${s}`,
- getQrCodeData: (s) => `mockQrCodeData:${s}`,
- getSendEnsResolution: (s) => `mockSendEnsResolution:${s}`,
- getSendEnsResolutionError: (s) => `mockSendEnsResolutionError:${s}`,
- },
- './send-content/add-recipient/add-recipient.selectors': {
- getTokens: s => `mockTokens:${s}`,
- },
- '../../selectors/selectors': {
- getAddressBook: (s) => `mockAddressBook:${s}`,
- getSelectedAddress: (s) => `mockSelectedAddress:${s}`,
- },
'../../store/actions': actionSpies,
'../../ducks/send/send.duck': duckActionSpies,
'./send.utils.js': {
@@ -66,40 +33,6 @@ proxyquire('../send.container.js', {
describe('send container', () => {
- describe('mapStateToProps()', () => {
-
- it('should map the correct properties to props', () => {
- assert.deepEqual(mapStateToProps('mockState'), {
- amount: 'mockAmount:mockState',
- amountConversionRate: 'mockAmountConversionRate:mockState',
- blockGasLimit: 'mockBlockGasLimit:mockState',
- conversionRate: 'mockConversionRate:mockState',
- editingTransactionId: 'mockEditingTransactionId:mockState',
- from: 'mockFrom:mockState',
- gasLimit: 'mockGasLimit:mockState',
- gasPrice: 'mockGasPrice:mockState',
- gasTotal: 'mockGasTotal:mockState',
- network: 'mockNetwork:mockState',
- primaryCurrency: 'mockPrimaryCurrency:mockState',
- recentBlocks: 'mockRecentBlocks:mockState',
- selectedAddress: 'mockSelectedAddress:mockState',
- selectedToken: 'mockSelectedToken:mockState',
- showHexData: 'mockSendHexDataFeatureFlagState:mockState',
- to: 'mockTo:mockState',
- tokenBalance: 'mockTokenBalance:mockState',
- tokenContract: 'mockTokenContract:mockState',
- tokenToFiatRate: 'mockTokenToFiatRate:mockState',
- qrCodeData: 'mockQrCodeData:mockState',
- tokens: 'mockTokens:mockState',
- ensResolution: 'mockSendEnsResolution:mockState',
- ensResolutionError: 'mockSendEnsResolutionError:mockState',
- toNickname: 'mockToNickname:mockState',
- addressBook: 'mockAddressBook:mockState',
- })
- })
-
- })
-
describe('mapDispatchToProps()', () => {
let dispatchSpy
let mapDispatchToPropsObject
diff --git a/ui/app/pages/settings/advanced-tab/advanced-tab.component.js b/ui/app/pages/settings/advanced-tab/advanced-tab.component.js
index 5df85c027..1f45d9a0d 100644
--- a/ui/app/pages/settings/advanced-tab/advanced-tab.component.js
+++ b/ui/app/pages/settings/advanced-tab/advanced-tab.component.js
@@ -17,7 +17,6 @@ export default class AdvancedTab extends PureComponent {
setUseNonceField: PropTypes.func,
useNonceField: PropTypes.bool,
setHexDataFeatureFlag: PropTypes.func,
- setRpcTarget: PropTypes.func,
displayWarning: PropTypes.func,
showResetAccountConfirmationModal: PropTypes.func,
warning: PropTypes.string,
diff --git a/ui/app/pages/settings/advanced-tab/advanced-tab.container.js b/ui/app/pages/settings/advanced-tab/advanced-tab.container.js
index 876b1fd40..46299916c 100644
--- a/ui/app/pages/settings/advanced-tab/advanced-tab.container.js
+++ b/ui/app/pages/settings/advanced-tab/advanced-tab.container.js
@@ -3,7 +3,6 @@ import { compose } from 'recompose'
import { connect } from 'react-redux'
import { withRouter } from 'react-router-dom'
import {
- updateAndSetCustomRpc,
displayWarning,
setFeatureFlag,
showModal,
@@ -43,7 +42,6 @@ export const mapStateToProps = state => {
export const mapDispatchToProps = dispatch => {
return {
setHexDataFeatureFlag: shouldShow => dispatch(setFeatureFlag('sendHexData', shouldShow)),
- setRpcTarget: (newRpc, chainId, ticker, nickname) => dispatch(updateAndSetCustomRpc(newRpc, chainId, ticker, nickname)),
displayWarning: warning => dispatch(displayWarning(warning)),
showResetAccountConfirmationModal: () => dispatch(showModal({ name: 'CONFIRM_RESET_ACCOUNT' })),
setAdvancedInlineGasFeatureFlag: shouldShow => dispatch(setFeatureFlag('advancedInlineGas', shouldShow)),
diff --git a/ui/app/pages/settings/advanced-tab/tests/advanced-tab-container.test.js b/ui/app/pages/settings/advanced-tab/tests/advanced-tab-container.test.js
deleted file mode 100644
index 7f5223315..000000000
--- a/ui/app/pages/settings/advanced-tab/tests/advanced-tab-container.test.js
+++ /dev/null
@@ -1,53 +0,0 @@
-import assert from 'assert'
-import { mapStateToProps, mapDispatchToProps } from '../advanced-tab.container'
-
-const defaultState = {
- appState: {
- warning: null,
- },
- metamask: {
- featureFlags: {
- sendHexData: false,
- advancedInlineGas: false,
- },
- preferences: {
- autoLogoutTimeLimit: 0,
- showFiatInTestnets: false,
- useNativeCurrencyAsPrimaryCurrency: true,
- },
- threeBoxSyncingAllowed: false,
- threeBoxDisabled: false,
- useNonceField: false,
- },
-}
-
-describe('AdvancedTab Container', () => {
- it('should map state to props correctly', () => {
- const props = mapStateToProps(defaultState)
- const expected = {
- warning: null,
- sendHexData: false,
- advancedInlineGas: false,
- showFiatInTestnets: false,
- autoLogoutTimeLimit: 0,
- threeBoxSyncingAllowed: false,
- threeBoxDisabled: false,
- useNonceField: false,
- }
-
- assert.deepEqual(props, expected)
- })
-
- it('should map dispatch to props correctly', () => {
- const props = mapDispatchToProps(() => 'mockDispatch')
-
- assert.ok(typeof props.setHexDataFeatureFlag === 'function')
- assert.ok(typeof props.setRpcTarget === 'function')
- assert.ok(typeof props.displayWarning === 'function')
- assert.ok(typeof props.showResetAccountConfirmationModal === 'function')
- assert.ok(typeof props.setAdvancedInlineGasFeatureFlag === 'function')
- assert.ok(typeof props.setShowFiatConversionOnTestnetsPreference === 'function')
- assert.ok(typeof props.setAutoLogoutTimeLimit === 'function')
- assert.ok(typeof props.setUseNonceField === 'function')
- })
-})
diff --git a/ui/app/pages/settings/contact-list-tab/add-contact/add-contact.component.js b/ui/app/pages/settings/contact-list-tab/add-contact/add-contact.component.js
index af2204043..aee6fbe73 100644
--- a/ui/app/pages/settings/contact-list-tab/add-contact/add-contact.component.js
+++ b/ui/app/pages/settings/contact-list-tab/add-contact/add-contact.component.js
@@ -18,7 +18,7 @@ export default class AddContact extends PureComponent {
addToAddressBook: PropTypes.func,
history: PropTypes.object,
scanQrCode: PropTypes.func,
- qrCodeData: PropTypes.object,
+ qrCodeData: PropTypes.object, /* eslint-disable-line react/no-unused-prop-types */
qrCodeDetected: PropTypes.func,
}
diff --git a/ui/app/pages/settings/contact-list-tab/view-contact/view-contact.component.js b/ui/app/pages/settings/contact-list-tab/view-contact/view-contact.component.js
index d4fe045eb..fbc071504 100644
--- a/ui/app/pages/settings/contact-list-tab/view-contact/view-contact.component.js
+++ b/ui/app/pages/settings/contact-list-tab/view-contact/view-contact.component.js
@@ -16,7 +16,6 @@ export default class ViewContact extends PureComponent {
}
static propTypes = {
- removeFromAddressBook: PropTypes.func,
name: PropTypes.string,
address: PropTypes.string,
history: PropTypes.object,
diff --git a/ui/app/pages/settings/contact-list-tab/view-contact/view-contact.container.js b/ui/app/pages/settings/contact-list-tab/view-contact/view-contact.container.js
index b1196d936..871ab1dc6 100644
--- a/ui/app/pages/settings/contact-list-tab/view-contact/view-contact.container.js
+++ b/ui/app/pages/settings/contact-list-tab/view-contact/view-contact.container.js
@@ -3,7 +3,6 @@ import { compose } from 'recompose'
import { connect } from 'react-redux'
import { withRouter } from 'react-router-dom'
import { getAddressBookEntry } from '../../../../selectors/selectors'
-import { removeFromAddressBook } from '../../../../store/actions'
import { checksumAddress } from '../../../../helpers/utils/util'
import {
CONTACT_EDIT_ROUTE,
@@ -31,13 +30,7 @@ const mapStateToProps = (state, ownProps) => {
}
}
-const mapDispatchToProps = dispatch => {
- return {
- removeFromAddressBook: (addressToRemove) => dispatch(removeFromAddressBook(addressToRemove)),
- }
-}
-
export default compose(
withRouter,
- connect(mapStateToProps, mapDispatchToProps)
+ connect(mapStateToProps)
)(ViewContact)
diff --git a/ui/app/pages/settings/info-tab/info-tab.component.js b/ui/app/pages/settings/info-tab/info-tab.component.js
index 552dd156e..8a7c31d07 100644
--- a/ui/app/pages/settings/info-tab/info-tab.component.js
+++ b/ui/app/pages/settings/info-tab/info-tab.component.js
@@ -6,18 +6,6 @@ export default class InfoTab extends PureComponent {
version: global.platform.getVersion(),
}
- static propTypes = {
- tab: PropTypes.string,
- metamask: PropTypes.object,
- setCurrentCurrency: PropTypes.func,
- setRpcTarget: PropTypes.func,
- displayWarning: PropTypes.func,
- revealSeedConfirmation: PropTypes.func,
- warning: PropTypes.string,
- location: PropTypes.object,
- history: PropTypes.object,
- }
-
static contextTypes = {
t: PropTypes.func,
}
diff --git a/ui/app/pages/settings/security-tab/security-tab.component.js b/ui/app/pages/settings/security-tab/security-tab.component.js
index 117010d0f..0adc463bb 100644
--- a/ui/app/pages/settings/security-tab/security-tab.component.js
+++ b/ui/app/pages/settings/security-tab/security-tab.component.js
@@ -11,11 +11,8 @@ export default class SecurityTab extends PureComponent {
}
static propTypes = {
- displayWarning: PropTypes.func,
- revealSeedConfirmation: PropTypes.func,
warning: PropTypes.string,
history: PropTypes.object,
- mobileSync: PropTypes.bool,
participateInMetaMetrics: PropTypes.bool,
setParticipateInMetaMetrics: PropTypes.func,
showIncomingTransactions: PropTypes.bool,
diff --git a/ui/app/pages/settings/security-tab/security-tab.container.js b/ui/app/pages/settings/security-tab/security-tab.container.js
index 35375ebf5..0cc4b188d 100644
--- a/ui/app/pages/settings/security-tab/security-tab.container.js
+++ b/ui/app/pages/settings/security-tab/security-tab.container.js
@@ -3,8 +3,6 @@ import { compose } from 'recompose'
import { connect } from 'react-redux'
import { withRouter } from 'react-router-dom'
import {
- displayWarning,
- revealSeedConfirmation,
setFeatureFlag,
setParticipateInMetaMetrics,
} from '../../../store/actions'
@@ -27,8 +25,6 @@ const mapStateToProps = state => {
const mapDispatchToProps = dispatch => {
return {
- displayWarning: warning => dispatch(displayWarning(warning)),
- revealSeedConfirmation: () => dispatch(revealSeedConfirmation()),
setParticipateInMetaMetrics: (val) => dispatch(setParticipateInMetaMetrics(val)),
setShowIncomingTransactionsFeatureFlag: shouldShow => dispatch(setFeatureFlag('showIncomingTransactions', shouldShow)),
}
diff --git a/ui/app/pages/settings/settings-tab/settings-tab.component.js b/ui/app/pages/settings/settings-tab/settings-tab.component.js
index f8daa98f9..d344e7dba 100644
--- a/ui/app/pages/settings/settings-tab/settings-tab.component.js
+++ b/ui/app/pages/settings/settings-tab/settings-tab.component.js
@@ -34,9 +34,7 @@ export default class SettingsTab extends PureComponent {
static propTypes = {
setUseBlockie: PropTypes.func,
setCurrentCurrency: PropTypes.func,
- displayWarning: PropTypes.func,
warning: PropTypes.string,
- history: PropTypes.object,
updateCurrentLocale: PropTypes.func,
currentLocale: PropTypes.string,
useBlockie: PropTypes.bool,
diff --git a/ui/app/pages/settings/settings-tab/settings-tab.container.js b/ui/app/pages/settings/settings-tab/settings-tab.container.js
index d3d8457f0..96fad9ffc 100644
--- a/ui/app/pages/settings/settings-tab/settings-tab.container.js
+++ b/ui/app/pages/settings/settings-tab/settings-tab.container.js
@@ -1,10 +1,8 @@
import SettingsTab from './settings-tab.component'
import { compose } from 'recompose'
import { connect } from 'react-redux'
-import { withRouter } from 'react-router-dom'
import {
setCurrentCurrency,
- displayWarning,
setUseBlockie,
updateCurrentLocale,
setUseNativeCurrencyAsPrimaryCurrencyPreference,
@@ -37,7 +35,6 @@ const mapStateToProps = state => {
const mapDispatchToProps = dispatch => {
return {
setCurrentCurrency: currency => dispatch(setCurrentCurrency(currency)),
- displayWarning: warning => dispatch(displayWarning(warning)),
setUseBlockie: value => dispatch(setUseBlockie(value)),
updateCurrentLocale: key => dispatch(updateCurrentLocale(key)),
setUseNativeCurrencyAsPrimaryCurrencyPreference: value => {
@@ -48,6 +45,5 @@ const mapDispatchToProps = dispatch => {
}
export default compose(
- withRouter,
connect(mapStateToProps, mapDispatchToProps)
)(SettingsTab)
diff --git a/ui/app/pages/settings/settings.component.js b/ui/app/pages/settings/settings.component.js
index 12d395f31..f52b5fded 100644
--- a/ui/app/pages/settings/settings.component.js
+++ b/ui/app/pages/settings/settings.component.js
@@ -34,12 +34,10 @@ class SettingsPage extends PureComponent {
history: PropTypes.object,
isAddressEntryPage: PropTypes.bool,
isPopupView: PropTypes.bool,
- location: PropTypes.object,
pathnameI18nKey: PropTypes.string,
initialBreadCrumbRoute: PropTypes.string,
breadCrumbTextKey: PropTypes.string,
initialBreadCrumbKey: PropTypes.string,
- t: PropTypes.func,
}
static contextTypes = {