From 2ddc2cc1fbe5249f70d80e2a74146cb87dcc8421 Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 19 Mar 2018 16:53:06 -0230 Subject: Lint fixes. --- ui/app/accounts/import/index.js | 1 + ui/app/accounts/import/json.js | 1 + ui/app/accounts/new-account/create-form.js | 1 + ui/app/actions.js | 1 - ui/app/components/account-dropdowns.js | 2 ++ ui/app/components/dropdowns/components/account-dropdowns.js | 1 + ui/app/components/modals/new-account-modal.js | 1 + ui/app/components/modals/notification-modal.js | 1 + ui/app/components/network.js | 2 -- ui/app/components/pending-tx/confirm-deploy-contract.js | 3 ++- ui/app/components/pending-tx/confirm-send-token.js | 3 ++- ui/app/components/sender-to-recipient.js | 6 +++++- ui/app/reducers/locale.js | 3 --- ui/app/settings.js | 2 ++ ui/i18n-helper.js | 1 - 15 files changed, 19 insertions(+), 10 deletions(-) (limited to 'ui') diff --git a/ui/app/accounts/import/index.js b/ui/app/accounts/import/index.js index ab5344dc6..98924b6d9 100644 --- a/ui/app/accounts/import/index.js +++ b/ui/app/accounts/import/index.js @@ -2,6 +2,7 @@ const inherits = require('util').inherits const Component = require('react').Component const h = require('react-hyperscript') const connect = require('../../metamask-connect') +const t = require('../../../i18n-helper').getMessage import Select from 'react-select' // Subviews diff --git a/ui/app/accounts/import/json.js b/ui/app/accounts/import/json.js index b3f412e98..f638e07c5 100644 --- a/ui/app/accounts/import/json.js +++ b/ui/app/accounts/import/json.js @@ -113,6 +113,7 @@ JsonImportSubview.propTypes = { goHome: PropTypes.func, displayWarning: PropTypes.func, importNewJsonAccount: PropTypes.func, + localeMessages: PropTypes.object, } const mapStateToProps = state => { diff --git a/ui/app/accounts/new-account/create-form.js b/ui/app/accounts/new-account/create-form.js index 38cffec64..6eed0215c 100644 --- a/ui/app/accounts/new-account/create-form.js +++ b/ui/app/accounts/new-account/create-form.js @@ -62,6 +62,7 @@ NewAccountCreateForm.propTypes = { createAccount: PropTypes.func, goHome: PropTypes.func, numberOfExistingAccounts: PropTypes.number, + localeMessages: PropTypes.object, } const mapStateToProps = state => { diff --git a/ui/app/actions.js b/ui/app/actions.js index 4749d0735..12cf10411 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -1802,7 +1802,6 @@ function updateCurrentLocale (key) { return (dispatch) => { dispatch(actions.showLoadingIndication()) log.debug(`background.updateCurrentLocale`) - console.log(`fetchLocale`, fetchLocale); fetchLocale(key) .then((localeMessages) => { background.setCurrentLocale(key, (err) => { diff --git a/ui/app/components/account-dropdowns.js b/ui/app/components/account-dropdowns.js index 1f870a27c..f725e7d86 100644 --- a/ui/app/components/account-dropdowns.js +++ b/ui/app/components/account-dropdowns.js @@ -9,6 +9,7 @@ const DropdownMenuItem = require('./dropdown').DropdownMenuItem const Identicon = require('./identicon') const ethUtil = require('ethereumjs-util') const copyToClipboard = require('copy-to-clipboard') +const t = require('../../i18n-helper').getMessage class AccountDropdowns extends Component { constructor (props) { @@ -300,6 +301,7 @@ AccountDropdowns.propTypes = { style: PropTypes.object, enableAccountOptions: PropTypes.bool, enableAccountsSelector: PropTypes.bool, + localeMessages: PropTypes.object, } const mapDispatchToProps = (dispatch) => { diff --git a/ui/app/components/dropdowns/components/account-dropdowns.js b/ui/app/components/dropdowns/components/account-dropdowns.js index 73afb7009..6de4d8280 100644 --- a/ui/app/components/dropdowns/components/account-dropdowns.js +++ b/ui/app/components/dropdowns/components/account-dropdowns.js @@ -426,6 +426,7 @@ AccountDropdowns.propTypes = { enableAccountsSelector: PropTypes.bool, enableAccountOption: PropTypes.bool, enableAccountOptions: PropTypes.bool, + localeMessages: PropTypes.object, } const mapDispatchToProps = (dispatch) => { diff --git a/ui/app/components/modals/new-account-modal.js b/ui/app/components/modals/new-account-modal.js index 2744af0b3..23613ec9c 100644 --- a/ui/app/components/modals/new-account-modal.js +++ b/ui/app/components/modals/new-account-modal.js @@ -70,6 +70,7 @@ NewAccountModal.propTypes = { showImportPage: PropTypes.func, createAccount: PropTypes.func, numberOfExistingAccounts: PropTypes.number, + localeMessages: PropTypes.object, } const mapStateToProps = state => { diff --git a/ui/app/components/modals/notification-modal.js b/ui/app/components/modals/notification-modal.js index ba2c92c92..3898f1c44 100644 --- a/ui/app/components/modals/notification-modal.js +++ b/ui/app/components/modals/notification-modal.js @@ -63,6 +63,7 @@ NotificationModal.propTypes = { showCancelButton: PropTypes.bool, showConfirmButton: PropTypes.bool, onConfirm: PropTypes.func, + localeMessages: PropTypes.object, } const mapDispatchToProps = dispatch => { diff --git a/ui/app/components/network.js b/ui/app/components/network.js index 25003fd16..55bc14c3c 100644 --- a/ui/app/components/network.js +++ b/ui/app/components/network.js @@ -79,8 +79,6 @@ Network.prototype.render = function () { }, }, [ (function () { - console.log(`12312312312312312 props.localeMessages`, props.localeMessages); - console.log(`12312312312312312 t(props.localeMessages, 'mainnet')`, t(props.localeMessages, 'mainnet')); switch (iconName) { case 'ethereum-network': return h('.network-indicator', [ diff --git a/ui/app/components/pending-tx/confirm-deploy-contract.js b/ui/app/components/pending-tx/confirm-deploy-contract.js index bc93ad2f7..8e04fb84d 100644 --- a/ui/app/components/pending-tx/confirm-deploy-contract.js +++ b/ui/app/components/pending-tx/confirm-deploy-contract.js @@ -321,6 +321,7 @@ ConfirmDeployContract.propTypes = { conversionRate: PropTypes.number, currentCurrency: PropTypes.string, selectedAddress: PropTypes.string, + localeMessages: PropTypes.object, } const mapStateToProps = state => { @@ -347,4 +348,4 @@ const mapDispatchToProps = dispatch => { } } -module.exports = connect(mapStateToProps, mapDispatchToProps)(ConfirmDeployContract) \ No newline at end of file +module.exports = connect(mapStateToProps, mapDispatchToProps)(ConfirmDeployContract) diff --git a/ui/app/components/pending-tx/confirm-send-token.js b/ui/app/components/pending-tx/confirm-send-token.js index 238223321..4cd6f020b 100644 --- a/ui/app/components/pending-tx/confirm-send-token.js +++ b/ui/app/components/pending-tx/confirm-send-token.js @@ -378,7 +378,8 @@ ConfirmSendToken.prototype.render = function () { this.renderTotalPlusGas(), - ]) + ]), + ]), h('form#pending-tx-form', { diff --git a/ui/app/components/sender-to-recipient.js b/ui/app/components/sender-to-recipient.js index 530c4abae..02b6d96ea 100644 --- a/ui/app/components/sender-to-recipient.js +++ b/ui/app/components/sender-to-recipient.js @@ -1,5 +1,6 @@ const { Component } = require('react') const h = require('react-hyperscript') +const connect = require('../metamask-connect') const PropTypes = require('prop-types') const t = require('../../i18n-helper').getMessage const Identicon = require('./identicon') @@ -40,6 +41,9 @@ class SenderToRecipient extends Component { SenderToRecipient.propTypes = { senderName: PropTypes.string, senderAddress: PropTypes.string, + localeMessages: PropTypes.object, } -module.exports = SenderToRecipient +module.exports = { + AccountDropdowns: connect()(SenderToRecipient), +} \ No newline at end of file diff --git a/ui/app/reducers/locale.js b/ui/app/reducers/locale.js index d8b78e1dd..edfe9e865 100644 --- a/ui/app/reducers/locale.js +++ b/ui/app/reducers/locale.js @@ -1,8 +1,5 @@ const extend = require('xtend') const actions = require('../actions') -const MetamascaraPlatform = require('../../../app/scripts/platforms/window') -const environmentType = require('../../../app/scripts/lib/environment-type') -const { OLD_UI_NETWORK_TYPE } = require('../../../app/scripts/config').enums module.exports = reduceMetamask diff --git a/ui/app/settings.js b/ui/app/settings.js index 2280b189b..1412606e5 100644 --- a/ui/app/settings.js +++ b/ui/app/settings.js @@ -457,6 +457,8 @@ Settings.propTypes = { warning: PropTypes.string, goHome: PropTypes.func, isMascara: PropTypes.bool, + updateCurrentLocale: PropTypes.func, + currentLocale: PropTypes.object, } const mapStateToProps = state => { diff --git a/ui/i18n-helper.js b/ui/i18n-helper.js index 345e83f00..10147b0f6 100644 --- a/ui/i18n-helper.js +++ b/ui/i18n-helper.js @@ -1,5 +1,4 @@ // cross-browser connection to extension i18n API -const extension = require('extensionizer') const log = require('loglevel') const getMessage = (locale, key, substitutions) => { -- cgit v1.2.3