1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00

Lint fixes

This commit is contained in:
Dan 2018-03-21 23:48:10 -02:30
parent 18f8583529
commit a82631791e
14 changed files with 18 additions and 18 deletions

View File

@ -17,14 +17,13 @@ function AccountImportSubview () {
}
AccountImportSubview.prototype.getMenuItemTexts = function () {
return [
return [
this.props.t('privateKey'),
this.props.t('jsonFile'),
]
}
AccountImportSubview.prototype.render = function () {
const props = this.props
const state = this.state || {}
const menuItems = this.getMenuItemTexts()
const { type } = state
@ -75,7 +74,6 @@ AccountImportSubview.prototype.render = function () {
}
AccountImportSubview.prototype.renderImportView = function () {
const props = this.props
const state = this.state || {}
const { type } = state
const menuItems = this.getMenuItemTexts()

View File

@ -112,7 +112,7 @@ JsonImportSubview.propTypes = {
goHome: PropTypes.func,
displayWarning: PropTypes.func,
importNewJsonAccount: PropTypes.func,
localeMessages: PropTypes.object,
t: PropTypes.func,
}
const mapStateToProps = state => {

View File

@ -61,7 +61,7 @@ NewAccountCreateForm.propTypes = {
createAccount: PropTypes.func,
goHome: PropTypes.func,
numberOfExistingAccounts: PropTypes.number,
localeMessages: PropTypes.object,
t: PropTypes.object,
}
const mapStateToProps = state => {

View File

@ -300,7 +300,7 @@ AccountDropdowns.propTypes = {
style: PropTypes.object,
enableAccountOptions: PropTypes.bool,
enableAccountsSelector: PropTypes.bool,
localeMessages: PropTypes.object,
t: PropTypes.func,
}
const mapDispatchToProps = (dispatch) => {

View File

@ -143,7 +143,7 @@ BuyButtonSubview.prototype.primarySubview = function () {
case '4':
case '42':
const networkName = networkNames[network]
const label = `${networkName} ${t('testFaucet')}`
const label = `${networkName} ${this.props.t('testFaucet')}`
return (
h('div.flex-column', {
style: {
@ -203,7 +203,7 @@ BuyButtonSubview.prototype.mainnetSubview = function () {
'ShapeShift',
],
subtext: {
'Coinbase': `${t('crypto')}/${t('fiat')} (${t('usaOnly')})`,
'Coinbase': `${this.props.t('crypto')}/${this.props.t('fiat')} (${this.props.t('usaOnly')})`,
'ShapeShift': this.props.t('crypto'),
},
onClick: this.radioHandler.bind(this),

View File

@ -425,7 +425,7 @@ AccountDropdowns.propTypes = {
enableAccountsSelector: PropTypes.bool,
enableAccountOption: PropTypes.bool,
enableAccountOptions: PropTypes.bool,
localeMessages: PropTypes.object,
t: PropTypes.func,
}
const mapDispatchToProps = (dispatch) => {

View File

@ -11,7 +11,7 @@ class NewAccountModal extends Component {
const newAccountNumber = numberOfExistingAccounts + 1
this.state = {
newAccountName: `${t('account')} ${newAccountNumber}`,
newAccountName: `${props.t('account')} ${newAccountNumber}`,
}
}
@ -69,7 +69,7 @@ NewAccountModal.propTypes = {
showImportPage: PropTypes.func,
createAccount: PropTypes.func,
numberOfExistingAccounts: PropTypes.number,
localeMessages: PropTypes.object,
t: PropTypes.func,
}
const mapStateToProps = state => {

View File

@ -62,7 +62,7 @@ NotificationModal.propTypes = {
showCancelButton: PropTypes.bool,
showConfirmButton: PropTypes.bool,
onConfirm: PropTypes.func,
localeMessages: PropTypes.object,
t: PropTypes.func,
}
const mapDispatchToProps = dispatch => {

View File

@ -38,6 +38,7 @@ class NetworkDisplay extends Component {
NetworkDisplay.propTypes = {
network: PropTypes.string,
provider: PropTypes.object,
t: PropTypes.func,
}
const mapStateToProps = ({ metamask: { network, provider } }) => {

View File

@ -32,7 +32,7 @@ class ConfirmDeployContract extends Component {
if (valid && this.verifyGasParams()) {
this.props.sendTransaction(txMeta, event)
} else {
this.props.displayWarning('invalidGasParams')
this.props.displayWarning(this.props.t('invalidGasParams'))
this.setState({ submitting: false })
}
}
@ -324,6 +324,7 @@ ConfirmDeployContract.propTypes = {
conversionRate: PropTypes.number,
currentCurrency: PropTypes.string,
selectedAddress: PropTypes.string,
t: PropTypes.func,
}
const mapStateToProps = state => {
@ -346,7 +347,7 @@ const mapDispatchToProps = dispatch => {
return {
backToAccountDetail: address => dispatch(actions.backToAccountDetail(address)),
cancelTransaction: ({ id }) => dispatch(actions.cancelTx({ id })),
displayWarning: warning => actions.displayWarning(t(warning)),
displayWarning: warning => actions.displayWarning(warning),
}
}

View File

@ -327,7 +327,7 @@ ConfirmSendToken.prototype.renderTotalPlusGas = function () {
h('div.confirm-screen-section-column', [
h('div.confirm-screen-row-info', `${tokenAmount} ${symbol}`),
h('div.confirm-screen-row-detail', `+ ${fiatGas} ${currentCurrency} ${t('gas')}`),
h('div.confirm-screen-row-detail', `+ ${fiatGas} ${currentCurrency} ${this.props.t('gas')}`),
]),
])
)

View File

@ -53,7 +53,6 @@ function mapStateToProps (state) {
tokenContract: getSelectedTokenContract(state),
unapprovedTxs: state.metamask.unapprovedTxs,
network: state.metamask.network,
t: t.bind(null, state.localeMessages),
}
}

View File

@ -59,9 +59,9 @@ class SenderToRecipient extends Component {
SenderToRecipient.propTypes = {
senderName: PropTypes.string,
senderAddress: PropTypes.string,
localeMessages: PropTypes.object,
recipientName: PropTypes.string,
recipientName: PropTypes.string,
recipientAddress: PropTypes.string,
t: PropTypes.func,
}
module.exports = {

View File

@ -459,6 +459,7 @@ Settings.propTypes = {
isMascara: PropTypes.bool,
updateCurrentLocale: PropTypes.func,
currentLocale: PropTypes.object,
t: PropTypes.func,
}
const mapStateToProps = state => {