aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-03-22 10:18:10 +0800
committerDan <danjm.com@gmail.com>2018-03-22 10:18:10 +0800
commita82631791efb496efc9f611a2a3edbac7123d221 (patch)
tree747446f3fa06954dc40f82ca5434a8d63960eecf /ui
parent18f85835296f12814e0593dfc67b29ac672ddf53 (diff)
downloadtangerine-wallet-browser-a82631791efb496efc9f611a2a3edbac7123d221.tar.gz
tangerine-wallet-browser-a82631791efb496efc9f611a2a3edbac7123d221.tar.zst
tangerine-wallet-browser-a82631791efb496efc9f611a2a3edbac7123d221.zip
Lint fixes
Diffstat (limited to 'ui')
-rw-r--r--ui/app/accounts/import/index.js4
-rw-r--r--ui/app/accounts/import/json.js2
-rw-r--r--ui/app/accounts/new-account/create-form.js2
-rw-r--r--ui/app/components/account-dropdowns.js2
-rw-r--r--ui/app/components/buy-button-subview.js4
-rw-r--r--ui/app/components/dropdowns/components/account-dropdowns.js2
-rw-r--r--ui/app/components/modals/new-account-modal.js4
-rw-r--r--ui/app/components/modals/notification-modal.js2
-rw-r--r--ui/app/components/network-display.js1
-rw-r--r--ui/app/components/pending-tx/confirm-deploy-contract.js5
-rw-r--r--ui/app/components/pending-tx/confirm-send-token.js2
-rw-r--r--ui/app/components/send/send-v2-container.js1
-rw-r--r--ui/app/components/sender-to-recipient.js4
-rw-r--r--ui/app/settings.js1
14 files changed, 18 insertions, 18 deletions
diff --git a/ui/app/accounts/import/index.js b/ui/app/accounts/import/index.js
index 3720e637f..b09b50ef7 100644
--- a/ui/app/accounts/import/index.js
+++ b/ui/app/accounts/import/index.js
@@ -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()
diff --git a/ui/app/accounts/import/json.js b/ui/app/accounts/import/json.js
index 8bcc1a14e..431c693ee 100644
--- a/ui/app/accounts/import/json.js
+++ b/ui/app/accounts/import/json.js
@@ -112,7 +112,7 @@ JsonImportSubview.propTypes = {
goHome: PropTypes.func,
displayWarning: PropTypes.func,
importNewJsonAccount: PropTypes.func,
- localeMessages: PropTypes.object,
+ t: PropTypes.func,
}
const mapStateToProps = state => {
diff --git a/ui/app/accounts/new-account/create-form.js b/ui/app/accounts/new-account/create-form.js
index b0e109cd7..728088568 100644
--- a/ui/app/accounts/new-account/create-form.js
+++ b/ui/app/accounts/new-account/create-form.js
@@ -61,7 +61,7 @@ NewAccountCreateForm.propTypes = {
createAccount: PropTypes.func,
goHome: PropTypes.func,
numberOfExistingAccounts: PropTypes.number,
- localeMessages: PropTypes.object,
+ t: PropTypes.object,
}
const mapStateToProps = state => {
diff --git a/ui/app/components/account-dropdowns.js b/ui/app/components/account-dropdowns.js
index 88c7dbb60..84678fee6 100644
--- a/ui/app/components/account-dropdowns.js
+++ b/ui/app/components/account-dropdowns.js
@@ -300,7 +300,7 @@ AccountDropdowns.propTypes = {
style: PropTypes.object,
enableAccountOptions: PropTypes.bool,
enableAccountsSelector: PropTypes.bool,
- localeMessages: PropTypes.object,
+ t: PropTypes.func,
}
const mapDispatchToProps = (dispatch) => {
diff --git a/ui/app/components/buy-button-subview.js b/ui/app/components/buy-button-subview.js
index 2243ce38b..eafa2af91 100644
--- a/ui/app/components/buy-button-subview.js
+++ b/ui/app/components/buy-button-subview.js
@@ -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),
diff --git a/ui/app/components/dropdowns/components/account-dropdowns.js b/ui/app/components/dropdowns/components/account-dropdowns.js
index d570b3d36..5e7c0d554 100644
--- a/ui/app/components/dropdowns/components/account-dropdowns.js
+++ b/ui/app/components/dropdowns/components/account-dropdowns.js
@@ -425,7 +425,7 @@ AccountDropdowns.propTypes = {
enableAccountsSelector: PropTypes.bool,
enableAccountOption: PropTypes.bool,
enableAccountOptions: PropTypes.bool,
- localeMessages: PropTypes.object,
+ t: PropTypes.func,
}
const mapDispatchToProps = (dispatch) => {
diff --git a/ui/app/components/modals/new-account-modal.js b/ui/app/components/modals/new-account-modal.js
index c46980855..372b65251 100644
--- a/ui/app/components/modals/new-account-modal.js
+++ b/ui/app/components/modals/new-account-modal.js
@@ -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 => {
diff --git a/ui/app/components/modals/notification-modal.js b/ui/app/components/modals/notification-modal.js
index 3c4ab5194..5d6dca177 100644
--- a/ui/app/components/modals/notification-modal.js
+++ b/ui/app/components/modals/notification-modal.js
@@ -62,7 +62,7 @@ NotificationModal.propTypes = {
showCancelButton: PropTypes.bool,
showConfirmButton: PropTypes.bool,
onConfirm: PropTypes.func,
- localeMessages: PropTypes.object,
+ t: PropTypes.func,
}
const mapDispatchToProps = dispatch => {
diff --git a/ui/app/components/network-display.js b/ui/app/components/network-display.js
index 0bc5cdaf8..ce1ab21a5 100644
--- a/ui/app/components/network-display.js
+++ b/ui/app/components/network-display.js
@@ -38,6 +38,7 @@ class NetworkDisplay extends Component {
NetworkDisplay.propTypes = {
network: PropTypes.string,
provider: PropTypes.object,
+ t: PropTypes.func,
}
const mapStateToProps = ({ metamask: { network, provider } }) => {
diff --git a/ui/app/components/pending-tx/confirm-deploy-contract.js b/ui/app/components/pending-tx/confirm-deploy-contract.js
index 60afdc7ae..370ffdda3 100644
--- a/ui/app/components/pending-tx/confirm-deploy-contract.js
+++ b/ui/app/components/pending-tx/confirm-deploy-contract.js
@@ -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),
}
}
diff --git a/ui/app/components/pending-tx/confirm-send-token.js b/ui/app/components/pending-tx/confirm-send-token.js
index 50d803fc4..f9b6bb79e 100644
--- a/ui/app/components/pending-tx/confirm-send-token.js
+++ b/ui/app/components/pending-tx/confirm-send-token.js
@@ -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')}`),
]),
])
)
diff --git a/ui/app/components/send/send-v2-container.js b/ui/app/components/send/send-v2-container.js
index d90a6bf75..25902cfce 100644
--- a/ui/app/components/send/send-v2-container.js
+++ b/ui/app/components/send/send-v2-container.js
@@ -53,7 +53,6 @@ function mapStateToProps (state) {
tokenContract: getSelectedTokenContract(state),
unapprovedTxs: state.metamask.unapprovedTxs,
network: state.metamask.network,
- t: t.bind(null, state.localeMessages),
}
}
diff --git a/ui/app/components/sender-to-recipient.js b/ui/app/components/sender-to-recipient.js
index 420d50e42..590769b02 100644
--- a/ui/app/components/sender-to-recipient.js
+++ b/ui/app/components/sender-to-recipient.js
@@ -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 = {
diff --git a/ui/app/settings.js b/ui/app/settings.js
index d3525e9c0..96790cb10 100644
--- a/ui/app/settings.js
+++ b/ui/app/settings.js
@@ -459,6 +459,7 @@ Settings.propTypes = {
isMascara: PropTypes.bool,
updateCurrentLocale: PropTypes.func,
currentLocale: PropTypes.object,
+ t: PropTypes.func,
}
const mapStateToProps = state => {