mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Lint fixes
This commit is contained in:
parent
18f8583529
commit
a82631791e
@ -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()
|
||||
|
@ -112,7 +112,7 @@ JsonImportSubview.propTypes = {
|
||||
goHome: PropTypes.func,
|
||||
displayWarning: PropTypes.func,
|
||||
importNewJsonAccount: PropTypes.func,
|
||||
localeMessages: PropTypes.object,
|
||||
t: PropTypes.func,
|
||||
}
|
||||
|
||||
const mapStateToProps = state => {
|
||||
|
@ -61,7 +61,7 @@ NewAccountCreateForm.propTypes = {
|
||||
createAccount: PropTypes.func,
|
||||
goHome: PropTypes.func,
|
||||
numberOfExistingAccounts: PropTypes.number,
|
||||
localeMessages: PropTypes.object,
|
||||
t: PropTypes.object,
|
||||
}
|
||||
|
||||
const mapStateToProps = state => {
|
||||
|
@ -300,7 +300,7 @@ AccountDropdowns.propTypes = {
|
||||
style: PropTypes.object,
|
||||
enableAccountOptions: PropTypes.bool,
|
||||
enableAccountsSelector: PropTypes.bool,
|
||||
localeMessages: PropTypes.object,
|
||||
t: PropTypes.func,
|
||||
}
|
||||
|
||||
const mapDispatchToProps = (dispatch) => {
|
||||
|
@ -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),
|
||||
|
@ -425,7 +425,7 @@ AccountDropdowns.propTypes = {
|
||||
enableAccountsSelector: PropTypes.bool,
|
||||
enableAccountOption: PropTypes.bool,
|
||||
enableAccountOptions: PropTypes.bool,
|
||||
localeMessages: PropTypes.object,
|
||||
t: PropTypes.func,
|
||||
}
|
||||
|
||||
const mapDispatchToProps = (dispatch) => {
|
||||
|
@ -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 => {
|
||||
|
@ -62,7 +62,7 @@ NotificationModal.propTypes = {
|
||||
showCancelButton: PropTypes.bool,
|
||||
showConfirmButton: PropTypes.bool,
|
||||
onConfirm: PropTypes.func,
|
||||
localeMessages: PropTypes.object,
|
||||
t: PropTypes.func,
|
||||
}
|
||||
|
||||
const mapDispatchToProps = dispatch => {
|
||||
|
@ -38,6 +38,7 @@ class NetworkDisplay extends Component {
|
||||
NetworkDisplay.propTypes = {
|
||||
network: PropTypes.string,
|
||||
provider: PropTypes.object,
|
||||
t: PropTypes.func,
|
||||
}
|
||||
|
||||
const mapStateToProps = ({ metamask: { network, provider } }) => {
|
||||
|
@ -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),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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')}`),
|
||||
]),
|
||||
])
|
||||
)
|
||||
|
@ -53,7 +53,6 @@ function mapStateToProps (state) {
|
||||
tokenContract: getSelectedTokenContract(state),
|
||||
unapprovedTxs: state.metamask.unapprovedTxs,
|
||||
network: state.metamask.network,
|
||||
t: t.bind(null, state.localeMessages),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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 = {
|
||||
|
@ -459,6 +459,7 @@ Settings.propTypes = {
|
||||
isMascara: PropTypes.bool,
|
||||
updateCurrentLocale: PropTypes.func,
|
||||
currentLocale: PropTypes.object,
|
||||
t: PropTypes.func,
|
||||
}
|
||||
|
||||
const mapStateToProps = state => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user