Skip to content

Commit

Permalink
Lint, test and translation fixes for metametrics.
Browse files Browse the repository at this point in the history
  • Loading branch information
danjm committed Feb 14, 2019
1 parent f100aba commit 3d5aeae
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
6 changes: 6 additions & 0 deletions app/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,12 @@
"originalTotal": {
"message": "Original Total"
},
"participateInMetaMetrics": {
"message": "Participate in MetaMetrics"
},
"participateInMetaMetricsDesciption": {
"message": "Participate in MetaMetrics to help us make MetaMask better"
},
"password": {
"message": "Password"
},
Expand Down
1 change: 0 additions & 1 deletion ui/app/components/modals/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import ConfirmResetAccount from './confirm-reset-account'
import TransactionConfirmed from './transaction-confirmed'
import CancelTransaction from './cancel-transaction'

import WelcomeBeta from './welcome-beta'
import MetaMetricsOptIn from './metametrics-opt-in'
import RejectTransactions from './reject-transactions'
import ClearApprovedOrigins from './clear-approved-origins'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -571,9 +571,9 @@ export default class SettingsTab extends PureComponent {
return (
<div className="settings-page__content-row">
<div className="settings-page__content-item">
<span>{ 'Participate in MetaMetrics' }</span>
<span>{ t('participateInMetaMetrics') }</span>
<div className="settings-page__content-description">
{ 'Participate in MetaMetrics to help us make MetaMask better' }
{ t('participateInMetaMetricsDescription') }
</div>
</div>
<div className="settings-page__content-item">
Expand Down Expand Up @@ -608,7 +608,7 @@ export default class SettingsTab extends PureComponent {
{ this.renderHexDataOptIn() }
{ this.renderAdvancedGasInputInline() }
{ this.renderBlockieOptIn() }
{ this.renderMetaMetricsOptIn () }
{ this.renderMetaMetricsOptIn() }
</div>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
setFeatureFlag,
showModal,
setUseNativeCurrencyAsPrimaryCurrencyPreference,
setParticipateInMetaMetrics,
} from '../../../../actions'
import { preferencesSelector } from '../../../../selectors'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export default class SendGasRow extends Component {
};

renderAdvancedOptionsButton () {
const { metricsEvent } = this.context
const { showCustomizeGasModal } = this.props
return <div className="advanced-gas-options-btn" onClick={() => {
metricsEvent({
Expand Down Expand Up @@ -67,7 +68,6 @@ export default class SendGasRow extends Component {
gasLimit,
insufficientBalance,
} = this.props
const { metricsEvent } = this.context

const gasPriceButtonGroup = <div>
<GasPriceButtonGroup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('SendGasRow Component', function () {
someGasPriceButtonGroupProp: 'foo',
anotherGasPriceButtonGroupProp: 'bar',
}}
/>, { context: { t: str => str + '_t' } })
/>, { context: { t: str => str + '_t', metricsEvent: () => ({}) } })
})

afterEach(() => {
Expand Down

0 comments on commit 3d5aeae

Please sign in to comment.