From a8f745f9fe74751b87f500af3857b66d4c80f45e Mon Sep 17 00:00:00 2001 From: brunobar79 Date: Mon, 2 Jul 2018 18:49:33 -0400 Subject: eslint --fix . --- app/scripts/controllers/balance.js | 4 ++-- app/scripts/controllers/blacklist.js | 2 +- app/scripts/controllers/computed-balances.js | 2 +- app/scripts/controllers/currency.js | 8 ++++---- app/scripts/controllers/network/network.js | 2 +- app/scripts/controllers/preferences.js | 6 +++--- app/scripts/controllers/recent-blocks.js | 2 +- app/scripts/controllers/transactions/tx-gas-utils.js | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) (limited to 'app/scripts/controllers') diff --git a/app/scripts/controllers/balance.js b/app/scripts/controllers/balance.js index 86619fce1..4c97810a3 100644 --- a/app/scripts/controllers/balance.js +++ b/app/scripts/controllers/balance.js @@ -60,7 +60,7 @@ class BalanceController { * Sets up listeners and subscriptions which should trigger an update of ethBalance. These updates include: * - when a transaction changes state to 'submitted', 'confirmed' or 'failed' * - when the current account changes (i.e. a new account is selected) - * - when there is a block update + * - when there is a block update * * @private * @@ -100,7 +100,7 @@ class BalanceController { /** * Gets the pending transactions (i.e. those with a 'submitted' status). These are accessed from the - * TransactionController passed to this BalanceController during construction. + * TransactionController passed to this BalanceController during construction. * * @private * @returns {Promise} Promises an array of transaction objects. diff --git a/app/scripts/controllers/blacklist.js b/app/scripts/controllers/blacklist.js index f100c4525..1d2191433 100644 --- a/app/scripts/controllers/blacklist.js +++ b/app/scripts/controllers/blacklist.js @@ -87,7 +87,7 @@ class BlacklistController { * * @private * @param {object} config A config object like that found at {@link https://github.com/MetaMask/eth-phishing-detect/blob/master/src/config.json} - * + * */ _setupPhishingDetector (config) { this._phishingDetector = new PhishingDetector(config) diff --git a/app/scripts/controllers/computed-balances.js b/app/scripts/controllers/computed-balances.js index 1a6802f9a..e04ce2ef7 100644 --- a/app/scripts/controllers/computed-balances.js +++ b/app/scripts/controllers/computed-balances.js @@ -18,7 +18,7 @@ class ComputedbalancesController { /** * Creates a new controller instance * - * @param {ComputedBalancesOptions} [opts] Controller configuration parameters + * @param {ComputedBalancesOptions} [opts] Controller configuration parameters */ constructor (opts = {}) { const { accountTracker, txController, blockTracker } = opts diff --git a/app/scripts/controllers/currency.js b/app/scripts/controllers/currency.js index 480c08b1c..a93aff49b 100644 --- a/app/scripts/controllers/currency.js +++ b/app/scripts/controllers/currency.js @@ -16,9 +16,9 @@ class CurrencyController { * currentCurrency, conversionRate and conversionDate properties * @property {string} currentCurrency A 2-4 character shorthand that describes a specific currency, currently * selected by the user - * @property {number} conversionRate The conversion rate from ETH to the selected currency. + * @property {number} conversionRate The conversion rate from ETH to the selected currency. * @property {string} conversionDate The date at which the conversion rate was set. Expressed in in milliseconds - * since midnight of January 1, 1970 + * since midnight of January 1, 1970 * @property {number} conversionInterval The id of the interval created by the scheduleConversionInterval method. * Used to clear an existing interval on subsequent calls of that method. * @@ -59,7 +59,7 @@ class CurrencyController { /** * A getter for the conversionRate property * - * @returns {string} The conversion rate from ETH to the selected currency. + * @returns {string} The conversion rate from ETH to the selected currency. * */ getConversionRate () { @@ -80,7 +80,7 @@ class CurrencyController { * A getter for the conversionDate property * * @returns {string} The date at which the conversion rate was set. Expressed in milliseconds since midnight of - * January 1, 1970 + * January 1, 1970 * */ getConversionDate () { diff --git a/app/scripts/controllers/network/network.js b/app/scripts/controllers/network/network.js index 5e0c63e7d..a50f6dc45 100644 --- a/app/scripts/controllers/network/network.js +++ b/app/scripts/controllers/network/network.js @@ -132,7 +132,7 @@ module.exports = class NetworkController extends EventEmitter { } else if (type === LOCALHOST) { this._configureStandardProvider({ rpcUrl: LOCALHOST_RPC_URL }) // url-based rpc endpoints - } else if (type === 'rpc'){ + } else if (type === 'rpc') { this._configureStandardProvider({ rpcUrl: rpcTarget }) } else { throw new Error(`NetworkController - _configureProvider - unknown type "${type}"`) diff --git a/app/scripts/controllers/preferences.js b/app/scripts/controllers/preferences.js index 8411e3a28..b314745f5 100644 --- a/app/scripts/controllers/preferences.js +++ b/app/scripts/controllers/preferences.js @@ -111,9 +111,9 @@ class PreferencesController { * @returns {Promise} selectedAddress the selected address. */ syncAddresses (addresses) { - let { identities, lostIdentities } = this.store.getState() + const { identities, lostIdentities } = this.store.getState() - let newlyLost = {} + const newlyLost = {} Object.keys(identities).forEach((identity) => { if (!addresses.includes(identity)) { newlyLost[identity] = identities[identity] @@ -128,7 +128,7 @@ class PreferencesController { if (this.diagnostics) this.diagnostics.reportOrphans(newlyLost) // store lost accounts - for (let key in newlyLost) { + for (const key in newlyLost) { lostIdentities[key] = newlyLost[key] } } diff --git a/app/scripts/controllers/recent-blocks.js b/app/scripts/controllers/recent-blocks.js index 033ef1d7e..926268691 100644 --- a/app/scripts/controllers/recent-blocks.js +++ b/app/scripts/controllers/recent-blocks.js @@ -117,7 +117,7 @@ class RecentBlocksController { * * @returns {Promise} Promises undefined */ - async backfill() { + async backfill () { this.blockTracker.once('block', async (block) => { const currentBlockNumber = Number.parseInt(block.number, 16) const blocksToFetch = Math.min(currentBlockNumber, this.historyLength) diff --git a/app/scripts/controllers/transactions/tx-gas-utils.js b/app/scripts/controllers/transactions/tx-gas-utils.js index 36b5cdbc9..ab4031faa 100644 --- a/app/scripts/controllers/transactions/tx-gas-utils.js +++ b/app/scripts/controllers/transactions/tx-gas-utils.js @@ -126,4 +126,4 @@ class TxGasUtil { } } -module.exports = TxGasUtil \ No newline at end of file +module.exports = TxGasUtil -- cgit