diff --git a/app/scripts/background.js b/app/scripts/background.js index beaeb78c3..adbd1e40e 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -260,7 +260,7 @@ function setupController (initState, initLangCode) { createStreamSink(persistData), (error) => { log.error('MetaMask - Persistence pipeline failed', error) - } + }, ) /** @@ -454,7 +454,7 @@ async function openPopup () { resolve() } }, 1000) - } + }, ) } diff --git a/app/scripts/contentscript.js b/app/scripts/contentscript.js index 17eeabf89..de3066ca8 100644 --- a/app/scripts/contentscript.js +++ b/app/scripts/contentscript.js @@ -77,13 +77,13 @@ async function setupStreams () { pageMux, pageStream, pageMux, - (err) => logStreamDisconnectWarning('MetaMask Inpage Multiplex', err) + (err) => logStreamDisconnectWarning('MetaMask Inpage Multiplex', err), ) pump( extensionMux, extensionStream, extensionMux, - (err) => logStreamDisconnectWarning('MetaMask Background Multiplex', err) + (err) => logStreamDisconnectWarning('MetaMask Background Multiplex', err), ) // forward communication across inpage-background for these channels only @@ -102,7 +102,7 @@ function forwardTrafficBetweenMuxers (channelName, muxA, muxB) { channelA, channelB, channelA, - (err) => logStreamDisconnectWarning(`MetaMask muxed traffic for channel "${channelName}" failed.`, err) + (err) => logStreamDisconnectWarning(`MetaMask muxed traffic for channel "${channelName}" failed.`, err), ) } diff --git a/app/scripts/controllers/alert.js b/app/scripts/controllers/alert.js index ff0d7fb89..7fdddcdb1 100644 --- a/app/scripts/controllers/alert.js +++ b/app/scripts/controllers/alert.js @@ -22,7 +22,7 @@ const defaultState = { alertEnabledness[alertType] = true return alertEnabledness }, - {} + {}, ), unconnectedAccountAlertShownOrigins: {}, } @@ -44,7 +44,7 @@ export default class AlertController { initState, { unconnectedAccountAlertShownOrigins: {}, - } + }, ) this.store = new ObservableStore(state) diff --git a/app/scripts/controllers/permissions/index.js b/app/scripts/controllers/permissions/index.js index b0aa79c46..311a0d1ca 100644 --- a/app/scripts/controllers/permissions/index.js +++ b/app/scripts/controllers/permissions/index.js @@ -102,7 +102,7 @@ export class PermissionsController { })) engine.push(this.permissions.providerMiddlewareFunction.bind( - this.permissions, { origin } + this.permissions, { origin }, )) return asMiddleware(engine) @@ -132,7 +132,7 @@ export class PermissionsController { const req = { method: 'eth_accounts' } const res = {} this.permissions.providerMiddlewareFunction( - { origin }, req, res, () => {}, _end + { origin }, req, res, () => {}, _end, ) function _end () { @@ -187,7 +187,7 @@ export class PermissionsController { const res = {} this.permissions.providerMiddlewareFunction( - domain, req, res, () => {}, _end + domain, req, res, () => {}, _end, ) function _end (_err) { @@ -233,7 +233,7 @@ export class PermissionsController { // attempt to finalize the request and resolve it, // settings caveats as necessary approved.permissions = await this.finalizePermissionsRequest( - approved.permissions, accounts + approved.permissions, accounts, ) approval.resolve(approved.permissions) } @@ -295,7 +295,7 @@ export class PermissionsController { this.permissions.updateCaveatFor( origin, 'eth_accounts', CAVEAT_NAMES.exposedAccounts, - [...oldPermittedAccounts, account] + [...oldPermittedAccounts, account], ) const permittedAccounts = await this.getAccounts(origin) @@ -459,7 +459,7 @@ export class PermissionsController { // update "last seen" time for the origin and account(s) // exception: no accounts -> no times to update this.permissionsLog.updateAccountsHistory( - origin, newAccounts + origin, newAccounts, ) // NOTE: @@ -490,7 +490,7 @@ export class PermissionsController { } return { parentCapability: methodName } - }) + }), ) }) } @@ -642,8 +642,8 @@ export class PermissionsController { await Promise.all( connectedDomains .map( - (origin) => this._handleConnectedAccountSelected(origin) - ) + (origin) => this._handleConnectedAccountSelected(origin), + ), ) } @@ -675,7 +675,7 @@ export class PermissionsController { this.pendingApprovals.has(id) ) { throw new Error( - `Pending approval with id '${id}' or origin '${origin}' already exists.` + `Pending approval with id '${id}' or origin '${origin}' already exists.`, ) } @@ -728,7 +728,7 @@ export class PermissionsController { if (this.pendingApprovalOrigins.has(origin)) { throw ethErrors.rpc.resourceUnavailable( - 'Permissions request already pending; please wait.' + 'Permissions request already pending; please wait.', ) } diff --git a/app/scripts/controllers/permissions/methodMiddleware.js b/app/scripts/controllers/permissions/methodMiddleware.js index 76dc363bb..b57585acd 100644 --- a/app/scripts/controllers/permissions/methodMiddleware.js +++ b/app/scripts/controllers/permissions/methodMiddleware.js @@ -33,7 +33,7 @@ export default function createMethodMiddleware ({ if (isProcessingRequestAccounts) { res.error = ethErrors.rpc.resourceUnavailable( - 'Already processing eth_requestAccounts. Please wait.' + 'Already processing eth_requestAccounts. Please wait.', ) return } @@ -68,7 +68,7 @@ export default function createMethodMiddleware ({ // this should never happen, because it should be caught in the // above catch clause res.error = ethErrors.rpc.internal( - 'Accounts unexpectedly unavailable. Please report this bug.' + 'Accounts unexpectedly unavailable. Please report this bug.', ) } diff --git a/app/scripts/controllers/permissions/permissionsLog.js b/app/scripts/controllers/permissions/permissionsLog.js index 927dbf018..f7997f085 100644 --- a/app/scripts/controllers/permissions/permissionsLog.js +++ b/app/scripts/controllers/permissions/permissionsLog.js @@ -213,7 +213,7 @@ export default class PermissionsLogController { */ logPermissionsHistory ( requestedMethods, origin, result, - time, isEthRequestAccounts + time, isEthRequestAccounts, ) { let accounts, newEntries @@ -378,6 +378,6 @@ export default class PermissionsLogController { */ function getAccountToTimeMap (accounts, time) { return accounts.reduce( - (acc, account) => ({ ...acc, [account]: time }), {} + (acc, account) => ({ ...acc, [account]: time }), {}, ) } diff --git a/app/scripts/controllers/permissions/restrictedMethods.js b/app/scripts/controllers/permissions/restrictedMethods.js index 6fc6122e7..074cbb5a5 100644 --- a/app/scripts/controllers/permissions/restrictedMethods.js +++ b/app/scripts/controllers/permissions/restrictedMethods.js @@ -27,7 +27,7 @@ export default function getRestrictedMethods ({ getIdentities, getKeyringAccount (err) => { res.error = err end(err) - } + }, ) }, }, diff --git a/app/scripts/controllers/transactions/pending-tx-tracker.js b/app/scripts/controllers/transactions/pending-tx-tracker.js index 304246565..a901707a8 100644 --- a/app/scripts/controllers/transactions/pending-tx-tracker.js +++ b/app/scripts/controllers/transactions/pending-tx-tracker.js @@ -243,7 +243,7 @@ export default class PendingTransactionTracker extends EventEmitter { // This is called while the transaction is in-flight, so it is possible that the // list of completed transactions now includes the transaction we were looking at // and if that is the case, don't consider the transaction to have taken its own nonce - !(other.id === txMeta.id) && other.txParams.nonce === txMeta.txParams.nonce + !(other.id === txMeta.id) && other.txParams.nonce === txMeta.txParams.nonce, ) } } diff --git a/app/scripts/lib/get-first-preferred-lang-code.js b/app/scripts/lib/get-first-preferred-lang-code.js index 9194b86d4..00e50d7f4 100644 --- a/app/scripts/lib/get-first-preferred-lang-code.js +++ b/app/scripts/lib/get-first-preferred-lang-code.js @@ -4,7 +4,7 @@ import allLocales from '../../_locales/index.json' const getPreferredLocales = extension.i18n ? promisify( extension.i18n.getAcceptLanguages, - { errorFirst: false } + { errorFirst: false }, ) : async () => [] // mapping some browsers return hyphen instead underscore in locale codes (e.g. zh_TW -> zh-tw) diff --git a/app/scripts/lib/stream-utils.js b/app/scripts/lib/stream-utils.js index 55e2c419c..b1b4aeec3 100644 --- a/app/scripts/lib/stream-utils.js +++ b/app/scripts/lib/stream-utils.js @@ -16,7 +16,7 @@ export function setupMultiplex (connectionStream) { if (err) { console.error(err) } - } + }, ) return mux } diff --git a/app/scripts/lib/typed-message-manager.js b/app/scripts/lib/typed-message-manager.js index 49e71e59f..3f5da3db1 100644 --- a/app/scripts/lib/typed-message-manager.js +++ b/app/scripts/lib/typed-message-manager.js @@ -143,7 +143,7 @@ export default class TypedMessageManager extends EventEmitter { assert.ok('from' in params, 'Params must include a "from" field.') assert.ok( typeof params.from === 'string' && isValidAddress(params.from), - '"from" field must be a valid, lowercase, hexadecimal Ethereum address string.' + '"from" field must be a valid, lowercase, hexadecimal Ethereum address string.', ) switch (params.version) { diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 6fe276228..0b87206ca 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -273,7 +273,7 @@ export default class MetamaskController extends EventEmitter { if (error) { throw error } - } + }, ) }) @@ -717,7 +717,7 @@ export default class MetamaskController extends EventEmitter { const tokenAddress = ethUtil.toChecksumAddress(address) return contractMap[tokenAddress] ? contractMap[tokenAddress].erc20 : true }) - ) + ), ) }) @@ -735,7 +735,7 @@ export default class MetamaskController extends EventEmitter { const simpleKeyPairKeyrings = this.keyringController.getKeyringsByType('Simple Key Pair') const hdAccounts = await hdKeyring.getAccounts() const simpleKeyPairKeyringAccounts = await Promise.all( - simpleKeyPairKeyrings.map((keyring) => keyring.getAccounts()) + simpleKeyPairKeyrings.map((keyring) => keyring.getAccounts()), ) const simpleKeyPairAccounts = simpleKeyPairKeyringAccounts.reduce((acc, accounts) => [...acc, ...accounts], []) const accounts = { @@ -1523,7 +1523,7 @@ export default class MetamaskController extends EventEmitter { if (err) { log.error(err) } - } + }, ) dnode.on('remote', (remote) => { // push updates to popup @@ -1575,7 +1575,7 @@ export default class MetamaskController extends EventEmitter { if (err) { log.error(err) } - } + }, ) } @@ -1650,7 +1650,7 @@ export default class MetamaskController extends EventEmitter { if (err) { log.error(err) } - } + }, ) } diff --git a/development/build/display.js b/development/build/display.js index 008b19d0c..e9c255af5 100644 --- a/development/build/display.js +++ b/development/build/display.js @@ -34,7 +34,7 @@ function setupTaskDisplay (taskEvents) { function displayChart (data) { // sort tasks by start time - data.sort((a, b,) => a[1] - b[1]) + data.sort((a, b) => a[1] - b[1]) // get bounds const first = Math.min(...data.map((entry) => entry[1])) diff --git a/development/build/etc.js b/development/build/etc.js index ab0c2afb8..0dbce1255 100644 --- a/development/build/etc.js +++ b/development/build/etc.js @@ -25,7 +25,7 @@ function createEtcTasks ({ browserPlatforms, livereload }) { // zip tasks for distribution const zip = createTask('zip', composeParallel( - ...browserPlatforms.map((platform) => createZipTask(platform)) + ...browserPlatforms.map((platform) => createZipTask(platform)), )) return { clean, reload, zip } diff --git a/development/build/index.js b/development/build/index.js index 5b073de55..a665410b2 100755 --- a/development/build/index.js +++ b/development/build/index.js @@ -39,9 +39,9 @@ function defineAllTasks () { scriptTasks.dev, staticTasks.dev, manifestTasks.dev, - reload - ) - ) + reload, + ), + ), ) // build for test development (livereload) @@ -53,9 +53,9 @@ function defineAllTasks () { scriptTasks.testDev, staticTasks.dev, manifestTasks.testDev, - reload - ) - ) + reload, + ), + ), ) // build for prod release @@ -69,7 +69,7 @@ function defineAllTasks () { manifestTasks.prod, ), zip, - ) + ), ) // build for CI testing @@ -82,7 +82,7 @@ function defineAllTasks () { staticTasks.prod, manifestTasks.test, ), - ) + ), ) // special build for minimal CI testing diff --git a/development/build/scripts.js b/development/build/scripts.js index 86a082bd6..0cb3e85ea 100644 --- a/development/build/scripts.js +++ b/development/build/scripts.js @@ -94,13 +94,13 @@ function createScriptTasks ({ browserPlatforms, livereload }) { const standardSubtasks = standardBundles.map((filename) => { return createTask(`${taskPrefix}:${filename}`, - createBundleTaskForBuildJsExtensionNormal({ filename, devMode, testing }) + createBundleTaskForBuildJsExtensionNormal({ filename, devMode, testing }), ) }) // inpage must be built before contentscript // because inpage bundle result is included inside contentscript const contentscriptSubtask = createTask(`${taskPrefix}:contentscript`, - createTaskForBuildJsExtensionContentscript({ devMode, testing }) + createTaskForBuildJsExtensionContentscript({ devMode, testing }), ) // task for initiating livereload @@ -156,7 +156,7 @@ function createScriptTasks ({ browserPlatforms, livereload }) { externalDependencies: devMode ? undefined : externalDependenciesMap[contentscript], devMode, testing, - }) + }), ) } diff --git a/package.json b/package.json index 8306796aa..67039d559 100644 --- a/package.json +++ b/package.json @@ -188,7 +188,7 @@ "@storybook/storybook-deployer": "^2.8.6", "@testing-library/react-hooks": "^3.2.1", "addons-linter": "1.14.0", - "babel-eslint": "^10.0.2", + "babel-eslint": "^10.1.0", "babel-loader": "^8.0.6", "babelify": "^10.0.0", "brfs": "^1.6.1", @@ -207,7 +207,7 @@ "envify": "^4.1.0", "enzyme": "^3.10.0", "enzyme-adapter-react-16": "^1.15.1", - "eslint": "^6.0.1", + "eslint": "^6.8.0", "eslint-plugin-babel": "^5.3.0", "eslint-plugin-import": "^2.19.1", "eslint-plugin-json": "^1.2.0", diff --git a/test/e2e/tests/localization.spec.js b/test/e2e/tests/localization.spec.js index 796a10594..e3d4520ca 100644 --- a/test/e2e/tests/localization.spec.js +++ b/test/e2e/tests/localization.spec.js @@ -23,7 +23,7 @@ describe('Localization', function () { const [fiatAmount, fiatUnit] = secondaryBalanceText.trim().split(/\s+/) assert.ok(fiatAmount.startsWith('₱')) assert.equal(fiatUnit, 'PHP') - } + }, ) }) }) diff --git a/test/e2e/tests/personal-sign.spec.js b/test/e2e/tests/personal-sign.spec.js index b2c2cd0a6..9cc2d4fc3 100644 --- a/test/e2e/tests/personal-sign.spec.js +++ b/test/e2e/tests/personal-sign.spec.js @@ -34,7 +34,7 @@ describe('Personal sign', function () { await driver.clickElement(By.css('[data-testid="request-signature__sign"]')) await driver.waitUntilXWindowHandles(2) - } + }, ) }) }) diff --git a/test/e2e/tests/simple-send.spec.js b/test/e2e/tests/simple-send.spec.js index 18e5216b8..3328b110c 100644 --- a/test/e2e/tests/simple-send.spec.js +++ b/test/e2e/tests/simple-send.spec.js @@ -26,7 +26,7 @@ describe('Simple send', function () { await driver.clickElement(By.css('[data-testid="page-container-footer-next"]')) await driver.clickElement(By.css('[data-testid="home__activity-tab"]')) await driver.findElement(By.css('.transaction-list-item')) - } + }, ) }) }) diff --git a/test/e2e/webdriver/driver.js b/test/e2e/webdriver/driver.js index 8137093ba..daf3a1acc 100644 --- a/test/e2e/webdriver/driver.js +++ b/test/e2e/webdriver/driver.js @@ -61,7 +61,7 @@ class Driver { this.driver.wait(until.elementIsEnabled(element), this.timeout), ) return acc - }, []) + }, []), ) return elements } diff --git a/test/unit/app/controllers/detect-tokens-test.js b/test/unit/app/controllers/detect-tokens-test.js index 50b368d63..6fb08b002 100644 --- a/test/unit/app/controllers/detect-tokens-test.js +++ b/test/unit/app/controllers/detect-tokens-test.js @@ -117,7 +117,7 @@ describe('DetectTokensController', function () { [ { address: existingTokenAddress.toLowerCase(), decimals: existingToken.decimals, symbol: existingToken.symbol }, { address: tokenAddressToAdd.toLowerCase(), decimals: tokenToAdd.decimals, symbol: tokenToAdd.symbol }, - ] + ], ) }) diff --git a/test/unit/app/controllers/metamask-controller-test.js b/test/unit/app/controllers/metamask-controller-test.js index 1eda64a56..e3c4d2618 100644 --- a/test/unit/app/controllers/metamask-controller-test.js +++ b/test/unit/app/controllers/metamask-controller-test.js @@ -244,7 +244,7 @@ describe('MetaMaskController', function () { firstVaultIdentities[TEST_ADDRESS].lastSelected >= startTime && firstVaultIdentities[TEST_ADDRESS].lastSelected <= endTime ), - `'${firstVaultIdentities[TEST_ADDRESS].lastSelected}' expected to be between '${startTime}' and '${endTime}'` + `'${firstVaultIdentities[TEST_ADDRESS].lastSelected}' expected to be between '${startTime}' and '${endTime}'`, ) delete firstVaultIdentities[TEST_ADDRESS].lastSelected assert.deepEqual(firstVaultIdentities, { @@ -269,7 +269,7 @@ describe('MetaMaskController', function () { secondVaultIdentities[TEST_ADDRESS_ALT].lastSelected >= startTime && secondVaultIdentities[TEST_ADDRESS_ALT].lastSelected <= endTime ), - `'${secondVaultIdentities[TEST_ADDRESS_ALT].lastSelected}' expected to be between '${startTime}' and '${endTime}'` + `'${secondVaultIdentities[TEST_ADDRESS_ALT].lastSelected}' expected to be between '${startTime}' and '${endTime}'`, ) delete secondVaultIdentities[TEST_ADDRESS_ALT].lastSelected assert.deepEqual(secondVaultIdentities, { @@ -404,7 +404,7 @@ describe('MetaMaskController', function () { sinon.spy(metamaskController.keyringController, 'addNewKeyring') await metamaskController.connectHardware('trezor', 0).catch(() => null) const keyrings = await metamaskController.keyringController.getKeyringsByType( - 'Trezor Hardware' + 'Trezor Hardware', ) assert.equal(metamaskController.keyringController.addNewKeyring.getCall(0).args, 'Trezor Hardware') assert.equal(keyrings.length, 1) @@ -414,7 +414,7 @@ describe('MetaMaskController', function () { sinon.spy(metamaskController.keyringController, 'addNewKeyring') await metamaskController.connectHardware('ledger', 0).catch(() => null) const keyrings = await metamaskController.keyringController.getKeyringsByType( - 'Ledger Hardware' + 'Ledger Hardware', ) assert.equal(metamaskController.keyringController.addNewKeyring.getCall(0).args, 'Ledger Hardware') assert.equal(keyrings.length, 1) @@ -451,7 +451,7 @@ describe('MetaMaskController', function () { await metamaskController.connectHardware('trezor', 0).catch(() => null) await metamaskController.forgetDevice('trezor') const keyrings = await metamaskController.keyringController.getKeyringsByType( - 'Trezor Hardware' + 'Trezor Hardware', ) assert.deepEqual(keyrings[0].accounts, []) @@ -498,7 +498,7 @@ describe('MetaMaskController', function () { it('should set unlockedAccount in the keyring', async function () { const keyrings = await metamaskController.keyringController.getKeyringsByType( - 'Trezor Hardware' + 'Trezor Hardware', ) assert.equal(keyrings[0].unlockedAccount, accountToUnlock) }) diff --git a/test/unit/app/controllers/permissions/helpers.js b/test/unit/app/controllers/permissions/helpers.js index d0b81fef9..8879329a4 100644 --- a/test/unit/app/controllers/permissions/helpers.js +++ b/test/unit/app/controllers/permissions/helpers.js @@ -14,7 +14,7 @@ import { noop } from './mocks' */ export function grantPermissions (permController, origin, permissions) { permController.permissions.grantNewPermissions( - origin, permissions, {}, noop + origin, permissions, {}, noop, ) } @@ -53,20 +53,20 @@ export function getUserApprovalPromise (permController) { * @param {boolean} success - Whether the request succeeded or not. */ export function validateActivityEntry ( - entry, req, res, methodType, success + entry, req, res, methodType, success, ) { assert.doesNotThrow( () => { _validateActivityEntry( - entry, req, res, methodType, success + entry, req, res, methodType, success, ) }, - 'should have expected activity entry' + 'should have expected activity entry', ) } function _validateActivityEntry ( - entry, req, res, methodType, success + entry, req, res, methodType, success, ) { assert.ok(entry, 'entry should exist') @@ -77,7 +77,7 @@ function _validateActivityEntry ( assert.equal(entry.methodType, methodType) assert.deepEqual( entry.request, req, - 'entry.request should equal the request' + 'entry.request should equal the request', ) if (res) { @@ -87,23 +87,23 @@ function _validateActivityEntry ( Number.isInteger(entry.requestTime) && Number.isInteger(entry.responseTime) ), - 'request and response times should be numbers' + 'request and response times should be numbers', ) assert.ok( (entry.requestTime <= entry.responseTime), - 'request time should be less than response time' + 'request time should be less than response time', ) assert.equal(entry.success, success) assert.deepEqual( entry.response, res, - 'entry.response should equal the response' + 'entry.response should equal the response', ) } else { assert.ok( Number.isInteger(entry.requestTime) && entry.requestTime > 0, - 'entry should have non-zero request time' + 'entry should have non-zero request time', ) assert.ok( ( @@ -111,7 +111,7 @@ function _validateActivityEntry ( entry.responseTime === null && entry.response === null ), - 'entry response values should be null' + 'entry response values should be null', ) } } diff --git a/test/unit/app/controllers/permissions/mocks.js b/test/unit/app/controllers/permissions/mocks.js index 754780ad9..5302d9f61 100644 --- a/test/unit/app/controllers/permissions/mocks.js +++ b/test/unit/app/controllers/permissions/mocks.js @@ -41,7 +41,7 @@ const getIdentities = () => { identities[address] = { address, name: `Account ${index}` } return identities }, - {} + {}, ) } diff --git a/test/unit/app/controllers/permissions/permissions-controller-test.js b/test/unit/app/controllers/permissions/permissions-controller-test.js index 1698ed258..98b0cd55d 100644 --- a/test/unit/app/controllers/permissions/permissions-controller-test.js +++ b/test/unit/app/controllers/permissions/permissions-controller-test.js @@ -74,11 +74,11 @@ describe('permissions controller', function () { permController = initPermController() grantPermissions( permController, DOMAINS.a.origin, - PERMS.finalizedRequests.eth_accounts(ACCOUNTS.a.permitted) + PERMS.finalizedRequests.eth_accounts(ACCOUNTS.a.permitted), ) grantPermissions( permController, DOMAINS.b.origin, - PERMS.finalizedRequests.eth_accounts(ACCOUNTS.b.permitted) + PERMS.finalizedRequests.eth_accounts(ACCOUNTS.b.permitted), ) }) @@ -89,11 +89,11 @@ describe('permissions controller', function () { assert.deepEqual( aAccounts, [ACCOUNTS.a.primary], - 'first origin should have correct accounts' + 'first origin should have correct accounts', ) assert.deepEqual( bAccounts, [ACCOUNTS.b.primary], - 'second origin should have correct accounts' + 'second origin should have correct accounts', ) }) @@ -115,38 +115,38 @@ describe('permissions controller', function () { const permController = initPermController() grantPermissions( permController, DOMAINS.a.origin, - PERMS.finalizedRequests.eth_accounts(ACCOUNTS.a.permitted) + PERMS.finalizedRequests.eth_accounts(ACCOUNTS.a.permitted), ) grantPermissions( permController, DOMAINS.b.origin, - PERMS.finalizedRequests.test_method() + PERMS.finalizedRequests.test_method(), ) assert.ok( permController.hasPermission(DOMAINS.a.origin, 'eth_accounts'), - 'should return true for granted permission' + 'should return true for granted permission', ) assert.ok( permController.hasPermission(DOMAINS.b.origin, 'test_method'), - 'should return true for granted permission' + 'should return true for granted permission', ) assert.ok( !permController.hasPermission(DOMAINS.a.origin, 'test_method'), - 'should return false for non-granted permission' + 'should return false for non-granted permission', ) assert.ok( !permController.hasPermission(DOMAINS.b.origin, 'eth_accounts'), - 'should return true for non-granted permission' + 'should return true for non-granted permission', ) assert.ok( !permController.hasPermission('foo', 'eth_accounts'), - 'should return false for unknown origin' + 'should return false for unknown origin', ) assert.ok( !permController.hasPermission(DOMAINS.b.origin, 'foo'), - 'should return false for unknown permission' + 'should return false for unknown permission', ) }) }) @@ -160,15 +160,15 @@ describe('permissions controller', function () { grantPermissions( permController, DOMAINS.a.origin, - PERMS.finalizedRequests.eth_accounts(ACCOUNTS.a.permitted) + PERMS.finalizedRequests.eth_accounts(ACCOUNTS.a.permitted), ) grantPermissions( permController, DOMAINS.b.origin, - PERMS.finalizedRequests.eth_accounts(ACCOUNTS.b.permitted) + PERMS.finalizedRequests.eth_accounts(ACCOUNTS.b.permitted), ) grantPermissions( permController, DOMAINS.c.origin, - PERMS.finalizedRequests.eth_accounts(ACCOUNTS.c.permitted) + PERMS.finalizedRequests.eth_accounts(ACCOUNTS.c.permitted), ) let aAccounts = await permController.getAccounts(DOMAINS.a.origin) @@ -178,15 +178,15 @@ describe('permissions controller', function () { assert.deepEqual( aAccounts, [ACCOUNTS.a.primary], - 'first origin should have correct accounts' + 'first origin should have correct accounts', ) assert.deepEqual( bAccounts, [ACCOUNTS.b.primary], - 'second origin should have correct accounts' + 'second origin should have correct accounts', ) assert.deepEqual( cAccounts, [ACCOUNTS.c.primary], - 'third origin should have correct accounts' + 'third origin should have correct accounts', ) permController.clearPermissions() @@ -211,13 +211,13 @@ describe('permissions controller', function () { assert.deepEqual( permController.permissions.getPermissionsForDomain(origin), [], - 'origin should have no permissions' + 'origin should have no permissions', ) }) assert.deepEqual( Object.keys(permController.permissions.getDomains()), [], - 'all domains should be deleted' + 'all domains should be deleted', ) }) }) @@ -231,11 +231,11 @@ describe('permissions controller', function () { permController = initPermController(notifications) grantPermissions( permController, DOMAINS.a.origin, - PERMS.finalizedRequests.eth_accounts(ACCOUNTS.a.permitted) + PERMS.finalizedRequests.eth_accounts(ACCOUNTS.a.permitted), ) grantPermissions( permController, DOMAINS.b.origin, - PERMS.finalizedRequests.eth_accounts(ACCOUNTS.b.permitted) + PERMS.finalizedRequests.eth_accounts(ACCOUNTS.b.permitted), ) }) @@ -246,11 +246,11 @@ describe('permissions controller', function () { assert.deepEqual( aAccounts, [ACCOUNTS.a.primary], - 'first origin should have correct accounts' + 'first origin should have correct accounts', ) assert.deepEqual( bAccounts, [ACCOUNTS.b.primary], - 'second origin should have correct accounts' + 'second origin should have correct accounts', ) permController.removePermissionsFor({ @@ -266,23 +266,23 @@ describe('permissions controller', function () { assert.deepEqual( notifications[DOMAINS.a.origin], [NOTIFICATIONS.removedAccounts()], - 'first origin should have correct notification' + 'first origin should have correct notification', ) assert.deepEqual( notifications[DOMAINS.b.origin], [NOTIFICATIONS.removedAccounts()], - 'second origin should have correct notification' + 'second origin should have correct notification', ) assert.deepEqual( Object.keys(permController.permissions.getDomains()), [], - 'all domains should be deleted' + 'all domains should be deleted', ) }) it('only removes targeted permissions from single domain', async function () { grantPermissions( - permController, DOMAINS.b.origin, PERMS.finalizedRequests.test_method() + permController, DOMAINS.b.origin, PERMS.finalizedRequests.test_method(), ) let bPermissions = permController.permissions.getPermissionsForDomain(DOMAINS.b.origin) @@ -293,7 +293,7 @@ describe('permissions controller', function () { find(bPermissions, { parentCapability: PERM_NAMES.eth_accounts }) && find(bPermissions, { parentCapability: PERM_NAMES.test_method }) ), - 'origin should have correct permissions' + 'origin should have correct permissions', ) permController.removePermissionsFor({ @@ -307,7 +307,7 @@ describe('permissions controller', function () { bPermissions.length === 1 && find(bPermissions, { parentCapability: PERM_NAMES.eth_accounts }) ), - 'only targeted permission should have been removed' + 'only targeted permission should have been removed', ) }) @@ -322,22 +322,22 @@ describe('permissions controller', function () { assert.deepEqual( aAccounts, [ACCOUNTS.a.primary], - 'first origin should have correct accounts' + 'first origin should have correct accounts', ) assert.deepEqual(bAccounts, [], 'second origin should have no accounts') assert.deepEqual( notifications[DOMAINS.a.origin], [], - 'first origin should have no notifications' + 'first origin should have no notifications', ) assert.deepEqual( notifications[DOMAINS.b.origin], [NOTIFICATIONS.removedAccounts()], - 'second origin should have correct notification' + 'second origin should have correct notification', ) assert.deepEqual( Object.keys(permController.permissions.getDomains()), [DOMAINS.a.origin], - 'only first origin should remain' + 'only first origin should remain', ) }) @@ -350,7 +350,7 @@ describe('permissions controller', function () { assert.deepEqual( notifications[DOMAINS.c.origin], [NOTIFICATIONS.removedAccounts()], - 'unknown origin should have notification' + 'unknown origin should have notification', ) const aAccounts = await permController.getAccounts(DOMAINS.a.origin) @@ -358,17 +358,17 @@ describe('permissions controller', function () { assert.deepEqual( aAccounts, [ACCOUNTS.a.primary], - 'first origin should have correct accounts' + 'first origin should have correct accounts', ) assert.deepEqual( bAccounts, [ACCOUNTS.b.primary], - 'second origin should have correct accounts' + 'second origin should have correct accounts', ) assert.deepEqual( Object.keys(permController.permissions.getDomains()), [DOMAINS.a.origin, DOMAINS.b.origin], - 'should have correct domains' + 'should have correct domains', ) }) }) @@ -381,11 +381,11 @@ describe('permissions controller', function () { permController = initPermController() grantPermissions( permController, DOMAINS.a.origin, - PERMS.finalizedRequests.eth_accounts(ACCOUNTS.a.permitted) + PERMS.finalizedRequests.eth_accounts(ACCOUNTS.a.permitted), ) grantPermissions( permController, DOMAINS.b.origin, - PERMS.finalizedRequests.eth_accounts(ACCOUNTS.b.permitted) + PERMS.finalizedRequests.eth_accounts(ACCOUNTS.b.permitted), ) }) @@ -394,25 +394,25 @@ describe('permissions controller', function () { await assert.throws( () => permController.validatePermittedAccounts(undefined), ERRORS.validatePermittedAccounts.invalidParam(), - 'should throw on undefined' + 'should throw on undefined', ) await assert.throws( () => permController.validatePermittedAccounts(false), ERRORS.validatePermittedAccounts.invalidParam(), - 'should throw on false' + 'should throw on false', ) await assert.throws( () => permController.validatePermittedAccounts(true), ERRORS.validatePermittedAccounts.invalidParam(), - 'should throw on true' + 'should throw on true', ) await assert.throws( () => permController.validatePermittedAccounts({}), ERRORS.validatePermittedAccounts.invalidParam(), - 'should throw on non-array object' + 'should throw on non-array object', ) }) @@ -421,7 +421,7 @@ describe('permissions controller', function () { await assert.throws( () => permController.validatePermittedAccounts([]), ERRORS.validatePermittedAccounts.invalidParam(), - 'should throw on empty array' + 'should throw on empty array', ) }) @@ -432,13 +432,13 @@ describe('permissions controller', function () { await assert.throws( () => permController.validatePermittedAccounts([DUMMY_ACCOUNT]), ERRORS.validatePermittedAccounts.nonKeyringAccount(DUMMY_ACCOUNT), - 'should throw on non-keyring account' + 'should throw on non-keyring account', ) await assert.throws( () => permController.validatePermittedAccounts(keyringAccounts.concat(DUMMY_ACCOUNT)), ERRORS.validatePermittedAccounts.nonKeyringAccount(DUMMY_ACCOUNT), - 'should throw on non-keyring account with other accounts' + 'should throw on non-keyring account with other accounts', ) }) @@ -448,17 +448,17 @@ describe('permissions controller', function () { await assert.doesNotThrow( () => permController.validatePermittedAccounts(keyringAccounts), - 'should not throw on all keyring accounts' + 'should not throw on all keyring accounts', ) await assert.doesNotThrow( () => permController.validatePermittedAccounts([ keyringAccounts[0] ]), - 'should not throw on single keyring account' + 'should not throw on single keyring account', ) await assert.doesNotThrow( () => permController.validatePermittedAccounts([ keyringAccounts[1] ]), - 'should not throw on single keyring account' + 'should not throw on single keyring account', ) }) }) @@ -471,11 +471,11 @@ describe('permissions controller', function () { permController = initPermController(notifications) grantPermissions( permController, DOMAINS.a.origin, - PERMS.finalizedRequests.eth_accounts(ACCOUNTS.a.permitted) + PERMS.finalizedRequests.eth_accounts(ACCOUNTS.a.permitted), ) grantPermissions( permController, DOMAINS.b.origin, - PERMS.finalizedRequests.eth_accounts(ACCOUNTS.b.permitted) + PERMS.finalizedRequests.eth_accounts(ACCOUNTS.b.permitted), ) }) @@ -483,7 +483,7 @@ describe('permissions controller', function () { await assert.rejects( () => permController.addPermittedAccount(DOMAINS.a.origin, {}), ERRORS.validatePermittedAccounts.nonKeyringAccount({}), - 'should throw on non-string account param' + 'should throw on non-string account param', ) }) @@ -491,7 +491,7 @@ describe('permissions controller', function () { await assert.rejects( () => permController.addPermittedAccount(DOMAINS.a.origin, DUMMY_ACCOUNT), ERRORS.validatePermittedAccounts.nonKeyringAccount(DUMMY_ACCOUNT), - 'should throw on non-keyring account' + 'should throw on non-keyring account', ) }) @@ -499,7 +499,7 @@ describe('permissions controller', function () { await assert.rejects( () => permController.addPermittedAccount(false, EXTRA_ACCOUNT), ERRORS.addPermittedAccount.invalidOrigin(), - 'should throw on invalid origin' + 'should throw on invalid origin', ) }) @@ -507,20 +507,20 @@ describe('permissions controller', function () { await assert.rejects( () => permController.addPermittedAccount(DOMAINS.c.origin, EXTRA_ACCOUNT), ERRORS.addPermittedAccount.invalidOrigin(), - 'should throw on origin without permissions' + 'should throw on origin without permissions', ) }) it('should throw if origin lacks eth_accounts permission', async function () { grantPermissions( permController, DOMAINS.c.origin, - PERMS.finalizedRequests.test_method() + PERMS.finalizedRequests.test_method(), ) await assert.rejects( () => permController.addPermittedAccount(DOMAINS.c.origin, EXTRA_ACCOUNT), ERRORS.addPermittedAccount.noEthAccountsPermission(), - 'should throw on origin without eth_accounts permission' + 'should throw on origin without eth_accounts permission', ) }) @@ -528,7 +528,7 @@ describe('permissions controller', function () { await assert.rejects( () => permController.addPermittedAccount(DOMAINS.a.origin, ACCOUNTS.a.permitted[0]), ERRORS.addPermittedAccount.alreadyPermitted(), - 'should throw if account is already permitted' + 'should throw if account is already permitted', ) }) @@ -539,13 +539,13 @@ describe('permissions controller', function () { assert.deepEqual( accounts, [...ACCOUNTS.a.permitted, EXTRA_ACCOUNT], - 'origin should have correct accounts' + 'origin should have correct accounts', ) assert.deepEqual( notifications[DOMAINS.a.origin][0], NOTIFICATIONS.newAccounts([ACCOUNTS.a.primary]), - 'origin should have correct notification' + 'origin should have correct notification', ) }) }) @@ -558,11 +558,11 @@ describe('permissions controller', function () { permController = initPermController(notifications) grantPermissions( permController, DOMAINS.a.origin, - PERMS.finalizedRequests.eth_accounts(ACCOUNTS.a.permitted) + PERMS.finalizedRequests.eth_accounts(ACCOUNTS.a.permitted), ) grantPermissions( permController, DOMAINS.b.origin, - PERMS.finalizedRequests.eth_accounts(ACCOUNTS.b.permitted) + PERMS.finalizedRequests.eth_accounts(ACCOUNTS.b.permitted), ) }) @@ -570,7 +570,7 @@ describe('permissions controller', function () { await assert.rejects( () => permController.removePermittedAccount(DOMAINS.a.origin, {}), ERRORS.validatePermittedAccounts.nonKeyringAccount({}), - 'should throw on non-string account param' + 'should throw on non-string account param', ) }) @@ -578,7 +578,7 @@ describe('permissions controller', function () { await assert.rejects( () => permController.removePermittedAccount(DOMAINS.a.origin, DUMMY_ACCOUNT), ERRORS.validatePermittedAccounts.nonKeyringAccount(DUMMY_ACCOUNT), - 'should throw on non-keyring account' + 'should throw on non-keyring account', ) }) @@ -586,7 +586,7 @@ describe('permissions controller', function () { await assert.rejects( () => permController.removePermittedAccount(false, EXTRA_ACCOUNT), ERRORS.removePermittedAccount.invalidOrigin(), - 'should throw on invalid origin' + 'should throw on invalid origin', ) }) @@ -594,20 +594,20 @@ describe('permissions controller', function () { await assert.rejects( () => permController.removePermittedAccount(DOMAINS.c.origin, EXTRA_ACCOUNT), ERRORS.removePermittedAccount.invalidOrigin(), - 'should throw on origin without permissions' + 'should throw on origin without permissions', ) }) it('should throw if origin lacks eth_accounts permission', async function () { grantPermissions( permController, DOMAINS.c.origin, - PERMS.finalizedRequests.test_method() + PERMS.finalizedRequests.test_method(), ) await assert.rejects( () => permController.removePermittedAccount(DOMAINS.c.origin, EXTRA_ACCOUNT), ERRORS.removePermittedAccount.noEthAccountsPermission(), - 'should throw on origin without eth_accounts permission' + 'should throw on origin without eth_accounts permission', ) }) @@ -615,7 +615,7 @@ describe('permissions controller', function () { await assert.rejects( () => permController.removePermittedAccount(DOMAINS.b.origin, ACCOUNTS.c.permitted[0]), ERRORS.removePermittedAccount.notPermitted(), - 'should throw if account is not permitted' + 'should throw if account is not permitted', ) }) @@ -626,13 +626,13 @@ describe('permissions controller', function () { assert.deepEqual( accounts, ACCOUNTS.a.permitted.filter((acc) => acc !== ACCOUNTS.a.permitted[1]), - 'origin should have correct accounts' + 'origin should have correct accounts', ) assert.deepEqual( notifications[DOMAINS.a.origin][0], NOTIFICATIONS.newAccounts([ACCOUNTS.a.primary]), - 'origin should have correct notification' + 'origin should have correct notification', ) }) @@ -643,11 +643,11 @@ describe('permissions controller', function () { assert.deepEqual( accounts, [], - 'origin should have no accounts' + 'origin should have no accounts', ) const permission = await permController.permissions.getPermission( - DOMAINS.b.origin, PERM_NAMES.eth_accounts + DOMAINS.b.origin, PERM_NAMES.eth_accounts, ) assert.equal(permission, undefined, 'origin should not have eth_accounts permission') @@ -655,7 +655,7 @@ describe('permissions controller', function () { assert.deepEqual( notifications[DOMAINS.b.origin][0], NOTIFICATIONS.removedAccounts(), - 'origin should have correct notification' + 'origin should have correct notification', ) }) }) @@ -669,15 +669,15 @@ describe('permissions controller', function () { permController = initPermController(notifications) grantPermissions( permController, DOMAINS.a.origin, - PERMS.finalizedRequests.eth_accounts(ACCOUNTS.a.permitted) + PERMS.finalizedRequests.eth_accounts(ACCOUNTS.a.permitted), ) grantPermissions( permController, DOMAINS.b.origin, - PERMS.finalizedRequests.eth_accounts(ACCOUNTS.b.permitted) + PERMS.finalizedRequests.eth_accounts(ACCOUNTS.b.permitted), ) grantPermissions( permController, DOMAINS.c.origin, - PERMS.finalizedRequests.eth_accounts(ACCOUNTS.b.permitted) + PERMS.finalizedRequests.eth_accounts(ACCOUNTS.b.permitted), ) }) @@ -685,7 +685,7 @@ describe('permissions controller', function () { await assert.rejects( () => permController.removeAllAccountPermissions({}), ERRORS.validatePermittedAccounts.nonKeyringAccount({}), - 'should throw on non-string account param' + 'should throw on non-string account param', ) }) @@ -693,7 +693,7 @@ describe('permissions controller', function () { await assert.rejects( () => permController.removeAllAccountPermissions(DUMMY_ACCOUNT), ERRORS.validatePermittedAccounts.nonKeyringAccount(DUMMY_ACCOUNT), - 'should throw on non-keyring account' + 'should throw on non-keyring account', ) }) @@ -704,13 +704,13 @@ describe('permissions controller', function () { assert.deepEqual( accounts, ACCOUNTS.a.permitted.filter((acc) => acc !== ACCOUNTS.a.permitted[1]), - 'origin should have correct accounts' + 'origin should have correct accounts', ) assert.deepEqual( notifications[DOMAINS.a.origin][0], NOTIFICATIONS.newAccounts([ACCOUNTS.a.primary]), - 'origin should have correct notification' + 'origin should have correct notification', ) }) @@ -720,25 +720,25 @@ describe('permissions controller', function () { const bAccounts = await permController.getAccounts(DOMAINS.b.origin) assert.deepEqual( bAccounts, [], - 'first origin should no accounts' + 'first origin should no accounts', ) const cAccounts = await permController.getAccounts(DOMAINS.c.origin) assert.deepEqual( cAccounts, [], - 'second origin no accounts' + 'second origin no accounts', ) assert.deepEqual( notifications[DOMAINS.b.origin][0], NOTIFICATIONS.removedAccounts(), - 'first origin should have correct notification' + 'first origin should have correct notification', ) assert.deepEqual( notifications[DOMAINS.c.origin][0], NOTIFICATIONS.removedAccounts(), - 'second origin should have correct notification' + 'second origin should have correct notification', ) }) @@ -749,11 +749,11 @@ describe('permissions controller', function () { assert.deepEqual( accounts, [], - 'origin should have no accounts' + 'origin should have no accounts', ) const permission = await permController.permissions.getPermission( - DOMAINS.b.origin, PERM_NAMES.eth_accounts + DOMAINS.b.origin, PERM_NAMES.eth_accounts, ) assert.equal(permission, undefined, 'origin should not have eth_accounts permission') @@ -761,7 +761,7 @@ describe('permissions controller', function () { assert.deepEqual( notifications[DOMAINS.b.origin][0], NOTIFICATIONS.removedAccounts(), - 'origin should have correct notification' + 'origin should have correct notification', ) }) }) @@ -778,10 +778,10 @@ describe('permissions controller', function () { await assert.rejects( permController.finalizePermissionsRequest( - PERMS.requests.eth_accounts(), [DUMMY_ACCOUNT] + PERMS.requests.eth_accounts(), [DUMMY_ACCOUNT], ), ERRORS.validatePermittedAccounts.nonKeyringAccount(DUMMY_ACCOUNT), - 'should throw on non-keyring account' + 'should throw on non-keyring account', ) }) @@ -804,7 +804,7 @@ describe('permissions controller', function () { assert.deepEqual( perm, PERMS.finalizedRequests.eth_accounts(ACCOUNTS.b.permitted), - 'permission should have correct caveat' + 'permission should have correct caveat', ) }) @@ -817,7 +817,7 @@ describe('permissions controller', function () { assert.deepEqual( perm, PERMS.finalizedRequests.test_method(), - 'permission should have correct caveat' + 'permission should have correct caveat', ) }) }) @@ -832,7 +832,7 @@ describe('permissions controller', function () { identities[account] = {} return identities }, - {} + {}, ) preferences = { getState: sinon.stub(), @@ -851,11 +851,11 @@ describe('permissions controller', function () { }) grantPermissions( permController, DOMAINS.b.origin, - PERMS.finalizedRequests.eth_accounts([...ACCOUNTS.a.permitted, EXTRA_ACCOUNT]) + PERMS.finalizedRequests.eth_accounts([...ACCOUNTS.a.permitted, EXTRA_ACCOUNT]), ) grantPermissions( permController, DOMAINS.c.origin, - PERMS.finalizedRequests.eth_accounts(ACCOUNTS.a.permitted) + PERMS.finalizedRequests.eth_accounts(ACCOUNTS.a.permitted), ) }) @@ -868,7 +868,7 @@ describe('permissions controller', function () { await assert.rejects( () => onPreferencesUpdate({ selectedAddress: {} }), ERRORS._handleAccountSelected.invalidParams(), - 'should throw if account is not a string' + 'should throw if account is not a string', ) }) @@ -881,11 +881,11 @@ describe('permissions controller', function () { assert.deepEqual( notifications[DOMAINS.b.origin], [], - 'should not have emitted notification' + 'should not have emitted notification', ) assert.deepEqual( notifications[DOMAINS.c.origin], [], - 'should not have emitted notification' + 'should not have emitted notification', ) }) @@ -900,12 +900,12 @@ describe('permissions controller', function () { assert.deepEqual( notifications[DOMAINS.b.origin], [NOTIFICATIONS.newAccounts([ACCOUNTS.a.primary])], - 'should not have emitted notification' + 'should not have emitted notification', ) assert.deepEqual( notifications[DOMAINS.c.origin], [NOTIFICATIONS.newAccounts([ACCOUNTS.a.primary])], - 'should not have emitted notification' + 'should not have emitted notification', ) }) @@ -920,11 +920,11 @@ describe('permissions controller', function () { assert.deepEqual( notifications[DOMAINS.b.origin], [NOTIFICATIONS.newAccounts([EXTRA_ACCOUNT])], - 'should have emitted notification' + 'should have emitted notification', ) assert.deepEqual( notifications[DOMAINS.c.origin], [], - 'should not have emitted notification' + 'should not have emitted notification', ) }) @@ -939,12 +939,12 @@ describe('permissions controller', function () { assert.deepEqual( notifications[DOMAINS.b.origin], [NOTIFICATIONS.newAccounts([ACCOUNTS.a.permitted[1]])], - 'should have emitted notification' + 'should have emitted notification', ) assert.deepEqual( notifications[DOMAINS.c.origin], [NOTIFICATIONS.newAccounts([ACCOUNTS.c.primary])], - 'should have emitted notification' + 'should have emitted notification', ) }) }) @@ -956,7 +956,7 @@ describe('permissions controller', function () { beforeEach(function () { permController = initPermController() mockRequestUserApproval = getMockRequestUserApprovalFunction( - permController + permController, ) }) @@ -973,12 +973,12 @@ describe('permissions controller', function () { await assert.doesNotReject( permController.approvePermissionsRequest(request, null), - 'should not throw on non-existing request' + 'should not throw on non-existing request', ) assert.ok( permController.finalizePermissionsRequest.notCalled, - 'should not call finalizePermissionRequest' + 'should not call finalizePermissionRequest', ) assert.equal( @@ -991,13 +991,13 @@ describe('permissions controller', function () { const request = PERMS.approvedRequest( REQUEST_IDS.a, - PERMS.requests.eth_accounts() + PERMS.requests.eth_accounts(), ) const requestRejection = assert.rejects( mockRequestUserApproval(REQUEST_IDS.a), ERRORS.validatePermittedAccounts.invalidParam(), - 'should reject bad accounts' + 'should reject bad accounts', ) await permController.approvePermissionsRequest(request, null) @@ -1016,7 +1016,7 @@ describe('permissions controller', function () { const requestRejection = assert.rejects( mockRequestUserApproval(REQUEST_IDS.a), ERRORS.approvePermissionsRequest.noPermsRequested(), - 'should reject if no permissions in request' + 'should reject if no permissions in request', ) await permController.approvePermissionsRequest(request, ACCOUNTS.a.permitted) @@ -1038,7 +1038,7 @@ describe('permissions controller', function () { async () => { perms = await mockRequestUserApproval(REQUEST_IDS.a) }, - 'should not reject single valid request' + 'should not reject single valid request', ) await permController.approvePermissionsRequest(request, ACCOUNTS.a.permitted) @@ -1046,7 +1046,7 @@ describe('permissions controller', function () { assert.deepEqual( perms, PERMS.finalizedRequests.eth_accounts(ACCOUNTS.a.permitted), - 'should produce expected approved permissions' + 'should produce expected approved permissions', ) assert.equal( @@ -1067,14 +1067,14 @@ describe('permissions controller', function () { async () => { perms1 = await mockRequestUserApproval(REQUEST_IDS.a) }, - 'should not reject request' + 'should not reject request', ) const approval2 = assert.doesNotReject( async () => { perms2 = await mockRequestUserApproval(REQUEST_IDS.b) }, - 'should not reject request' + 'should not reject request', ) // approve out of order @@ -1088,12 +1088,12 @@ describe('permissions controller', function () { assert.deepEqual( perms1, PERMS.finalizedRequests.eth_accounts(ACCOUNTS.a.permitted), - 'first request should produce expected approved permissions' + 'first request should produce expected approved permissions', ) assert.deepEqual( perms2, PERMS.finalizedRequests.eth_accounts(ACCOUNTS.b.permitted), - 'second request should produce expected approved permissions' + 'second request should produce expected approved permissions', ) assert.equal( @@ -1110,7 +1110,7 @@ describe('permissions controller', function () { beforeEach(async function () { permController = initPermController() mockRequestUserApproval = getMockRequestUserApprovalFunction( - permController + permController, ) }) @@ -1123,7 +1123,7 @@ describe('permissions controller', function () { await assert.doesNotReject( permController.rejectPermissionsRequest(REQUEST_IDS.a), - 'should not throw on non-existing request' + 'should not throw on non-existing request', ) assert.equal( @@ -1137,7 +1137,7 @@ describe('permissions controller', function () { const requestRejection = assert.rejects( mockRequestUserApproval(REQUEST_IDS.a), ERRORS.rejectPermissionsRequest.rejection(), - 'should reject with expected error' + 'should reject with expected error', ) await permController.rejectPermissionsRequest(REQUEST_IDS.a) @@ -1154,13 +1154,13 @@ describe('permissions controller', function () { const requestRejection1 = assert.rejects( mockRequestUserApproval(REQUEST_IDS.b), ERRORS.rejectPermissionsRequest.rejection(), - 'should reject with expected error' + 'should reject with expected error', ) const requestRejection2 = assert.rejects( mockRequestUserApproval(REQUEST_IDS.c), ERRORS.rejectPermissionsRequest.rejection(), - 'should reject with expected error' + 'should reject with expected error', ) // reject out of order @@ -1198,19 +1198,19 @@ describe('permissions controller', function () { assert.throws( () => permController.createMiddleware({ origin: {} }), ERRORS.createMiddleware.badOrigin(), - 'should throw expected error' + 'should throw expected error', ) assert.throws( () => permController.createMiddleware({ origin: '' }), ERRORS.createMiddleware.badOrigin(), - 'should throw expected error' + 'should throw expected error', ) assert.throws( () => permController.createMiddleware({}), ERRORS.createMiddleware.badOrigin(), - 'should throw expected error' + 'should throw expected error', ) }) @@ -1221,17 +1221,17 @@ describe('permissions controller', function () { () => { middleware = permController.createMiddleware({ origin: DOMAINS.a.origin }) }, - 'should not throw' + 'should not throw', ) assert.equal( typeof middleware, 'function', - 'should return function' + 'should return function', ) assert.equal( middleware.name, 'engineAsMiddleware', - 'function name should be "engineAsMiddleware"' + 'function name should be "engineAsMiddleware"', ) }) @@ -1247,24 +1247,24 @@ describe('permissions controller', function () { extensionId, }) }, - 'should not throw' + 'should not throw', ) assert.equal( typeof middleware, 'function', - 'should return function' + 'should return function', ) assert.equal( middleware.name, 'engineAsMiddleware', - 'function name should be "engineAsMiddleware"' + 'function name should be "engineAsMiddleware"', ) const metadataStore = permController.store.getState()[METADATA_STORE_KEY] assert.deepEqual( metadataStore[DOMAINS.a.origin], { extensionId, lastUpdated: 1 }, - 'metadata should be stored' + 'metadata should be stored', ) }) }) @@ -1288,13 +1288,13 @@ describe('permissions controller', function () { assert.ok( permController.permissionsLog.updateAccountsHistory.calledOnce, - 'permissionsLog.updateAccountsHistory should have been called once' + 'permissionsLog.updateAccountsHistory should have been called once', ) assert.deepEqual( notifications[DOMAINS.a.origin], [ NOTIFICATIONS.newAccounts(ACCOUNTS.a.permitted) ], - 'origin should have correct notification' + 'origin should have correct notification', ) }) @@ -1306,7 +1306,7 @@ describe('permissions controller', function () { ACCOUNTS.a.permitted, ), ERRORS.notifyAccountsChanged.invalidOrigin(4), - 'should throw expected error for non-string origin' + 'should throw expected error for non-string origin', ) assert.throws( @@ -1315,7 +1315,7 @@ describe('permissions controller', function () { ACCOUNTS.a.permitted, ), ERRORS.notifyAccountsChanged.invalidOrigin(''), - 'should throw expected error for empty string origin' + 'should throw expected error for empty string origin', ) }) @@ -1327,7 +1327,7 @@ describe('permissions controller', function () { 4, ), ERRORS.notifyAccountsChanged.invalidAccounts(), - 'should throw expected error for truthy non-array accounts' + 'should throw expected error for truthy non-array accounts', ) assert.throws( @@ -1336,7 +1336,7 @@ describe('permissions controller', function () { null, ), ERRORS.notifyAccountsChanged.invalidAccounts(), - 'should throw expected error for falsy non-array accounts' + 'should throw expected error for falsy non-array accounts', ) }) }) @@ -1378,11 +1378,11 @@ describe('permissions controller', function () { assert.ok( permController.store.getState.called, - 'should have called store.getState' + 'should have called store.getState', ) assert.equal( permController._setDomainMetadata.getCalls().length, 1, - 'should have called _setDomainMetadata once' + 'should have called _setDomainMetadata once', ) assert.deepEqual( permController._setDomainMetadata.lastCall.args, @@ -1395,7 +1395,7 @@ describe('permissions controller', function () { host: DOMAINS.b.host, lastUpdated: 1, }, - }] + }], ) }) @@ -1416,11 +1416,11 @@ describe('permissions controller', function () { assert.ok( permController.store.getState.called, - 'should have called store.getState' + 'should have called store.getState', ) assert.equal( permController._setDomainMetadata.getCalls().length, 1, - 'should have called _setDomainMetadata once' + 'should have called _setDomainMetadata once', ) assert.deepEqual( permController._setDomainMetadata.lastCall.args, @@ -1434,7 +1434,7 @@ describe('permissions controller', function () { host: DOMAINS.b.host, lastUpdated: 1, }, - }] + }], ) }) @@ -1459,7 +1459,7 @@ describe('permissions controller', function () { assert.ok( permController.store.getState.called, - 'should have called store.getState' + 'should have called store.getState', ) const expectedMetadata = { @@ -1474,11 +1474,11 @@ describe('permissions controller', function () { assert.ok( permController._pendingSiteMetadata.delete.calledOnceWithExactly(expectedDeletedOrigin), - 'should have called _pendingSiteMetadata.delete once' + 'should have called _pendingSiteMetadata.delete once', ) assert.equal( permController._setDomainMetadata.getCalls().length, 1, - 'should have called _setDomainMetadata once' + 'should have called _setDomainMetadata once', ) assert.deepEqual( permController._setDomainMetadata.lastCall.args, @@ -1506,14 +1506,14 @@ describe('permissions controller', function () { assert.equal( permController.permissions.getDomains.getCalls().length, 1, - 'should have called permissions.getDomains once' + 'should have called permissions.getDomains once', ) assert.deepEqual( metadataResult, { [DOMAINS.a.origin]: {}, }, - 'should have produced expected state' + 'should have produced expected state', ) }) }) @@ -1549,7 +1549,7 @@ describe('permissions controller', function () { assert.throws( () => permController._addPendingApproval(otherId, origin, noop, noop), ERRORS.pendingApprovals.duplicateOriginOrId(otherId, origin), - 'should throw expected error' + 'should throw expected error', ) assert.equal( @@ -1565,7 +1565,7 @@ describe('permissions controller', function () { assert.deepEqual( permController.pendingApprovals.get(id), { origin, resolve: noop, reject: noop }, - 'pending approvals should have expected entry' + 'pending approvals should have expected entry', ) assert.ok( diff --git a/test/unit/app/controllers/permissions/permissions-log-controller-test.js b/test/unit/app/controllers/permissions/permissions-log-controller-test.js index fa2e32889..d6e3482c6 100644 --- a/test/unit/app/controllers/permissions/permissions-log-controller-test.js +++ b/test/unit/app/controllers/permissions/permissions-log-controller-test.js @@ -100,7 +100,7 @@ describe('permissions log', function () { assert.equal(log.length, 1, 'log should have single entry') validateActivityEntry( entry1, { ...req }, { ...res }, - LOG_METHOD_TYPES.restricted, true + LOG_METHOD_TYPES.restricted, true, ) // eth_accounts, failure @@ -117,7 +117,7 @@ describe('permissions log', function () { assert.equal(log.length, 2, 'log should have 2 entries') validateActivityEntry( entry2, { ...req }, { ...res }, - LOG_METHOD_TYPES.restricted, false + LOG_METHOD_TYPES.restricted, false, ) // eth_requestAccounts, success @@ -134,7 +134,7 @@ describe('permissions log', function () { assert.equal(log.length, 3, 'log should have 3 entries') validateActivityEntry( entry3, { ...req }, { ...res }, - LOG_METHOD_TYPES.restricted, true + LOG_METHOD_TYPES.restricted, true, ) // test_method, no response @@ -151,7 +151,7 @@ describe('permissions log', function () { assert.equal(log.length, 4, 'log should have 4 entries') validateActivityEntry( entry4, { ...req }, null, - LOG_METHOD_TYPES.restricted, false + LOG_METHOD_TYPES.restricted, false, ) // validate final state @@ -199,7 +199,7 @@ describe('permissions log', function () { entry2.id === id2 && entry2.response === null && entry3.id === id3 && entry3.response === null ), - 'all entries should be in correct order and without responses' + 'all entries should be in correct order and without responses', ) // call response handlers @@ -216,17 +216,17 @@ describe('permissions log', function () { validateActivityEntry( log[0], { ...req, id: id1 }, { ...res1 }, - LOG_METHOD_TYPES.restricted, true + LOG_METHOD_TYPES.restricted, true, ) validateActivityEntry( log[1], { ...req, id: id2 }, { ...res2 }, - LOG_METHOD_TYPES.restricted, true + LOG_METHOD_TYPES.restricted, true, ) validateActivityEntry( log[2], { ...req, id: id3 }, { ...res3 }, - LOG_METHOD_TYPES.restricted, true + LOG_METHOD_TYPES.restricted, true, ) }) @@ -245,7 +245,7 @@ describe('permissions log', function () { assert.equal(log.length, 1, 'log should have single entry') validateActivityEntry( entry1, { ...req }, null, - LOG_METHOD_TYPES.restricted, true + LOG_METHOD_TYPES.restricted, true, ) // next request should be handled as normal @@ -260,7 +260,7 @@ describe('permissions log', function () { assert.equal(log.length, 2, 'log should have 2 entries') validateActivityEntry( entry2, { ...req }, { ...res }, - LOG_METHOD_TYPES.restricted, true + LOG_METHOD_TYPES.restricted, true, ) // validate final state @@ -301,12 +301,12 @@ describe('permissions log', function () { // check last entry valid let log = permLog.getActivityLog() assert.equal( - log.length, LOG_LIMIT, 'log should have LOG_LIMIT num entries' + log.length, LOG_LIMIT, 'log should have LOG_LIMIT num entries', ) validateActivityEntry( log[LOG_LIMIT - 1], { ...req, id: lastId }, res, - LOG_METHOD_TYPES.restricted, true + LOG_METHOD_TYPES.restricted, true, ) // store the id of the current second entry @@ -319,18 +319,18 @@ describe('permissions log', function () { // check log length log = permLog.getActivityLog() assert.equal( - log.length, LOG_LIMIT, 'log should have LOG_LIMIT num entries' + log.length, LOG_LIMIT, 'log should have LOG_LIMIT num entries', ) // check first and last entries validateActivityEntry( log[0], { ...req, id: nextFirstId }, res, - LOG_METHOD_TYPES.restricted, true + LOG_METHOD_TYPES.restricted, true, ) validateActivityEntry( log[LOG_LIMIT - 1], { ...req, id: lastId }, res, - LOG_METHOD_TYPES.restricted, true + LOG_METHOD_TYPES.restricted, true, ) }) }) @@ -354,7 +354,7 @@ describe('permissions log', function () { let permHistory const req = RPC_REQUESTS.requestPermission( - DOMAINS.a.origin, PERM_NAMES.test_method + DOMAINS.a.origin, PERM_NAMES.test_method, ) const res = { result: [ PERMS.granted.test_method() ] } @@ -370,18 +370,18 @@ describe('permissions log', function () { permHistory = permLog.getHistory() assert.equal( Object.keys(permHistory).length, 1, - 'history should have single origin' + 'history should have single origin', ) assert.ok( Boolean(permHistory[DOMAINS.a.origin]), - 'history should have expected origin' + 'history should have expected origin', ) }) it('ignores malformed permissions requests', function () { const req = RPC_REQUESTS.requestPermission( - DOMAINS.a.origin, PERM_NAMES.test_method + DOMAINS.a.origin, PERM_NAMES.test_method, ) delete req.params const res = { result: [ PERMS.granted.test_method() ] } @@ -397,7 +397,7 @@ describe('permissions log', function () { let permHistory const req = RPC_REQUESTS.requestPermission( - DOMAINS.a.origin, PERM_NAMES.eth_accounts + DOMAINS.a.origin, PERM_NAMES.eth_accounts, ) const res = { result: [ PERMS.granted.eth_accounts(ACCOUNTS.a.permitted) ], @@ -412,7 +412,7 @@ describe('permissions log', function () { assert.deepEqual( permHistory, EXPECTED_HISTORIES.case1[0], - 'should have correct history' + 'should have correct history', ) // mock permission requested again, with another approved account @@ -428,14 +428,14 @@ describe('permissions log', function () { assert.deepEqual( permHistory, EXPECTED_HISTORIES.case1[1], - 'should have correct history' + 'should have correct history', ) }) it('handles eth_accounts response without caveats', async function () { const req = RPC_REQUESTS.requestPermission( - DOMAINS.a.origin, PERM_NAMES.eth_accounts + DOMAINS.a.origin, PERM_NAMES.eth_accounts, ) const res = { result: [ PERMS.granted.eth_accounts(ACCOUNTS.a.permitted) ], @@ -448,14 +448,14 @@ describe('permissions log', function () { assert.deepEqual( permLog.getHistory(), EXPECTED_HISTORIES.case2[0], - 'should have expected history' + 'should have expected history', ) }) it('handles extra caveats for eth_accounts', async function () { const req = RPC_REQUESTS.requestPermission( - DOMAINS.a.origin, PERM_NAMES.eth_accounts + DOMAINS.a.origin, PERM_NAMES.eth_accounts, ) const res = { result: [ PERMS.granted.eth_accounts(ACCOUNTS.a.permitted) ], @@ -469,7 +469,7 @@ describe('permissions log', function () { assert.deepEqual( permLog.getHistory(), EXPECTED_HISTORIES.case1[0], - 'should have correct history' + 'should have correct history', ) }) @@ -478,7 +478,7 @@ describe('permissions log', function () { it('handles unrequested permissions on the response', async function () { const req = RPC_REQUESTS.requestPermission( - DOMAINS.a.origin, PERM_NAMES.eth_accounts + DOMAINS.a.origin, PERM_NAMES.eth_accounts, ) const res = { result: [ @@ -494,14 +494,14 @@ describe('permissions log', function () { assert.deepEqual( permLog.getHistory(), EXPECTED_HISTORIES.case1[0], - 'should have correct history' + 'should have correct history', ) }) it('does not update history if no new permissions are approved', async function () { let req = RPC_REQUESTS.requestPermission( - DOMAINS.a.origin, PERM_NAMES.test_method + DOMAINS.a.origin, PERM_NAMES.test_method, ) let res = { result: [ @@ -516,7 +516,7 @@ describe('permissions log', function () { assert.deepEqual( permLog.getHistory(), EXPECTED_HISTORIES.case4[0], - 'should have correct history' + 'should have correct history', ) // new permission requested, but not approved @@ -524,7 +524,7 @@ describe('permissions log', function () { clock.tick(1) req = RPC_REQUESTS.requestPermission( - DOMAINS.a.origin, PERM_NAMES.eth_accounts + DOMAINS.a.origin, PERM_NAMES.eth_accounts, ) res = { result: [ @@ -539,7 +539,7 @@ describe('permissions log', function () { assert.deepEqual( permLog.getHistory(), EXPECTED_HISTORIES.case4[0], - 'should have same history as before' + 'should have same history as before', ) }) @@ -555,7 +555,7 @@ describe('permissions log', function () { // first origin round1.push({ req: RPC_REQUESTS.requestPermission( - DOMAINS.a.origin, PERM_NAMES.test_method + DOMAINS.a.origin, PERM_NAMES.test_method, ), res: { result: [ PERMS.granted.test_method() ], @@ -565,7 +565,7 @@ describe('permissions log', function () { // second origin round1.push({ req: RPC_REQUESTS.requestPermission( - DOMAINS.b.origin, PERM_NAMES.eth_accounts + DOMAINS.b.origin, PERM_NAMES.eth_accounts, ), res: { result: [ PERMS.granted.eth_accounts(ACCOUNTS.b.permitted) ], @@ -600,7 +600,7 @@ describe('permissions log', function () { assert.deepEqual( permHistory, EXPECTED_HISTORIES.case3[0], - 'should have expected history' + 'should have expected history', ) // make next round of requests @@ -613,7 +613,7 @@ describe('permissions log', function () { // first origin round2.push({ req: RPC_REQUESTS.requestPermission( - DOMAINS.a.origin, PERM_NAMES.test_method + DOMAINS.a.origin, PERM_NAMES.test_method, ), res: { result: [ PERMS.granted.test_method() ], @@ -644,7 +644,7 @@ describe('permissions log', function () { assert.deepEqual( permHistory, EXPECTED_HISTORIES.case3[1], - 'should have expected history' + 'should have expected history', ) }) }) diff --git a/test/unit/app/controllers/permissions/permissions-middleware-test.js b/test/unit/app/controllers/permissions/permissions-middleware-test.js index 5e513c9f7..b835ea8e8 100644 --- a/test/unit/app/controllers/permissions/permissions-middleware-test.js +++ b/test/unit/app/controllers/permissions/permissions-middleware-test.js @@ -66,13 +66,13 @@ describe('permissions middleware', function () { const aMiddleware = getPermissionsMiddleware(permController, DOMAINS.a.origin) const req = RPC_REQUESTS.requestPermission( - DOMAINS.a.origin, PERM_NAMES.eth_accounts + DOMAINS.a.origin, PERM_NAMES.eth_accounts, ) const res = {} const pendingApproval = assert.doesNotReject( aMiddleware(req, res), - 'should not reject permissions request' + 'should not reject permissions request', ) assert.equal( @@ -88,32 +88,32 @@ describe('permissions middleware', function () { assert.ok( res.result && !res.error, - 'response should have result and no error' + 'response should have result and no error', ) assert.equal( res.result.length, 1, - 'origin should have single approved permission' + 'origin should have single approved permission', ) validatePermission( res.result[0], PERM_NAMES.eth_accounts, DOMAINS.a.origin, - CAVEATS.eth_accounts(ACCOUNTS.a.permitted) + CAVEATS.eth_accounts(ACCOUNTS.a.permitted), ) const aAccounts = await permController.getAccounts(DOMAINS.a.origin) assert.deepEqual( aAccounts, [ACCOUNTS.a.primary], - 'origin should have correct accounts' + 'origin should have correct accounts', ) assert.ok( permController.notifyAccountsChanged.calledOnceWith( DOMAINS.a.origin, aAccounts, ), - 'expected notification call should have been made' + 'expected notification call should have been made', ) }) @@ -124,7 +124,7 @@ describe('permissions middleware', function () { // create first request const req1 = RPC_REQUESTS.requestPermission( - DOMAINS.a.origin, PERM_NAMES.eth_accounts + DOMAINS.a.origin, PERM_NAMES.eth_accounts, ) const res1 = {} @@ -133,7 +133,7 @@ describe('permissions middleware', function () { const pendingApproval1 = assert.doesNotReject( aMiddleware(req1, res1), - 'should not reject permissions request' + 'should not reject permissions request', ) const id1 = permController.pendingApprovals.keys().next().value @@ -144,32 +144,32 @@ describe('permissions middleware', function () { assert.ok( res1.result && !res1.error, - 'response should have result and no error' + 'response should have result and no error', ) assert.equal( res1.result.length, 1, - 'origin should have single approved permission' + 'origin should have single approved permission', ) validatePermission( res1.result[0], PERM_NAMES.eth_accounts, DOMAINS.a.origin, - CAVEATS.eth_accounts(ACCOUNTS.a.permitted) + CAVEATS.eth_accounts(ACCOUNTS.a.permitted), ) const accounts1 = await permController.getAccounts(DOMAINS.a.origin) assert.deepEqual( accounts1, [ACCOUNTS.a.primary], - 'origin should have correct accounts' + 'origin should have correct accounts', ) assert.ok( permController.notifyAccountsChanged.calledOnceWith( DOMAINS.a.origin, accounts1, ), - 'expected notification call should have been made' + 'expected notification call should have been made', ) // create second request @@ -180,7 +180,7 @@ describe('permissions middleware', function () { } const req2 = RPC_REQUESTS.requestPermissions( - DOMAINS.a.origin, { ...requestedPerms2 } + DOMAINS.a.origin, { ...requestedPerms2 }, ) const res2 = {} @@ -189,7 +189,7 @@ describe('permissions middleware', function () { const pendingApproval2 = assert.doesNotReject( aMiddleware(req2, res2), - 'should not reject permissions request' + 'should not reject permissions request', ) const id2 = permController.pendingApprovals.keys().next().value @@ -200,19 +200,19 @@ describe('permissions middleware', function () { assert.ok( res2.result && !res2.error, - 'response should have result and no error' + 'response should have result and no error', ) assert.equal( res2.result.length, 2, - 'origin should have single approved permission' + 'origin should have single approved permission', ) validatePermission( res2.result[0], PERM_NAMES.eth_accounts, DOMAINS.a.origin, - CAVEATS.eth_accounts(ACCOUNTS.b.permitted) + CAVEATS.eth_accounts(ACCOUNTS.b.permitted), ) validatePermission( @@ -224,19 +224,19 @@ describe('permissions middleware', function () { const accounts2 = await permController.getAccounts(DOMAINS.a.origin) assert.deepEqual( accounts2, [ACCOUNTS.b.primary], - 'origin should have correct accounts' + 'origin should have correct accounts', ) assert.equal( permController.notifyAccountsChanged.callCount, 2, - 'should have called notification method 2 times in total' + 'should have called notification method 2 times in total', ) assert.ok( permController.notifyAccountsChanged.lastCall.calledWith( DOMAINS.a.origin, accounts2, ), - 'expected notification call should have been made' + 'expected notification call should have been made', ) }) @@ -245,7 +245,7 @@ describe('permissions middleware', function () { const aMiddleware = getPermissionsMiddleware(permController, DOMAINS.a.origin) const req = RPC_REQUESTS.requestPermission( - DOMAINS.a.origin, PERM_NAMES.eth_accounts + DOMAINS.a.origin, PERM_NAMES.eth_accounts, ) const res = {} @@ -272,17 +272,17 @@ describe('permissions middleware', function () { !res.result && res.error && res.error.message === expectedError.message ), - 'response should have expected error and no result' + 'response should have expected error and no result', ) const aAccounts = await permController.getAccounts(DOMAINS.a.origin) assert.deepEqual( - aAccounts, [], 'origin should have have correct accounts' + aAccounts, [], 'origin should have have correct accounts', ) assert.ok( permController.notifyAccountsChanged.notCalled, - 'should not have called notification method' + 'should not have called notification method', ) }) @@ -294,12 +294,12 @@ describe('permissions middleware', function () { DOMAINS.a.origin, { ...PERMS.requests.does_not_exist(), ...PERMS.requests.test_method(), - } + }, ) const res = {} const expectedError = ERRORS.rejectPermissionsRequest.methodNotFound( - PERM_NAMES.does_not_exist + PERM_NAMES.does_not_exist, ) await assert.rejects( @@ -318,12 +318,12 @@ describe('permissions middleware', function () { !res.result && res.error && res.error.message === expectedError.message ), - 'response should have expected error and no result' + 'response should have expected error and no result', ) assert.ok( permController.notifyAccountsChanged.notCalled, - 'should not have called notification method' + 'should not have called notification method', ) }) @@ -339,25 +339,25 @@ describe('permissions middleware', function () { // create and start processing first request for first origin const reqA1 = RPC_REQUESTS.requestPermission( - DOMAINS.a.origin, PERM_NAMES.test_method + DOMAINS.a.origin, PERM_NAMES.test_method, ) const resA1 = {} const requestApproval1 = assert.doesNotReject( aMiddleware(reqA1, resA1), - 'should not reject permissions request' + 'should not reject permissions request', ) // create and start processing first request for second origin const reqB1 = RPC_REQUESTS.requestPermission( - DOMAINS.b.origin, PERM_NAMES.test_method + DOMAINS.b.origin, PERM_NAMES.test_method, ) const resB1 = {} const requestApproval2 = assert.doesNotReject( bMiddleware(reqB1, resB1), - 'should not reject permissions request' + 'should not reject permissions request', ) assert.equal( @@ -369,7 +369,7 @@ describe('permissions middleware', function () { // which should throw const reqA2 = RPC_REQUESTS.requestPermission( - DOMAINS.a.origin, PERM_NAMES.test_method + DOMAINS.a.origin, PERM_NAMES.test_method, ) const resA2 = {} @@ -384,7 +384,7 @@ describe('permissions middleware', function () { !resA2.result && resA2.error && resA2.error.message === expectedError.message ), - 'response should have expected error and no result' + 'response should have expected error and no result', ) // first requests for both origins should remain @@ -398,7 +398,7 @@ describe('permissions middleware', function () { for (const id of permController.pendingApprovals.keys()) { await permController.approvePermissionsRequest( - PERMS.approvedRequest(id, PERMS.requests.test_method()) + PERMS.approvedRequest(id, PERMS.requests.test_method()), ) } await requestApproval1 @@ -406,20 +406,20 @@ describe('permissions middleware', function () { assert.ok( resA1.result && !resA1.error, - 'first response should have result and no error' + 'first response should have result and no error', ) assert.equal( resA1.result.length, 1, - 'first origin should have single approved permission' + 'first origin should have single approved permission', ) assert.ok( resB1.result && !resB1.error, - 'second response should have result and no error' + 'second response should have result and no error', ) assert.equal( resB1.result.length, 1, - 'second origin should have single approved permission' + 'second origin should have single approved permission', ) assert.equal( @@ -457,7 +457,7 @@ describe('permissions middleware', function () { !res.result && res.error && res.error.code === expectedError.code ), - 'response should have expected error and no result' + 'response should have expected error and no result', ) }) @@ -472,12 +472,12 @@ describe('permissions middleware', function () { await assert.doesNotReject( bMiddleware(req, res), - 'should not reject' + 'should not reject', ) assert.ok( res.result && res.result === 1, - 'response should have correct result' + 'response should have correct result', ) }) }) @@ -499,16 +499,16 @@ describe('permissions middleware', function () { await assert.doesNotReject( aMiddleware(req, res), - 'should not reject' + 'should not reject', ) assert.ok( res.result && !res.error, - 'response should have result and no error' + 'response should have result and no error', ) assert.deepEqual( res.result, [], - 'response should have correct result' + 'response should have correct result', ) }) @@ -518,7 +518,7 @@ describe('permissions middleware', function () { grantPermissions( permController, DOMAINS.a.origin, - PERMS.finalizedRequests.eth_accounts(ACCOUNTS.a.permitted) + PERMS.finalizedRequests.eth_accounts(ACCOUNTS.a.permitted), ) const req = RPC_REQUESTS.eth_accounts(DOMAINS.a.origin) @@ -526,16 +526,16 @@ describe('permissions middleware', function () { await assert.doesNotReject( aMiddleware(req, res), - 'should not reject' + 'should not reject', ) assert.ok( res.result && !res.error, - 'response should have result and no error' + 'response should have result and no error', ) assert.deepEqual( res.result, [ACCOUNTS.a.primary], - 'response should have correct result' + 'response should have correct result', ) }) }) @@ -559,7 +559,7 @@ describe('permissions middleware', function () { const pendingApproval = assert.doesNotReject( aMiddleware(req, res), - 'should not reject permissions request' + 'should not reject permissions request', ) await userApprovalPromise @@ -581,31 +581,31 @@ describe('permissions middleware', function () { assert.equal( perms.length, 1, - 'domain should have correct number of permissions' + 'domain should have correct number of permissions', ) validatePermission( perms[0], PERM_NAMES.eth_accounts, DOMAINS.a.origin, - CAVEATS.eth_accounts(ACCOUNTS.a.permitted) + CAVEATS.eth_accounts(ACCOUNTS.a.permitted), ) // we should also see the accounts on the response assert.ok( res.result && !res.error, - 'response should have result and no error' + 'response should have result and no error', ) assert.deepEqual( res.result, [ACCOUNTS.a.primary], - 'result should have correct accounts' + 'result should have correct accounts', ) // we should also be able to get the accounts independently const aAccounts = await permController.getAccounts(DOMAINS.a.origin) assert.deepEqual( - aAccounts, [ACCOUNTS.a.primary], 'origin should have have correct accounts' + aAccounts, [ACCOUNTS.a.primary], 'origin should have have correct accounts', ) }) @@ -643,12 +643,12 @@ describe('permissions middleware', function () { !res.result && res.error && res.error.message === expectedError.message ), - 'response should have expected error and no result' + 'response should have expected error and no result', ) const aAccounts = await permController.getAccounts(DOMAINS.a.origin) assert.deepEqual( - aAccounts, [], 'origin should have have correct accounts' + aAccounts, [], 'origin should have have correct accounts', ) }) @@ -658,7 +658,7 @@ describe('permissions middleware', function () { grantPermissions( permController, DOMAINS.c.origin, - PERMS.finalizedRequests.eth_accounts(ACCOUNTS.c.permitted) + PERMS.finalizedRequests.eth_accounts(ACCOUNTS.c.permitted), ) const req = RPC_REQUESTS.eth_requestAccounts(DOMAINS.c.origin) @@ -666,16 +666,16 @@ describe('permissions middleware', function () { await assert.doesNotReject( cMiddleware(req, res), - 'should not reject' + 'should not reject', ) assert.ok( res.result && !res.error, - 'response should have result and no error' + 'response should have result and no error', ) assert.deepEqual( res.result, [ACCOUNTS.c.primary], - 'response should have correct result' + 'response should have correct result', ) }) @@ -692,7 +692,7 @@ describe('permissions middleware', function () { grantPermissions( permController, DOMAINS.c.origin, - PERMS.finalizedRequests.eth_accounts(ACCOUNTS.c.permitted) + PERMS.finalizedRequests.eth_accounts(ACCOUNTS.c.permitted), ) const req = RPC_REQUESTS.eth_requestAccounts(DOMAINS.c.origin) @@ -701,13 +701,13 @@ describe('permissions middleware', function () { // this will block until we resolve the unlock Promise const requestApproval = assert.doesNotReject( cMiddleware(req, res), - 'should not reject' + 'should not reject', ) // this will reject because of the already pending request await assert.rejects( cMiddleware({ ...req }, {}), - ERRORS.eth_requestAccounts.requestAlreadyPending() + ERRORS.eth_requestAccounts.requestAlreadyPending(), ) // now unlock and let through the first request @@ -717,11 +717,11 @@ describe('permissions middleware', function () { assert.ok( res.result && !res.error, - 'response should have result and no error' + 'response should have result and no error', ) assert.deepEqual( res.result, [ACCOUNTS.c.primary], - 'response should have correct result' + 'response should have correct result', ) }) }) @@ -750,7 +750,7 @@ describe('permissions middleware', function () { await assert.doesNotReject( cMiddleware(req, res), - 'should not reject' + 'should not reject', ) assert.ok(res.result, 'result should be true') @@ -766,7 +766,7 @@ describe('permissions middleware', function () { lastUpdated: 1, }, }, - 'metadata should have been added to store' + 'metadata should have been added to store', ) }) @@ -783,7 +783,7 @@ describe('permissions middleware', function () { await assert.doesNotReject( cMiddleware(req, res), - 'should not reject' + 'should not reject', ) assert.ok(res.result, 'result should be true') @@ -793,7 +793,7 @@ describe('permissions middleware', function () { assert.deepEqual( metadataStore, { [DOMAINS.c.origin]: { name, extensionId, lastUpdated: 1 } }, - 'metadata should have been added to store' + 'metadata should have been added to store', ) }) @@ -808,7 +808,7 @@ describe('permissions middleware', function () { await assert.doesNotReject( cMiddleware(req, res), - 'should not reject' + 'should not reject', ) assert.ok(res.result, 'result should be true') @@ -817,7 +817,7 @@ describe('permissions middleware', function () { assert.deepEqual( metadataStore, {}, - 'metadata should not have been added to store' + 'metadata should not have been added to store', ) }) @@ -831,7 +831,7 @@ describe('permissions middleware', function () { await assert.doesNotReject( cMiddleware(req, res), - 'should not reject' + 'should not reject', ) assert.ok(res.result, 'result should be true') @@ -840,7 +840,7 @@ describe('permissions middleware', function () { assert.deepEqual( metadataStore, {}, - 'metadata should not have been added to store' + 'metadata should not have been added to store', ) }) }) diff --git a/test/unit/app/controllers/permissions/restricted-methods-test.js b/test/unit/app/controllers/permissions/restricted-methods-test.js index 6b95cdb69..54ba3814f 100644 --- a/test/unit/app/controllers/permissions/restricted-methods-test.js +++ b/test/unit/app/controllers/permissions/restricted-methods-test.js @@ -19,12 +19,12 @@ describe('restricted methods', function () { await assert.rejects( ethAccountsMethod(null, res, null), fooError, - 'Should reject with expected error' + 'Should reject with expected error', ) assert.deepEqual( res, { error: fooError }, - 'response should have expected error and no result' + 'response should have expected error and no result', ) }) @@ -67,7 +67,7 @@ describe('restricted methods', function () { identities[address] = {} return identities }, - {} + {}, ) }, getKeyringAccounts: async () => [...keyringAccounts], @@ -88,7 +88,7 @@ describe('restricted methods', function () { identities[address] = { lastSelected: 1000 } return identities }, - {} + {}, ) }, getKeyringAccounts: async () => [...keyringAccounts], @@ -110,7 +110,7 @@ describe('restricted methods', function () { identities[address] = { lastSelected: index * 1000 } return identities }, - {} + {}, ) }, getKeyringAccounts: async () => [...keyringAccounts], diff --git a/ui/app/components/app/account-menu/tests/account-menu.test.js b/ui/app/components/app/account-menu/tests/account-menu.test.js index 3ed2005b1..f4e5e1062 100644 --- a/ui/app/components/app/account-menu/tests/account-menu.test.js +++ b/ui/app/components/app/account-menu/tests/account-menu.test.js @@ -67,7 +67,7 @@ describe('Account Menu', function () { wrapper = mountWithRouter( - , store + , store, ) }) diff --git a/ui/app/components/app/app-header/app-header.container.js b/ui/app/components/app/app-header/app-header.container.js index 926e9f1ee..78c425436 100644 --- a/ui/app/components/app/app-header/app-header.container.js +++ b/ui/app/components/app/app-header/app-header.container.js @@ -36,5 +36,5 @@ const mapDispatchToProps = (dispatch) => { export default compose( withRouter, - connect(mapStateToProps, mapDispatchToProps) + connect(mapStateToProps, mapDispatchToProps), )(AppHeader) diff --git a/ui/app/components/app/app-header/tests/app-header.test.js b/ui/app/components/app/app-header/tests/app-header.test.js index a788e1053..0ada978da 100644 --- a/ui/app/components/app/app-header/tests/app-header.test.js +++ b/ui/app/components/app/app-header/tests/app-header.test.js @@ -32,7 +32,7 @@ describe('App Header', function () { t: (str) => str, metricsEvent: () => {}, }, - } + }, ) }) diff --git a/ui/app/components/app/asset-list/asset-list.js b/ui/app/components/app/asset-list/asset-list.js index e24aba22d..12d54e9dc 100644 --- a/ui/app/components/app/asset-list/asset-list.js +++ b/ui/app/components/app/asset-list/asset-list.js @@ -43,12 +43,12 @@ const AssetList = ({ onClickAsset }) => { const [primaryCurrencyDisplay] = useCurrencyDisplay( selectedAccountBalance, - { numberOfDecimals: primaryNumberOfDecimals, currency: primaryCurrency } + { numberOfDecimals: primaryNumberOfDecimals, currency: primaryCurrency }, ) const [secondaryCurrencyDisplay] = useCurrencyDisplay( selectedAccountBalance, - { numberOfDecimals: secondaryNumberOfDecimals, currency: secondaryCurrency } + { numberOfDecimals: secondaryNumberOfDecimals, currency: secondaryCurrency }, ) return ( diff --git a/ui/app/components/app/confirm-page-container/confirm-detail-row/tests/confirm-detail-row.component.test.js b/ui/app/components/app/confirm-page-container/confirm-detail-row/tests/confirm-detail-row.component.test.js index 40ac291e6..3c8c28612 100644 --- a/ui/app/components/app/confirm-page-container/confirm-detail-row/tests/confirm-detail-row.component.test.js +++ b/ui/app/components/app/confirm-page-container/confirm-detail-row/tests/confirm-detail-row.component.test.js @@ -24,7 +24,7 @@ describe('Confirm Detail Row Component', function () { onHeaderClick={propsMethodSpies.onHeaderClick} headerText="mockHeaderText" headerTextClassName="mockHeaderClass" - /> + />, ) }) diff --git a/ui/app/components/app/connected-accounts-list/connected-accounts-list.component.js b/ui/app/components/app/connected-accounts-list/connected-accounts-list.component.js index d4e10db7f..898af901e 100644 --- a/ui/app/components/app/connected-accounts-list/connected-accounts-list.component.js +++ b/ui/app/components/app/connected-accounts-list/connected-accounts-list.component.js @@ -30,11 +30,11 @@ export default class ConnectedAccountsList extends PureComponent { shouldRenderListOptions: (props, propName, componentName) => { if (typeof props[propName] !== 'boolean') { return new Error( - `Warning: Failed prop type: '${propName}' of component '${componentName}' must be a boolean. Received: ${typeof props[propName]}` + `Warning: Failed prop type: '${propName}' of component '${componentName}' must be a boolean. Received: ${typeof props[propName]}`, ) } else if (props[propName] && !props['removePermittedAccount']) { return new Error( - `Warning: Failed prop type: '${propName}' of component '${componentName}' requires prop 'removePermittedAccount'.` + `Warning: Failed prop type: '${propName}' of component '${componentName}' requires prop 'removePermittedAccount'.`, ) } }, diff --git a/ui/app/components/app/dropdowns/network-dropdown.js b/ui/app/components/app/dropdowns/network-dropdown.js index 111309a40..e578a8b75 100644 --- a/ui/app/components/app/dropdowns/network-dropdown.js +++ b/ui/app/components/app/dropdowns/network-dropdown.js @@ -417,5 +417,5 @@ class NetworkDropdown extends Component { export default compose( withRouter, - connect(mapStateToProps, mapDispatchToProps) + connect(mapStateToProps, mapDispatchToProps), )(NetworkDropdown) diff --git a/ui/app/components/app/dropdowns/tests/dropdown.test.js b/ui/app/components/app/dropdowns/tests/dropdown.test.js index 83634429a..b32d1327f 100644 --- a/ui/app/components/app/dropdowns/tests/dropdown.test.js +++ b/ui/app/components/app/dropdowns/tests/dropdown.test.js @@ -16,7 +16,7 @@ describe('Dropdown', function () { style={{ test: 'style' }} closeMenu={closeMenuSpy} > - + , ) }) diff --git a/ui/app/components/app/dropdowns/tests/menu.test.js b/ui/app/components/app/dropdowns/tests/menu.test.js index a253f4aa9..2291be41d 100644 --- a/ui/app/components/app/dropdowns/tests/menu.test.js +++ b/ui/app/components/app/dropdowns/tests/menu.test.js @@ -8,7 +8,7 @@ describe('Dropdown Menu Components', function () { describe('Menu', function () { it('adds prop className to menu', function () { const wrapper = shallow( - + , ) assert.equal(wrapper.find('.menu').prop('className'), 'menu Test Class') }) @@ -25,7 +25,7 @@ describe('Dropdown Menu Components', function () { text="test text" className="test foo1" onClick={onClickSpy} - /> + />, ) }) diff --git a/ui/app/components/app/dropdowns/tests/network-dropdown.test.js b/ui/app/components/app/dropdowns/tests/network-dropdown.test.js index 8fd6a33c7..04005f19b 100644 --- a/ui/app/components/app/dropdowns/tests/network-dropdown.test.js +++ b/ui/app/components/app/dropdowns/tests/network-dropdown.test.js @@ -28,7 +28,7 @@ describe('Network Dropdown', function () { beforeEach(function () { wrapper = mountWithRouter( - + , ) }) diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js b/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js index 291ec2443..6cea42dce 100644 --- a/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js +++ b/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js @@ -318,7 +318,7 @@ function addHexWEIsToRenderableFiat (aHexWEI, bHexWEI, convertedCurrency, conver const ethTotal = ethTotalToConvertedCurrency( addHexWEIsToDec(aHexWEI, bHexWEI), convertedCurrency, - conversionRate + conversionRate, ) return formatCurrency(ethTotal, convertedCurrency) } diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/tests/gas-modal-page-container-component.test.js b/ui/app/components/app/gas-customization/gas-modal-page-container/tests/gas-modal-page-container-component.test.js index d15a557d7..473a651ce 100644 --- a/ui/app/components/app/gas-customization/gas-modal-page-container/tests/gas-modal-page-container-component.test.js +++ b/ui/app/components/app/gas-customization/gas-modal-page-container/tests/gas-modal-page-container-component.test.js @@ -223,7 +223,7 @@ describe('GasModalPageContainer Component', function () { assert.deepEqual( renderBasicTabContentResult.props.gasPriceButtonGroupProps, - mockGasPriceButtonGroupProps + mockGasPriceButtonGroupProps, ) }) }) @@ -235,7 +235,7 @@ describe('GasModalPageContainer Component', function () { 'mockNewTotalFiat', ' mockNewTotalEth', ' mockSendAmount', - ' mockTransactionFee' + ' mockTransactionFee', )) assert(renderedInfoRowsContainer.childAt(0).hasClass(baseClassName)) diff --git a/ui/app/components/app/gas-customization/gas-price-button-group/tests/gas-price-button-group-component.test.js b/ui/app/components/app/gas-customization/gas-price-button-group/tests/gas-price-button-group-component.test.js index 5c644c986..1ca1c50d0 100644 --- a/ui/app/components/app/gas-customization/gas-price-button-group/tests/gas-price-button-group-component.test.js +++ b/ui/app/components/app/gas-customization/gas-price-button-group/tests/gas-price-button-group-component.test.js @@ -84,7 +84,7 @@ describe('GasPriceButtonGroup Component', function () { Object.assign({}, mockGasPriceButtonGroupProps.gasButtonInfo[i]), mockButtonPropsAndFlags, i, - ] + ], ) } @@ -110,7 +110,7 @@ describe('GasPriceButtonGroup Component', function () { GasPriceButtonGroup.prototype.renderButtonContent.resetHistory() const renderButtonResult = GasPriceButtonGroup.prototype.renderButton( Object.assign({}, mockGasPriceButtonGroupProps.gasButtonInfo[0]), - mockButtonPropsAndFlags + mockButtonPropsAndFlags, ) wrappedRenderButtonResult = shallow(renderButtonResult) }) @@ -125,7 +125,7 @@ describe('GasPriceButtonGroup Component', function () { assert.equal(mockGasPriceButtonGroupProps.handleGasPriceSelection.callCount, 1) assert.deepEqual( mockGasPriceButtonGroupProps.handleGasPriceSelection.getCall(0).args, - [mockGasPriceButtonGroupProps.gasButtonInfo[0].priceInHexWei] + [mockGasPriceButtonGroupProps.gasButtonInfo[0].priceInHexWei], ) }) @@ -152,7 +152,7 @@ describe('GasPriceButtonGroup Component', function () { showCheck, className, }, - ] + ], ) }) }) diff --git a/ui/app/components/app/gas-customization/gas-price-chart/gas-price-chart.utils.js b/ui/app/components/app/gas-customization/gas-price-chart/gas-price-chart.utils.js index ad98b61a6..ab948d941 100644 --- a/ui/app/components/app/gas-customization/gas-price-chart/gas-price-chart.utils.js +++ b/ui/app/components/app/gas-customization/gas-price-chart/gas-price-chart.utils.js @@ -176,7 +176,7 @@ export function setSelectedCircle ({ chart.internal.selectPoint( generateDataUIObj(currentX.toNumber(), numberOfValues, newTimeEstimate), - numberOfValues + numberOfValues, ) } @@ -322,7 +322,7 @@ export function generateChart (gasPrices, estimatedTimes, gasPricesMax, estimate if (dataToShow.length) { this.tooltip.html( - this.config.tooltip_contents.call(this, selectedData, this.axis.getXAxisTickFormat(), this.getYFormat(), this.color) + this.config.tooltip_contents.call(this, selectedData, this.axis.getXAxisTickFormat(), this.getYFormat(), this.color), ).style('display', 'flex') // Get tooltip dimensions diff --git a/ui/app/components/app/menu-bar/tests/menu-bar.test.js b/ui/app/components/app/menu-bar/tests/menu-bar.test.js index 13846c674..e48b23ae6 100644 --- a/ui/app/components/app/menu-bar/tests/menu-bar.test.js +++ b/ui/app/components/app/menu-bar/tests/menu-bar.test.js @@ -35,7 +35,7 @@ describe('MenuBar', function () { const wrapper = mountWithRouter( - + , ) assert.ok(!wrapper.exists('AccountOptionsMenu')) const accountOptions = wrapper.find('.menu-bar__account-options') @@ -49,7 +49,7 @@ describe('MenuBar', function () { const wrapper = mountWithRouter( - + , ) const accountOptions = wrapper.find('.menu-bar__account-options') accountOptions.simulate('click') diff --git a/ui/app/components/app/modal/modal-content/tests/modal-content.component.test.js b/ui/app/components/app/modal/modal-content/tests/modal-content.component.test.js index 3238ef3c0..468775797 100644 --- a/ui/app/components/app/modal/modal-content/tests/modal-content.component.test.js +++ b/ui/app/components/app/modal/modal-content/tests/modal-content.component.test.js @@ -8,7 +8,7 @@ describe('ModalContent Component', function () { const wrapper = shallow( + />, ) assert.equal(wrapper.find('.modal-content__title').length, 1) @@ -20,7 +20,7 @@ describe('ModalContent Component', function () { const wrapper = shallow( + />, ) assert.equal(wrapper.find('.modal-content__title').length, 0) @@ -33,7 +33,7 @@ describe('ModalContent Component', function () { + />, ) assert.equal(wrapper.find('.modal-content__title').length, 1) diff --git a/ui/app/components/app/modal/tests/modal.component.test.js b/ui/app/components/app/modal/tests/modal.component.test.js index e20521809..83d9a81e7 100644 --- a/ui/app/components/app/modal/tests/modal.component.test.js +++ b/ui/app/components/app/modal/tests/modal.component.test.js @@ -24,7 +24,7 @@ describe('Modal Component', function () { cancelText="Cancel" onSubmit={handleSubmit} submitText="Submit" - /> + />, ) const buttons = wrapper.find(Button) @@ -54,7 +54,7 @@ describe('Modal Component', function () { onSubmit={() => {}} submitText="Submit" submitType="confirm" - /> + />, ) const buttons = wrapper.find(Button) @@ -72,7 +72,7 @@ describe('Modal Component', function () { submitText="Submit" >
- + , ) assert.ok(wrapper.find('.test-class')) @@ -89,7 +89,7 @@ describe('Modal Component', function () { submitText="Submit" headerText="My Header" onClose={handleCancel} - /> + />, ) assert.ok(wrapper.find('.modal-container__header')) @@ -113,7 +113,7 @@ describe('Modal Component', function () { submitDisabled headerText="My Header" onClose={handleCancel} - /> + />, ) const buttons = wrapper.find(Button) diff --git a/ui/app/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/tests/cancel-transaction-gas-fee.component.test.js b/ui/app/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/tests/cancel-transaction-gas-fee.component.test.js index 3f63d6540..ee9bf1d1c 100644 --- a/ui/app/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/tests/cancel-transaction-gas-fee.component.test.js +++ b/ui/app/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/tests/cancel-transaction-gas-fee.component.test.js @@ -9,7 +9,7 @@ describe('CancelTransactionGasFee Component', function () { const wrapper = shallow( + />, ) assert.ok(wrapper) diff --git a/ui/app/components/app/modals/cancel-transaction/cancel-transaction.container.js b/ui/app/components/app/modals/cancel-transaction/cancel-transaction.container.js index 99a09368e..0f2a8593a 100644 --- a/ui/app/components/app/modals/cancel-transaction/cancel-transaction.container.js +++ b/ui/app/components/app/modals/cancel-transaction/cancel-transaction.container.js @@ -19,7 +19,7 @@ const mapStateToProps = (state, ownProps) => { toNumericBase: 'hex', multiplicandBase: 16, multiplierBase: 10, - }) + }), ) const newGasFee = getHexGasTotal({ gasPrice: defaultNewGasPrice, gasLimit: '0x5208' }) diff --git a/ui/app/components/app/modals/cancel-transaction/tests/cancel-transaction.component.test.js b/ui/app/components/app/modals/cancel-transaction/tests/cancel-transaction.component.test.js index faa917db3..416b796bc 100644 --- a/ui/app/components/app/modals/cancel-transaction/tests/cancel-transaction.component.test.js +++ b/ui/app/components/app/modals/cancel-transaction/tests/cancel-transaction.component.test.js @@ -14,7 +14,7 @@ describe('CancelTransaction Component', function () { , - { context: { t } } + { context: { t } }, ) assert.ok(wrapper) @@ -36,7 +36,7 @@ describe('CancelTransaction Component', function () { hideModal={hideModalSpy} showTransactionConfirmedModal={() => {}} />, - { context: { t } } + { context: { t } }, ) assert.equal(wrapper.find(Modal).length, 1) diff --git a/ui/app/components/app/modals/confirm-delete-network/confirm-delete-network.container.js b/ui/app/components/app/modals/confirm-delete-network/confirm-delete-network.container.js index e9df26735..ca8011d0d 100644 --- a/ui/app/components/app/modals/confirm-delete-network/confirm-delete-network.container.js +++ b/ui/app/components/app/modals/confirm-delete-network/confirm-delete-network.container.js @@ -12,5 +12,5 @@ const mapDispatchToProps = (dispatch) => { export default compose( withModalProps, - connect(null, mapDispatchToProps) + connect(null, mapDispatchToProps), )(ConfirmDeleteNetwork) diff --git a/ui/app/components/app/modals/confirm-delete-network/tests/confirm-delete-network.test.js b/ui/app/components/app/modals/confirm-delete-network/tests/confirm-delete-network.test.js index 77e8b3faa..f4f85d589 100644 --- a/ui/app/components/app/modals/confirm-delete-network/tests/confirm-delete-network.test.js +++ b/ui/app/components/app/modals/confirm-delete-network/tests/confirm-delete-network.test.js @@ -20,7 +20,7 @@ describe('Confirm Delete Network', function () { context: { t: (str) => str, }, - } + }, ) }) diff --git a/ui/app/components/app/modals/confirm-remove-account/confirm-remove-account.container.js b/ui/app/components/app/modals/confirm-remove-account/confirm-remove-account.container.js index e5bddb62f..805b9c3e9 100644 --- a/ui/app/components/app/modals/confirm-remove-account/confirm-remove-account.container.js +++ b/ui/app/components/app/modals/confirm-remove-account/confirm-remove-account.container.js @@ -18,5 +18,5 @@ const mapDispatchToProps = (dispatch) => { export default compose( withModalProps, - connect(mapStateToProps, mapDispatchToProps) + connect(mapStateToProps, mapDispatchToProps), )(ConfirmRemoveAccount) diff --git a/ui/app/components/app/modals/confirm-remove-account/tests/confirm-remove-account.test.js b/ui/app/components/app/modals/confirm-remove-account/tests/confirm-remove-account.test.js index 417923628..c380e06da 100644 --- a/ui/app/components/app/modals/confirm-remove-account/tests/confirm-remove-account.test.js +++ b/ui/app/components/app/modals/confirm-remove-account/tests/confirm-remove-account.test.js @@ -44,7 +44,7 @@ describe('Confirm Remove Account', function () { t: PropTypes.func, store: PropTypes.object, }, - } + }, ) }) diff --git a/ui/app/components/app/modals/confirm-reset-account/confirm-reset-account.container.js b/ui/app/components/app/modals/confirm-reset-account/confirm-reset-account.container.js index 727cb9ae6..6ef230f41 100644 --- a/ui/app/components/app/modals/confirm-reset-account/confirm-reset-account.container.js +++ b/ui/app/components/app/modals/confirm-reset-account/confirm-reset-account.container.js @@ -12,5 +12,5 @@ const mapDispatchToProps = (dispatch) => { export default compose( withModalProps, - connect(null, mapDispatchToProps) + connect(null, mapDispatchToProps), )(ConfirmResetAccount) diff --git a/ui/app/components/app/modals/confirm-reset-account/tests/confirm-reset-account.test.js b/ui/app/components/app/modals/confirm-reset-account/tests/confirm-reset-account.test.js index fdb268e63..052f21eba 100644 --- a/ui/app/components/app/modals/confirm-reset-account/tests/confirm-reset-account.test.js +++ b/ui/app/components/app/modals/confirm-reset-account/tests/confirm-reset-account.test.js @@ -18,7 +18,7 @@ describe('Confirm Reset Account', function () { context: { t: (str) => str, }, - } + }, ) }) diff --git a/ui/app/components/app/modals/edit-approval-permission/edit-approval-permission.component.js b/ui/app/components/app/modals/edit-approval-permission/edit-approval-permission.component.js index 7c850279b..3d134d9b8 100644 --- a/ui/app/components/app/modals/edit-approval-permission/edit-approval-permission.component.js +++ b/ui/app/components/app/modals/edit-approval-permission/edit-approval-permission.component.js @@ -196,7 +196,7 @@ export default class EditApprovalPermission extends PureComponent { const error = this.validateSpendLimit() const disabled = Boolean( (customSpendLimit === customTokenAmount && !selectedOptionIsUnlimited) || - error + error, ) return ( diff --git a/ui/app/components/app/modals/edit-approval-permission/edit-approval-permission.container.js b/ui/app/components/app/modals/edit-approval-permission/edit-approval-permission.container.js index b70451a41..357d70ef2 100644 --- a/ui/app/components/app/modals/edit-approval-permission/edit-approval-permission.container.js +++ b/ui/app/components/app/modals/edit-approval-permission/edit-approval-permission.container.js @@ -14,5 +14,5 @@ const mapStateToProps = (state) => { export default compose( withModalProps, - connect(mapStateToProps) + connect(mapStateToProps), )(EditApprovalPermission) diff --git a/ui/app/components/app/modals/metametrics-opt-in-modal/tests/metametrics-opt-in-modal.test.js b/ui/app/components/app/modals/metametrics-opt-in-modal/tests/metametrics-opt-in-modal.test.js index 0832daf84..70e7d9924 100644 --- a/ui/app/components/app/modals/metametrics-opt-in-modal/tests/metametrics-opt-in-modal.test.js +++ b/ui/app/components/app/modals/metametrics-opt-in-modal/tests/metametrics-opt-in-modal.test.js @@ -19,7 +19,7 @@ describe('MetaMetrics Opt In', function () { context: { metricsEvent: () => {}, }, - } + }, ) }) diff --git a/ui/app/components/app/modals/reject-transactions/tests/reject-transactions.test.js b/ui/app/components/app/modals/reject-transactions/tests/reject-transactions.test.js index fb8deb65d..d7623604e 100644 --- a/ui/app/components/app/modals/reject-transactions/tests/reject-transactions.test.js +++ b/ui/app/components/app/modals/reject-transactions/tests/reject-transactions.test.js @@ -19,7 +19,7 @@ describe('Reject Transactions Model', function () { context: { t: (str) => str, }, - } + }, ) }) diff --git a/ui/app/components/app/modals/tests/account-details-modal.test.js b/ui/app/components/app/modals/tests/account-details-modal.test.js index f8e76d95c..3c0dd8f25 100644 --- a/ui/app/components/app/modals/tests/account-details-modal.test.js +++ b/ui/app/components/app/modals/tests/account-details-modal.test.js @@ -41,7 +41,7 @@ describe('Account Details Modal', function () { context: { t: (str) => str, }, - } + }, ) }) diff --git a/ui/app/components/app/modals/transaction-confirmed/tests/transaction-confirmed.test.js b/ui/app/components/app/modals/transaction-confirmed/tests/transaction-confirmed.test.js index 222fff8f4..47b653dd7 100644 --- a/ui/app/components/app/modals/transaction-confirmed/tests/transaction-confirmed.test.js +++ b/ui/app/components/app/modals/transaction-confirmed/tests/transaction-confirmed.test.js @@ -15,7 +15,7 @@ describe('Transaction Confirmed', function () { context: { t: (str) => str, }, - } + }, ) const submit = wrapper.find('.btn-secondary.modal-container__footer-button') submit.simulate('click') diff --git a/ui/app/components/app/permission-page-container/permission-page-container-content/permission-page-container-content.component.js b/ui/app/components/app/permission-page-container/permission-page-container-content/permission-page-container-content.component.js index feb6eaa9a..338a60631 100644 --- a/ui/app/components/app/permission-page-container/permission-page-container-content/permission-page-container-content.component.js +++ b/ui/app/components/app/permission-page-container/permission-page-container-content/permission-page-container-content.component.js @@ -115,21 +115,21 @@ export default class PermissionPageContainerContent extends PureComponent { } else if (allIdentitiesSelected) { return t( 'connectToAll', - [ this.renderAccountTooltip(t('connectToAllAccounts')) ] + [ this.renderAccountTooltip(t('connectToAllAccounts')) ], ) } else if (selectedIdentities.length > 1) { return t( 'connectToMultiple', [ this.renderAccountTooltip(t('connectToMultipleNumberOfAccounts', [ selectedIdentities.length ])), - ] + ], ) } else { return t( 'connectTo', [ this.getAccountDescriptor(selectedIdentities[0]), - ] + ], ) } } diff --git a/ui/app/components/app/permission-page-container/permission-page-container.component.js b/ui/app/components/app/permission-page-container/permission-page-container.component.js index 0779f2226..f61c9c0ab 100644 --- a/ui/app/components/app/permission-page-container/permission-page-container.component.js +++ b/ui/app/components/app/permission-page-container/permission-page-container.component.js @@ -37,7 +37,7 @@ export default class PermissionPageContainer extends Component { state = { selectedPermissions: this.getRequestedMethodState( - this.getRequestedMethodNames(this.props) + this.getRequestedMethodNames(this.props), ), } @@ -58,7 +58,7 @@ export default class PermissionPageContainer extends Component { acc[methodName] = true return acc }, - {} + {}, ) } diff --git a/ui/app/components/app/signature-request-original/signature-request-original.container.js b/ui/app/components/app/signature-request-original/signature-request-original.container.js index aa3a20035..63150d38d 100644 --- a/ui/app/components/app/signature-request-original/signature-request-original.container.js +++ b/ui/app/components/app/signature-request-original/signature-request-original.container.js @@ -75,5 +75,5 @@ function mergeProps (stateProps, dispatchProps, ownProps) { export default compose( withRouter, - connect(mapStateToProps, mapDispatchToProps, mergeProps) + connect(mapStateToProps, mapDispatchToProps, mergeProps), )(SignatureRequestOriginal) diff --git a/ui/app/components/app/tests/signature-request.test.js b/ui/app/components/app/tests/signature-request.test.js index 493c31df1..21612e5a0 100644 --- a/ui/app/components/app/tests/signature-request.test.js +++ b/ui/app/components/app/tests/signature-request.test.js @@ -56,7 +56,7 @@ describe('Signature Request', function () { wrapper = mountWithRouter( - , store + , store, ) }) diff --git a/ui/app/components/app/token-cell/token-cell.test.js b/ui/app/components/app/token-cell/token-cell.test.js index 3e87fd90f..b01f581cf 100644 --- a/ui/app/components/app/token-cell/token-cell.test.js +++ b/ui/app/components/app/token-cell/token-cell.test.js @@ -55,7 +55,7 @@ describe('Token Cell', function () { onClick={onClick} /> - + , ) }) diff --git a/ui/app/components/app/transaction-action/tests/transaction-action.component.test.js b/ui/app/components/app/transaction-action/tests/transaction-action.component.test.js index 5bd0fddfc..1d0263cb0 100644 --- a/ui/app/components/app/transaction-action/tests/transaction-action.component.test.js +++ b/ui/app/components/app/transaction-action/tests/transaction-action.component.test.js @@ -76,7 +76,7 @@ describe('TransactionAction Component', function () { transaction={transaction} className="test-class" />, - { context: { t } } + { context: { t } }, ) assert.ok(wrapper) @@ -110,7 +110,7 @@ describe('TransactionAction Component', function () { transaction={transaction} className="test-class" />, - { context: { t } } + { context: { t } }, ) assert.ok(wrapper) diff --git a/ui/app/components/app/transaction-activity-log/tests/transaction-activity-log.component.test.js b/ui/app/components/app/transaction-activity-log/tests/transaction-activity-log.component.test.js index 233aca9ad..c3422e58e 100644 --- a/ui/app/components/app/transaction-activity-log/tests/transaction-activity-log.component.test.js +++ b/ui/app/components/app/transaction-activity-log/tests/transaction-activity-log.component.test.js @@ -44,7 +44,7 @@ describe('TransactionActivityLog Component', function () { onRetry={() => {}} primaryTransactionStatus="confirmed" />, - { context: { t: (str1, str2) => (str2 ? str1 + str2 : str1) } } + { context: { t: (str1, str2) => (str2 ? str1 + str2 : str1) } }, ) assert.ok(wrapper.hasClass('transaction-activity-log')) @@ -92,7 +92,7 @@ describe('TransactionActivityLog Component', function () { primaryTransactionStatus="pending" isEarliestNonce />, - { context: { t: (str1, str2) => (str2 ? str1 + str2 : str1) } } + { context: { t: (str1, str2) => (str2 ? str1 + str2 : str1) } }, ) assert.ok(wrapper.hasClass('transaction-activity-log')) @@ -141,7 +141,7 @@ describe('TransactionActivityLog Component', function () { primaryTransactionStatus="pending" isEarliestNonce={false} />, - { context: { t: (str1, str2) => (str2 ? str1 + str2 : str1) } } + { context: { t: (str1, str2) => (str2 ? str1 + str2 : str1) } }, ) assert.ok(wrapper.hasClass('transaction-activity-log')) diff --git a/ui/app/components/app/transaction-breakdown/tests/transaction-breakdown.component.test.js b/ui/app/components/app/transaction-breakdown/tests/transaction-breakdown.component.test.js index 3f3645364..bd4c3332a 100644 --- a/ui/app/components/app/transaction-breakdown/tests/transaction-breakdown.component.test.js +++ b/ui/app/components/app/transaction-breakdown/tests/transaction-breakdown.component.test.js @@ -24,7 +24,7 @@ describe('TransactionBreakdown Component', function () { transaction={transaction} className="test-class" />, - { context: { t: (str1, str2) => (str2 ? str1 + str2 : str1) } } + { context: { t: (str1, str2) => (str2 ? str1 + str2 : str1) } }, ) assert.ok(wrapper.hasClass('transaction-breakdown')) diff --git a/ui/app/components/app/transaction-breakdown/transaction-breakdown-row/tests/transaction-breakdown-row.component.test.js b/ui/app/components/app/transaction-breakdown/transaction-breakdown-row/tests/transaction-breakdown-row.component.test.js index da5294094..f9e144a42 100644 --- a/ui/app/components/app/transaction-breakdown/transaction-breakdown-row/tests/transaction-breakdown-row.component.test.js +++ b/ui/app/components/app/transaction-breakdown/transaction-breakdown-row/tests/transaction-breakdown-row.component.test.js @@ -13,7 +13,7 @@ describe('TransactionBreakdownRow Component', function () { > Test , - { context: { t: (str1, str2) => (str2 ? str1 + str2 : str1) } } + { context: { t: (str1, str2) => (str2 ? str1 + str2 : str1) } }, ) assert.ok(wrapper.hasClass('transaction-breakdown-row')) @@ -29,7 +29,7 @@ describe('TransactionBreakdownRow Component', function () { > , - { context: { t: (str1, str2) => (str2 ? str1 + str2 : str1) } } + { context: { t: (str1, str2) => (str2 ? str1 + str2 : str1) } }, ) assert.ok(wrapper.hasClass('transaction-breakdown-row')) diff --git a/ui/app/components/app/transaction-list-item-details/tests/transaction-list-item-details.component.test.js b/ui/app/components/app/transaction-list-item-details/tests/transaction-list-item-details.component.test.js index 2834eb800..0c9726aef 100644 --- a/ui/app/components/app/transaction-list-item-details/tests/transaction-list-item-details.component.test.js +++ b/ui/app/components/app/transaction-list-item-details/tests/transaction-list-item-details.component.test.js @@ -39,7 +39,7 @@ describe('TransactionListItemDetails Component', function () { senderNickname="sender-nickname" recipientNickname="recipient-nickname" />, - { context: { t: (str1, str2) => (str2 ? str1 + str2 : str1) } } + { context: { t: (str1, str2) => (str2 ? str1 + str2 : str1) } }, ) const child = wrapper.childAt(0) assert.ok(child.hasClass('transaction-list-item-details')) @@ -83,7 +83,7 @@ describe('TransactionListItemDetails Component', function () { senderNickname="sender-nickname" recipientNickname="recipient-nickname" />, - { context: { t: (str1, str2) => (str2 ? str1 + str2 : str1) } } + { context: { t: (str1, str2) => (str2 ? str1 + str2 : str1) } }, ) const child = wrapper.childAt(0) @@ -122,7 +122,7 @@ describe('TransactionListItemDetails Component', function () { senderNickname="sender-nickname" recipientNickname="recipient-nickname" />, - { context: { t: (str1, str2) => (str2 ? str1 + str2 : str1) } } + { context: { t: (str1, str2) => (str2 ? str1 + str2 : str1) } }, ) const child = wrapper.childAt(0) @@ -164,7 +164,7 @@ describe('TransactionListItemDetails Component', function () { senderNickname="sender-nickname" recipientNickname="recipient-nickname" />, - { context: { t: (str1, str2) => (str2 ? str1 + str2 : str1) } } + { context: { t: (str1, str2) => (str2 ? str1 + str2 : str1) } }, ) const child = wrapper.childAt(0) diff --git a/ui/app/components/app/transaction-list/transaction-list.component.js b/ui/app/components/app/transaction-list/transaction-list.component.js index dac902add..a293b8aa1 100644 --- a/ui/app/components/app/transaction-list/transaction-list.component.js +++ b/ui/app/components/app/transaction-list/transaction-list.component.js @@ -47,11 +47,11 @@ export default function TransactionList ({ hideTokenTransactions, tokenAddress } const pendingTransactions = useMemo( () => getFilteredTransactionGroups(unfilteredPendingTransactions, hideTokenTransactions, tokenAddress), - [hideTokenTransactions, tokenAddress, unfilteredPendingTransactions] + [hideTokenTransactions, tokenAddress, unfilteredPendingTransactions], ) const completedTransactions = useMemo( () => getFilteredTransactionGroups(unfilteredCompletedTransactions, hideTokenTransactions, tokenAddress), - [hideTokenTransactions, tokenAddress, unfilteredCompletedTransactions] + [hideTokenTransactions, tokenAddress, unfilteredCompletedTransactions], ) const { fetchGasEstimates, fetchBasicGasAndTimeEstimates } = useMemo(() => ({ diff --git a/ui/app/components/app/transaction-status/tests/transaction-status.component.test.js b/ui/app/components/app/transaction-status/tests/transaction-status.component.test.js index 9cf9e59ad..5daefa712 100644 --- a/ui/app/components/app/transaction-status/tests/transaction-status.component.test.js +++ b/ui/app/components/app/transaction-status/tests/transaction-status.component.test.js @@ -16,7 +16,7 @@ describe('TransactionStatus Component', function () { + />, ) assert.ok(wrapper) @@ -29,7 +29,7 @@ describe('TransactionStatus Component', function () { status="approved" isEarliestNonce error={{ message: 'test-title' }} - /> + />, ) assert.ok(wrapper) @@ -43,7 +43,7 @@ describe('TransactionStatus Component', function () { date="June 1" status="submitted" isEarliestNonce - /> + />, ) assert.ok(wrapper) @@ -54,7 +54,7 @@ describe('TransactionStatus Component', function () { const wrapper = mount( + />, ) assert.ok(wrapper) @@ -66,7 +66,7 @@ describe('TransactionStatus Component', function () { const wrapper = mount( + />, ) assert.ok(wrapper) diff --git a/ui/app/components/app/user-preferenced-currency-display/tests/user-preferenced-currency-display.component.test.js b/ui/app/components/app/user-preferenced-currency-display/tests/user-preferenced-currency-display.component.test.js index d6145aae8..c2619ad67 100644 --- a/ui/app/components/app/user-preferenced-currency-display/tests/user-preferenced-currency-display.component.test.js +++ b/ui/app/components/app/user-preferenced-currency-display/tests/user-preferenced-currency-display.component.test.js @@ -16,7 +16,7 @@ describe('UserPreferencedCurrencyDisplay Component', function () { }) it('should render properly', function () { const wrapper = shallow( - + , ) assert.ok(wrapper) @@ -29,7 +29,7 @@ describe('UserPreferencedCurrencyDisplay Component', function () { prop1 prop2="test" prop3={1} - /> + />, ) assert.ok(wrapper) diff --git a/ui/app/components/app/user-preferenced-currency-input/tests/user-preferenced-currency-input.component.test.js b/ui/app/components/app/user-preferenced-currency-input/tests/user-preferenced-currency-input.component.test.js index 1ccd37776..21105ef7e 100644 --- a/ui/app/components/app/user-preferenced-currency-input/tests/user-preferenced-currency-input.component.test.js +++ b/ui/app/components/app/user-preferenced-currency-input/tests/user-preferenced-currency-input.component.test.js @@ -8,7 +8,7 @@ describe('UserPreferencedCurrencyInput Component', function () { describe('rendering', function () { it('should render properly', function () { const wrapper = shallow( - + , ) assert.ok(wrapper) @@ -19,7 +19,7 @@ describe('UserPreferencedCurrencyInput Component', function () { const wrapper = shallow( + />, ) assert.ok(wrapper) diff --git a/ui/app/components/app/user-preferenced-token-input/tests/user-preferenced-token-input.component.test.js b/ui/app/components/app/user-preferenced-token-input/tests/user-preferenced-token-input.component.test.js index 22a1deeed..e0a4f1ea2 100644 --- a/ui/app/components/app/user-preferenced-token-input/tests/user-preferenced-token-input.component.test.js +++ b/ui/app/components/app/user-preferenced-token-input/tests/user-preferenced-token-input.component.test.js @@ -8,7 +8,7 @@ describe('UserPreferencedCurrencyInput Component', function () { describe('rendering', function () { it('should render properly', function () { const wrapper = shallow( - + , ) assert.ok(wrapper) @@ -20,7 +20,7 @@ describe('UserPreferencedCurrencyInput Component', function () { + />, ) assert.ok(wrapper) diff --git a/ui/app/components/ui/account-mismatch-warning/tests/acccount-mismatch-warning.component.test.js b/ui/app/components/ui/account-mismatch-warning/tests/acccount-mismatch-warning.component.test.js index eb71110b5..56f67443e 100644 --- a/ui/app/components/ui/account-mismatch-warning/tests/acccount-mismatch-warning.component.test.js +++ b/ui/app/components/ui/account-mismatch-warning/tests/acccount-mismatch-warning.component.test.js @@ -14,7 +14,7 @@ describe('AccountMismatchWarning', function () { return { address: 'mockedAddress' } } throw new Error( - `${selector.name} is not cared for in the AccountMismatchWarning test useSelector stub` + `${selector.name} is not cared for in the AccountMismatchWarning test useSelector stub`, ) }) }) diff --git a/ui/app/components/ui/alert/tests/alert.test.js b/ui/app/components/ui/alert/tests/alert.test.js index 7c3f32024..8899f4969 100644 --- a/ui/app/components/ui/alert/tests/alert.test.js +++ b/ui/app/components/ui/alert/tests/alert.test.js @@ -9,7 +9,7 @@ describe('Alert', function () { beforeEach(function () { wrapper = shallow( - + , ) }) diff --git a/ui/app/components/ui/breadcrumbs/tests/breadcrumbs.component.test.js b/ui/app/components/ui/breadcrumbs/tests/breadcrumbs.component.test.js index 0b6e097f5..7bfff56d8 100644 --- a/ui/app/components/ui/breadcrumbs/tests/breadcrumbs.component.test.js +++ b/ui/app/components/ui/breadcrumbs/tests/breadcrumbs.component.test.js @@ -9,7 +9,7 @@ describe('Breadcrumbs Component', function () { + />, ) assert.ok(wrapper) diff --git a/ui/app/components/ui/button/button.component.js b/ui/app/components/ui/button/button.component.js index 64b19cca3..d0405aa3d 100644 --- a/ui/app/components/ui/button/button.component.js +++ b/ui/app/components/ui/button/button.component.js @@ -33,7 +33,7 @@ const Button = ({ type, submit, large, children, icon, rounded, className, ...bu typeHash[type] || CLASSNAME_DEFAULT, large && CLASSNAME_LARGE, rounded && CLASSNAME_ROUNDED, - className + className, )} { ...buttonProps } > diff --git a/ui/app/components/ui/card/tests/card.component.test.js b/ui/app/components/ui/card/tests/card.component.test.js index 50cf3938b..bb7ce3f1a 100644 --- a/ui/app/components/ui/card/tests/card.component.test.js +++ b/ui/app/components/ui/card/tests/card.component.test.js @@ -11,7 +11,7 @@ describe('Card Component', function () { className="card-test-class" >
Child
- + , ) assert.ok(wrapper.hasClass('card-test-class')) diff --git a/ui/app/components/ui/currency-input/tests/currency-input.component.test.js b/ui/app/components/ui/currency-input/tests/currency-input.component.test.js index 7f8e54dbe..adbd4efd2 100644 --- a/ui/app/components/ui/currency-input/tests/currency-input.component.test.js +++ b/ui/app/components/ui/currency-input/tests/currency-input.component.test.js @@ -13,7 +13,7 @@ describe('CurrencyInput Component', function () { describe('rendering', function () { it('should render properly without a suffix', function () { const wrapper = shallow( - + , ) assert.ok(wrapper) @@ -37,7 +37,7 @@ describe('CurrencyInput Component', function () { fiatSuffix="USD" nativeCurrency="ETH" /> - + , ) assert.ok(wrapper) @@ -66,7 +66,7 @@ describe('CurrencyInput Component', function () { currentCurrency="usd" conversionRate={231.06} /> - + , ) assert.ok(wrapper) @@ -100,7 +100,7 @@ describe('CurrencyInput Component', function () { currentCurrency="usd" conversionRate={231.06} /> - + , ) assert.ok(wrapper) @@ -139,7 +139,7 @@ describe('CurrencyInput Component', function () { { context: { t: (str) => str + '_t' }, childContextTypes: { t: PropTypes.func }, - } + }, ) assert.ok(wrapper) @@ -180,7 +180,7 @@ describe('CurrencyInput Component', function () { currentCurrency="usd" conversionRate={231.06} /> - + , ) assert.ok(wrapper) @@ -221,7 +221,7 @@ describe('CurrencyInput Component', function () { conversionRate={231.06} useFiat /> - + , ) assert.ok(wrapper) @@ -262,7 +262,7 @@ describe('CurrencyInput Component', function () { conversionRate={231.06} useFiat /> - + , ) assert.ok(wrapper) @@ -297,7 +297,7 @@ describe('CurrencyInput Component', function () { currentCurrency="usd" conversionRate={231.06} /> - + , ) assert.ok(wrapper) diff --git a/ui/app/components/ui/dropdown/dropdown.js b/ui/app/components/ui/dropdown/dropdown.js index c709793b1..be4a052a4 100644 --- a/ui/app/components/ui/dropdown/dropdown.js +++ b/ui/app/components/ui/dropdown/dropdown.js @@ -46,7 +46,7 @@ Dropdown.propTypes = { PropTypes.exact({ name: PropTypes.string, value: PropTypes.string.isRequired, - }) + }), ).isRequired, selectedOption: PropTypes.string, style: PropTypes.object, diff --git a/ui/app/components/ui/dropdown/dropdown.stories.js b/ui/app/components/ui/dropdown/dropdown.stories.js index 6e864e2ed..9b62f3c80 100644 --- a/ui/app/components/ui/dropdown/dropdown.stories.js +++ b/ui/app/components/ui/dropdown/dropdown.stories.js @@ -31,7 +31,7 @@ export const simple = () => ( select( 'Selected Option', namedOptions.map((option) => option.value), - namedOptions[0].value + namedOptions[0].value, ) } /> @@ -48,7 +48,7 @@ export const optionsWithoutNames = () => ( select( 'Selected Option', unnamedOptions.map((option) => option.value), - unnamedOptions[0].value + unnamedOptions[0].value, ) } /> @@ -65,7 +65,7 @@ export const optionsWithLongNames = () => ( select( 'Selected Option', namedOptionsWithVeryLongNames.map((option) => option.value), - namedOptionsWithVeryLongNames[0].value + namedOptionsWithVeryLongNames[0].value, ) } /> @@ -82,7 +82,7 @@ export const optionsWithLongNamesAndShortWidth = () => ( select( 'Selected Option', namedOptionsWithVeryLongNames.map((option) => option.value), - namedOptionsWithVeryLongNames[0].value + namedOptionsWithVeryLongNames[0].value, ) } style={{ width: '200px' }} diff --git a/ui/app/components/ui/error-message/tests/error-message.component.test.js b/ui/app/components/ui/error-message/tests/error-message.component.test.js index 2f13b24eb..f97b6a949 100644 --- a/ui/app/components/ui/error-message/tests/error-message.component.test.js +++ b/ui/app/components/ui/error-message/tests/error-message.component.test.js @@ -11,7 +11,7 @@ describe('ErrorMessage Component', function () { , - { context: { t } } + { context: { t } }, ) assert.ok(wrapper) @@ -25,7 +25,7 @@ describe('ErrorMessage Component', function () { , - { context: { t } } + { context: { t } }, ) assert.ok(wrapper) diff --git a/ui/app/components/ui/identicon/tests/identicon.component.test.js b/ui/app/components/ui/identicon/tests/identicon.component.test.js index 67be54f8d..8735294a0 100644 --- a/ui/app/components/ui/identicon/tests/identicon.component.test.js +++ b/ui/app/components/ui/identicon/tests/identicon.component.test.js @@ -18,7 +18,7 @@ describe('Identicon', function () { it('renders default eth_logo identicon with no props', function () { const wrapper = mount( - + , ) assert.equal(wrapper.find('img.identicon__eth-logo').prop('src'), './images/eth_logo.svg') @@ -30,7 +30,7 @@ describe('Identicon', function () { store={store} className="test-image" image="test-image" - /> + />, ) assert.equal(wrapper.find('img.test-image').prop('className'), 'identicon test-image') @@ -43,7 +43,7 @@ describe('Identicon', function () { store={store} className="test-address" address="0xTest" - /> + />, ) assert.equal(wrapper.find('div.test-address').prop('className'), 'identicon test-address') diff --git a/ui/app/components/ui/list-item/tests/list-item.test.js b/ui/app/components/ui/list-item/tests/list-item.test.js index fdd0c587c..d5855a75b 100644 --- a/ui/app/components/ui/list-item/tests/list-item.test.js +++ b/ui/app/components/ui/list-item/tests/list-item.test.js @@ -31,7 +31,7 @@ describe('ListItem', function () { onClick={clickHandler} > {CHILDREN} - + , ) }) it('includes the data-testid', function () { diff --git a/ui/app/components/ui/menu/menu.js b/ui/app/components/ui/menu/menu.js index 8fa40f508..9682a8cc6 100644 --- a/ui/app/components/ui/menu/menu.js +++ b/ui/app/components/ui/menu/menu.js @@ -22,7 +22,7 @@ const Menu = ({ anchorElement, children, className, onHide, popperOptions }) => { children }
, - popoverContainerElement.current + popoverContainerElement.current, ) } diff --git a/ui/app/components/ui/metafox-logo/tests/metafox-logo.component.test.js b/ui/app/components/ui/metafox-logo/tests/metafox-logo.component.test.js index 41d33ec1c..b44754c14 100644 --- a/ui/app/components/ui/metafox-logo/tests/metafox-logo.component.test.js +++ b/ui/app/components/ui/metafox-logo/tests/metafox-logo.component.test.js @@ -7,7 +7,7 @@ describe('MetaFoxLogo', function () { it('sets icon height and width to 42 by default', function () { const wrapper = mount( - + , ) assert.equal(wrapper.find('img.app-header__metafox-logo--icon').prop('width'), 42) @@ -16,7 +16,7 @@ describe('MetaFoxLogo', function () { it('does not set icon height and width when unsetIconHeight is true', function () { const wrapper = mount( - + , ) assert.equal(wrapper.find('img.app-header__metafox-logo--icon').prop('width'), null) diff --git a/ui/app/components/ui/page-container/page-container-footer/tests/page-container-footer.component.test.js b/ui/app/components/ui/page-container/page-container-footer/tests/page-container-footer.component.test.js index 691ad3d8f..f7b365e8e 100644 --- a/ui/app/components/ui/page-container/page-container-footer/tests/page-container-footer.component.test.js +++ b/ui/app/components/ui/page-container/page-container-footer/tests/page-container-footer.component.test.js @@ -32,7 +32,7 @@ describe('Page Footer', function () {
Works
, - { context: { t: sinon.spy((k) => `[${k}]`) } } + { context: { t: sinon.spy((k) => `[${k}]`) } }, ) assert.equal(wrapper.find('.page-container__footer-secondary').length, 1) diff --git a/ui/app/components/ui/token-input/tests/token-input.component.test.js b/ui/app/components/ui/token-input/tests/token-input.component.test.js index 50e4b612d..201c6b4ab 100644 --- a/ui/app/components/ui/token-input/tests/token-input.component.test.js +++ b/ui/app/components/ui/token-input/tests/token-input.component.test.js @@ -99,7 +99,7 @@ describe('TokenInput Component', function () { }} tokenExchangeRates={{ '0x1': 2 }} /> - + , ) assert.ok(wrapper) @@ -133,7 +133,7 @@ describe('TokenInput Component', function () { tokenExchangeRates={{ '0x1': 2 }} showFiat /> - + , ) assert.ok(wrapper) @@ -216,7 +216,7 @@ describe('TokenInput Component', function () { }} tokenExchangeRates={{ '0x1': 2 }} /> - + , ) assert.ok(wrapper) @@ -258,7 +258,7 @@ describe('TokenInput Component', function () { tokenExchangeRates={{ '0x1': 2 }} showFiat /> - + , ) assert.ok(wrapper) @@ -300,7 +300,7 @@ describe('TokenInput Component', function () { tokenExchangeRates={{ '0x1': 2 }} showFiat /> - + , ) assert.ok(wrapper) diff --git a/ui/app/components/ui/unit-input/tests/unit-input.component.test.js b/ui/app/components/ui/unit-input/tests/unit-input.component.test.js index a8a14cfac..b4a13061d 100644 --- a/ui/app/components/ui/unit-input/tests/unit-input.component.test.js +++ b/ui/app/components/ui/unit-input/tests/unit-input.component.test.js @@ -8,7 +8,7 @@ describe('UnitInput Component', function () { describe('rendering', function () { it('should render properly without a suffix', function () { const wrapper = shallow( - + , ) assert.ok(wrapper) @@ -19,7 +19,7 @@ describe('UnitInput Component', function () { const wrapper = shallow( + />, ) assert.ok(wrapper) @@ -33,7 +33,7 @@ describe('UnitInput Component', function () {
TESTCOMPONENT
-
+
, ) assert.ok(wrapper) @@ -45,7 +45,7 @@ describe('UnitInput Component', function () { const wrapper = shallow( + />, ) assert.ok(wrapper) @@ -64,7 +64,7 @@ describe('UnitInput Component', function () { it('should focus the input on component click', function () { const wrapper = mount( - + , ) assert.ok(wrapper) @@ -80,7 +80,7 @@ describe('UnitInput Component', function () { const wrapper = mount( + />, ) assert.ok(wrapper) @@ -96,7 +96,7 @@ describe('UnitInput Component', function () { const wrapper = mount( + />, ) assert.ok(wrapper) @@ -107,7 +107,7 @@ describe('UnitInput Component', function () { const wrapper = mount( + />, ) assert.ok(wrapper) diff --git a/ui/app/contexts/metametrics.js b/ui/app/contexts/metametrics.js index df89c25c5..ced6d4944 100644 --- a/ui/app/contexts/metametrics.js +++ b/ui/app/contexts/metametrics.js @@ -23,7 +23,7 @@ import { export const MetaMetricsContext = createContext(() => { captureException( - Error(`MetaMetrics context function was called from a react node that is not a descendant of a MetaMetrics context provider`) + Error(`MetaMetrics context function was called from a react node that is not a descendant of a MetaMetrics context provider`), ) }) diff --git a/ui/app/ducks/confirm-transaction/confirm-transaction.duck.test.js b/ui/app/ducks/confirm-transaction/confirm-transaction.duck.test.js index 52c9301d3..720d0307b 100644 --- a/ui/app/ducks/confirm-transaction/confirm-transaction.duck.test.js +++ b/ui/app/ducks/confirm-transaction/confirm-transaction.duck.test.js @@ -101,7 +101,7 @@ describe('Confirm Transaction Duck', function () { ...mockState.txData, id: 2, }, - } + }, ) }) @@ -113,7 +113,7 @@ describe('Confirm Transaction Duck', function () { { ...mockState, txData: {}, - } + }, ) }) @@ -131,7 +131,7 @@ describe('Confirm Transaction Duck', function () { ...mockState.tokenData, name: 'defToken', }, - } + }, ) }) @@ -143,7 +143,7 @@ describe('Confirm Transaction Duck', function () { { ...mockState, tokenData: {}, - } + }, ) }) @@ -161,7 +161,7 @@ describe('Confirm Transaction Duck', function () { ...mockState.methodData, name: 'transferFrom', }, - } + }, ) }) @@ -173,7 +173,7 @@ describe('Confirm Transaction Duck', function () { { ...mockState, methodData: {}, - } + }, ) }) @@ -192,7 +192,7 @@ describe('Confirm Transaction Duck', function () { fiatTransactionAmount: '123.45', ethTransactionAmount: '.5', hexTransactionAmount: '0x1', - } + }, ) }) @@ -211,7 +211,7 @@ describe('Confirm Transaction Duck', function () { fiatTransactionFee: '123.45', ethTransactionFee: '.5', hexTransactionFee: '0x1', - } + }, ) }) @@ -230,7 +230,7 @@ describe('Confirm Transaction Duck', function () { fiatTransactionTotal: '123.45', ethTransactionTotal: '.5', hexTransactionTotal: '0x1', - } + }, ) }) @@ -249,7 +249,7 @@ describe('Confirm Transaction Duck', function () { tokenSymbol: 'DEF', tokenDecimals: '1', }, - } + }, ) }) @@ -262,7 +262,7 @@ describe('Confirm Transaction Duck', function () { { ...mockState, nonce: '0x1', - } + }, ) }) @@ -275,7 +275,7 @@ describe('Confirm Transaction Duck', function () { { ...mockState, toSmartContract: true, - } + }, ) }) @@ -287,7 +287,7 @@ describe('Confirm Transaction Duck', function () { { ...mockState, fetchingData: true, - } + }, ) }) @@ -313,7 +313,7 @@ describe('Confirm Transaction Duck', function () { assert.deepEqual( actions.updateTxData(txData), - expectedAction + expectedAction, ) }) @@ -324,7 +324,7 @@ describe('Confirm Transaction Duck', function () { assert.deepEqual( actions.clearTxData(), - expectedAction + expectedAction, ) }) @@ -337,7 +337,7 @@ describe('Confirm Transaction Duck', function () { assert.deepEqual( actions.updateTokenData(tokenData), - expectedAction + expectedAction, ) }) @@ -348,7 +348,7 @@ describe('Confirm Transaction Duck', function () { assert.deepEqual( actions.clearTokenData(), - expectedAction + expectedAction, ) }) @@ -361,7 +361,7 @@ describe('Confirm Transaction Duck', function () { assert.deepEqual( actions.updateMethodData(methodData), - expectedAction + expectedAction, ) }) @@ -372,7 +372,7 @@ describe('Confirm Transaction Duck', function () { assert.deepEqual( actions.clearMethodData(), - expectedAction + expectedAction, ) }) @@ -385,7 +385,7 @@ describe('Confirm Transaction Duck', function () { assert.deepEqual( actions.updateTransactionAmounts(transactionAmounts), - expectedAction + expectedAction, ) }) @@ -398,7 +398,7 @@ describe('Confirm Transaction Duck', function () { assert.deepEqual( actions.updateTransactionFees(transactionFees), - expectedAction + expectedAction, ) }) @@ -411,7 +411,7 @@ describe('Confirm Transaction Duck', function () { assert.deepEqual( actions.updateTransactionTotals(transactionTotals), - expectedAction + expectedAction, ) }) @@ -427,7 +427,7 @@ describe('Confirm Transaction Duck', function () { assert.deepEqual( actions.updateTokenProps(tokenProps), - expectedAction + expectedAction, ) }) @@ -440,7 +440,7 @@ describe('Confirm Transaction Duck', function () { assert.deepEqual( actions.updateNonce(nonce), - expectedAction + expectedAction, ) }) @@ -451,7 +451,7 @@ describe('Confirm Transaction Duck', function () { assert.deepEqual( actions.setFetchingData(true), - expectedAction + expectedAction, ) }) @@ -462,7 +462,7 @@ describe('Confirm Transaction Duck', function () { assert.deepEqual( actions.setFetchingData(false), - expectedAction + expectedAction, ) }) @@ -473,7 +473,7 @@ describe('Confirm Transaction Duck', function () { assert.deepEqual( actions.clearConfirmTransaction(), - expectedAction + expectedAction, ) }) }) @@ -482,7 +482,7 @@ describe('Confirm Transaction Duck', function () { beforeEach(function () { global.eth = { getCode: sinon.stub().callsFake( - (address) => Promise.resolve(address && address.match(/isContract/) ? 'not-0x' : '0x') + (address) => Promise.resolve(address && address.match(/isContract/) ? 'not-0x' : '0x'), ), } }) diff --git a/ui/app/ducks/gas/gas-duck.test.js b/ui/app/ducks/gas/gas-duck.test.js index b63cf0509..c46875693 100644 --- a/ui/app/ducks/gas/gas-duck.test.js +++ b/ui/app/ducks/gas/gas-duck.test.js @@ -168,7 +168,7 @@ describe('Gas Duck', function () { it('should set gasEstimatesLoading to true when receiving a GAS_ESTIMATE_LOADING_STARTED action', function () { assert.deepEqual( GasReducer(mockState, { type: GAS_ESTIMATE_LOADING_STARTED }), - { gasEstimatesLoading: true, ...mockState } + { gasEstimatesLoading: true, ...mockState }, ) }) @@ -288,7 +288,7 @@ describe('Gas Duck', function () { })) assert.deepEqual( mockDistpatch.getCall(0).args, - [{ type: BASIC_GAS_ESTIMATE_LOADING_STARTED } ] + [{ type: BASIC_GAS_ESTIMATE_LOADING_STARTED } ], ) assert.ok( window.fetch.getCall(0).args[0].startsWith('https://ethgasstation.info/json/ethgasAPI.json'), @@ -296,7 +296,7 @@ describe('Gas Duck', function () { ) assert.deepEqual( mockDistpatch.getCall(1).args, - [{ type: SET_BASIC_PRICE_ESTIMATES_LAST_RETRIEVED, value: 2000000 } ] + [{ type: SET_BASIC_PRICE_ESTIMATES_LAST_RETRIEVED, value: 2000000 } ], ) assert.deepEqual( mockDistpatch.getCall(2).args, @@ -310,11 +310,11 @@ describe('Gas Duck', function () { fastest: 4, safeLow: 1, }, - }] + }], ) assert.deepEqual( mockDistpatch.getCall(3).args, - [{ type: BASIC_GAS_ESTIMATE_LOADING_FINISHED }] + [{ type: BASIC_GAS_ESTIMATE_LOADING_FINISHED }], ) }) @@ -337,11 +337,11 @@ describe('Gas Duck', function () { await fetchBasicGasEstimates()(mockDistpatch, () => ({ gas: Object.assign( {}, initState, - {} + {}, ) })) assert.deepEqual( mockDistpatch.getCall(0).args, - [{ type: BASIC_GAS_ESTIMATE_LOADING_STARTED } ] + [{ type: BASIC_GAS_ESTIMATE_LOADING_STARTED } ], ) assert.ok(window.fetch.notCalled) assert.deepEqual( @@ -356,11 +356,11 @@ describe('Gas Duck', function () { fastest: 45, safeLow: 15, }, - }] + }], ) assert.deepEqual( mockDistpatch.getCall(2).args, - [{ type: BASIC_GAS_ESTIMATE_LOADING_FINISHED }] + [{ type: BASIC_GAS_ESTIMATE_LOADING_FINISHED }], ) }) @@ -373,11 +373,11 @@ describe('Gas Duck', function () { await fetchBasicGasEstimates()(mockDistpatch, () => ({ gas: Object.assign( {}, initState, - {} + {}, ) })) assert.deepEqual( mockDistpatch.getCall(0).args, - [{ type: BASIC_GAS_ESTIMATE_LOADING_STARTED } ] + [{ type: BASIC_GAS_ESTIMATE_LOADING_STARTED } ], ) assert.ok( window.fetch.getCall(0).args[0].startsWith('https://ethgasstation.info/json/ethgasAPI.json'), @@ -385,7 +385,7 @@ describe('Gas Duck', function () { ) assert.deepEqual( mockDistpatch.getCall(1).args, - [{ type: SET_BASIC_PRICE_ESTIMATES_LAST_RETRIEVED, value: 2000000 } ] + [{ type: SET_BASIC_PRICE_ESTIMATES_LAST_RETRIEVED, value: 2000000 } ], ) assert.deepEqual( mockDistpatch.getCall(2).args, @@ -399,11 +399,11 @@ describe('Gas Duck', function () { fastest: 4, safeLow: 1, }, - }] + }], ) assert.deepEqual( mockDistpatch.getCall(3).args, - [{ type: BASIC_GAS_ESTIMATE_LOADING_FINISHED }] + [{ type: BASIC_GAS_ESTIMATE_LOADING_FINISHED }], ) }) }) @@ -415,13 +415,13 @@ describe('Gas Duck', function () { await fetchBasicGasAndTimeEstimates()(mockDistpatch, () => ({ gas: Object.assign( {}, initState, - { basicPriceAndTimeEstimatesLastRetrieved: 1000000 } + { basicPriceAndTimeEstimatesLastRetrieved: 1000000 }, ), metamask: { provider: { type: 'ropsten' } }, })) assert.deepEqual( mockDistpatch.getCall(0).args, - [{ type: BASIC_GAS_ESTIMATE_LOADING_STARTED } ] + [{ type: BASIC_GAS_ESTIMATE_LOADING_STARTED } ], ) assert.ok( window.fetch.getCall(0).args[0].startsWith('https://ethgasstation.info/json/ethgasAPI.json'), @@ -430,7 +430,7 @@ describe('Gas Duck', function () { assert.deepEqual( mockDistpatch.getCall(1).args, - [{ type: SET_BASIC_API_ESTIMATES_LAST_RETRIEVED, value: 2000000 } ] + [{ type: SET_BASIC_API_ESTIMATES_LAST_RETRIEVED, value: 2000000 } ], ) assert.deepEqual( @@ -450,11 +450,11 @@ describe('Gas Duck', function () { safeLowWait: 'mockSafeLowWait', speed: 'mockSpeed', }, - }] + }], ) assert.deepEqual( mockDistpatch.getCall(3).args, - [{ type: BASIC_GAS_ESTIMATE_LOADING_FINISHED }] + [{ type: BASIC_GAS_ESTIMATE_LOADING_FINISHED }], ) }) @@ -482,13 +482,13 @@ describe('Gas Duck', function () { await fetchBasicGasAndTimeEstimates()(mockDistpatch, () => ({ gas: Object.assign( {}, initState, - {} + {}, ), metamask: { provider: { type: 'ropsten' } }, })) assert.deepEqual( mockDistpatch.getCall(0).args, - [{ type: BASIC_GAS_ESTIMATE_LOADING_STARTED } ] + [{ type: BASIC_GAS_ESTIMATE_LOADING_STARTED } ], ) assert.ok(window.fetch.notCalled) @@ -509,11 +509,11 @@ describe('Gas Duck', function () { safeLowWait: 'mockSafeLowWait', speed: 'mockSpeed', }, - }] + }], ) assert.deepEqual( mockDistpatch.getCall(2).args, - [{ type: BASIC_GAS_ESTIMATE_LOADING_FINISHED }] + [{ type: BASIC_GAS_ESTIMATE_LOADING_FINISHED }], ) }) @@ -526,13 +526,13 @@ describe('Gas Duck', function () { await fetchBasicGasAndTimeEstimates()(mockDistpatch, () => ({ gas: Object.assign( {}, initState, - {} + {}, ), metamask: { provider: { type: 'ropsten' } }, })) assert.deepEqual( mockDistpatch.getCall(0).args, - [{ type: BASIC_GAS_ESTIMATE_LOADING_STARTED } ] + [{ type: BASIC_GAS_ESTIMATE_LOADING_STARTED } ], ) assert.ok( window.fetch.getCall(0).args[0].startsWith('https://ethgasstation.info/json/ethgasAPI.json'), @@ -541,7 +541,7 @@ describe('Gas Duck', function () { assert.deepEqual( mockDistpatch.getCall(1).args, - [{ type: SET_BASIC_API_ESTIMATES_LAST_RETRIEVED, value: 2000000 } ] + [{ type: SET_BASIC_API_ESTIMATES_LAST_RETRIEVED, value: 2000000 } ], ) assert.deepEqual( @@ -561,11 +561,11 @@ describe('Gas Duck', function () { safeLowWait: 'mockSafeLowWait', speed: 'mockSpeed', }, - }] + }], ) assert.deepEqual( mockDistpatch.getCall(3).args, - [{ type: BASIC_GAS_ESTIMATE_LOADING_FINISHED }] + [{ type: BASIC_GAS_ESTIMATE_LOADING_FINISHED }], ) }) }) @@ -577,13 +577,13 @@ describe('Gas Duck', function () { await fetchGasEstimates(5)(mockDistpatch, () => ({ gas: Object.assign( {}, initState, - { priceAndTimeEstimatesLastRetrieved: 1000000 } + { priceAndTimeEstimatesLastRetrieved: 1000000 }, ), metamask: { provider: { type: 'ropsten' } }, })) assert.deepEqual( mockDistpatch.getCall(0).args, - [{ type: GAS_ESTIMATE_LOADING_STARTED } ] + [{ type: GAS_ESTIMATE_LOADING_STARTED } ], ) assert.ok( window.fetch.getCall(0).args[0].startsWith('https://ethgasstation.info/json/predictTable.json'), @@ -592,7 +592,7 @@ describe('Gas Duck', function () { assert.deepEqual( mockDistpatch.getCall(1).args, - [{ type: SET_API_ESTIMATES_LAST_RETRIEVED, value: 2000000 }] + [{ type: SET_API_ESTIMATES_LAST_RETRIEVED, value: 2000000 }], ) const { type: thirdDispatchCallType, value: priceAndTimeEstimateResult } = mockDistpatch.getCall(2).args[0] @@ -604,7 +604,7 @@ describe('Gas Duck', function () { assert.deepEqual( mockDistpatch.getCall(3).args, - [{ type: GAS_ESTIMATE_LOADING_FINISHED }] + [{ type: GAS_ESTIMATE_LOADING_FINISHED }], ) }) @@ -621,13 +621,13 @@ describe('Gas Duck', function () { expectedWait: 2, gasprice: 50, }], - } + }, ), metamask: { provider: { type: 'ropsten' } }, })) assert.deepEqual( mockDistpatch.getCall(0).args, - [{ type: GAS_ESTIMATE_LOADING_STARTED } ] + [{ type: GAS_ESTIMATE_LOADING_STARTED } ], ) assert.equal(window.fetch.callCount, 0) @@ -643,11 +643,11 @@ describe('Gas Duck', function () { }, ], - }] + }], ) assert.deepEqual( mockDistpatch.getCall(2).args, - [{ type: GAS_ESTIMATE_LOADING_FINISHED }] + [{ type: GAS_ESTIMATE_LOADING_FINISHED }], ) }) }) @@ -656,7 +656,7 @@ describe('Gas Duck', function () { it('should create the correct action', function () { assert.deepEqual( gasEstimatesLoadingStarted(), - { type: GAS_ESTIMATE_LOADING_STARTED } + { type: GAS_ESTIMATE_LOADING_STARTED }, ) }) }) @@ -665,7 +665,7 @@ describe('Gas Duck', function () { it('should create the correct action', function () { assert.deepEqual( gasEstimatesLoadingFinished(), - { type: GAS_ESTIMATE_LOADING_FINISHED } + { type: GAS_ESTIMATE_LOADING_FINISHED }, ) }) }) @@ -674,7 +674,7 @@ describe('Gas Duck', function () { it('should create the correct action', function () { assert.deepEqual( setPricesAndTimeEstimates('mockPricesAndTimeEstimates'), - { type: SET_PRICE_AND_TIME_ESTIMATES, value: 'mockPricesAndTimeEstimates' } + { type: SET_PRICE_AND_TIME_ESTIMATES, value: 'mockPricesAndTimeEstimates' }, ) }) }) @@ -683,7 +683,7 @@ describe('Gas Duck', function () { it('should create the correct action', function () { assert.deepEqual( setBasicGasEstimateData('mockBasicEstimatData'), - { type: SET_BASIC_GAS_ESTIMATE_DATA, value: 'mockBasicEstimatData' } + { type: SET_BASIC_GAS_ESTIMATE_DATA, value: 'mockBasicEstimatData' }, ) }) }) @@ -692,7 +692,7 @@ describe('Gas Duck', function () { it('should create the correct action', function () { assert.deepEqual( setCustomGasPrice('mockCustomGasPrice'), - { type: SET_CUSTOM_GAS_PRICE, value: 'mockCustomGasPrice' } + { type: SET_CUSTOM_GAS_PRICE, value: 'mockCustomGasPrice' }, ) }) }) @@ -701,7 +701,7 @@ describe('Gas Duck', function () { it('should create the correct action', function () { assert.deepEqual( setCustomGasLimit('mockCustomGasLimit'), - { type: SET_CUSTOM_GAS_LIMIT, value: 'mockCustomGasLimit' } + { type: SET_CUSTOM_GAS_LIMIT, value: 'mockCustomGasLimit' }, ) }) }) @@ -710,7 +710,7 @@ describe('Gas Duck', function () { it('should create the correct action', function () { assert.deepEqual( setCustomGasTotal('mockCustomGasTotal'), - { type: SET_CUSTOM_GAS_TOTAL, value: 'mockCustomGasTotal' } + { type: SET_CUSTOM_GAS_TOTAL, value: 'mockCustomGasTotal' }, ) }) }) @@ -719,7 +719,7 @@ describe('Gas Duck', function () { it('should create the correct action', function () { assert.deepEqual( setCustomGasErrors('mockErrorObject'), - { type: SET_CUSTOM_GAS_ERRORS, value: 'mockErrorObject' } + { type: SET_CUSTOM_GAS_ERRORS, value: 'mockErrorObject' }, ) }) }) @@ -728,7 +728,7 @@ describe('Gas Duck', function () { it('should create the correct action', function () { assert.deepEqual( setApiEstimatesLastRetrieved(1234), - { type: SET_API_ESTIMATES_LAST_RETRIEVED, value: 1234 } + { type: SET_API_ESTIMATES_LAST_RETRIEVED, value: 1234 }, ) }) }) @@ -737,7 +737,7 @@ describe('Gas Duck', function () { it('should create the correct action', function () { assert.deepEqual( resetCustomGasState(), - { type: RESET_CUSTOM_GAS_STATE } + { type: RESET_CUSTOM_GAS_STATE }, ) }) }) diff --git a/ui/app/ducks/gas/gas.duck.js b/ui/app/ducks/gas/gas.duck.js index 79b9aed44..c1d7336e3 100644 --- a/ui/app/ducks/gas/gas.duck.js +++ b/ui/app/ducks/gas/gas.duck.js @@ -194,7 +194,7 @@ async function queryEthGasStationPredictionTable () { 'referrerPolicy': 'no-referrer-when-downgrade', 'body': null, 'method': 'GET', - 'mode': 'cors' } + 'mode': 'cors' }, ) } @@ -441,7 +441,7 @@ export function fetchGasEstimates (blockTime) { }) : Promise.resolve(priceAndTimeEstimates.length ? priceAndTimeEstimates - : loadLocalStorageData('GAS_API_ESTIMATES') + : loadLocalStorageData('GAS_API_ESTIMATES'), ) return promiseToFetch.then((estimates) => { diff --git a/ui/app/helpers/higher-order-components/with-modal-props/tests/with-modal-props.test.js b/ui/app/helpers/higher-order-components/with-modal-props/tests/with-modal-props.test.js index 08307c25f..e14adb2ce 100644 --- a/ui/app/helpers/higher-order-components/with-modal-props/tests/with-modal-props.test.js +++ b/ui/app/helpers/higher-order-components/with-modal-props/tests/with-modal-props.test.js @@ -27,7 +27,7 @@ describe('withModalProps', function () { const WrappedComponent = withModalProps(TestComponent) const store = configureMockStore()(mockState) const wrapper = mount( - + , ) assert.ok(wrapper) diff --git a/ui/app/helpers/utils/confirm-tx.util.test.js b/ui/app/helpers/utils/confirm-tx.util.test.js index bc39d984e..71783402e 100644 --- a/ui/app/helpers/utils/confirm-tx.util.test.js +++ b/ui/app/helpers/utils/confirm-tx.util.test.js @@ -18,28 +18,28 @@ describe('Confirm Transaction utils', function () { it('should return true if the first value is greater than the second value', function () { assert.equal( utils.hexGreaterThan('0xb', '0xa'), - true + true, ) }) it('should return false if the first value is less than the second value', function () { assert.equal( utils.hexGreaterThan('0xa', '0xb'), - false + false, ) }) it('should return false if the first value is equal to the second value', function () { assert.equal( utils.hexGreaterThan('0xa', '0xa'), - false + false, ) }) it('should correctly compare prefixed and non-prefixed hex values', function () { assert.equal( utils.hexGreaterThan('0xb', 'a'), - true + true, ) }) }) @@ -48,14 +48,14 @@ describe('Confirm Transaction utils', function () { it('should multiply the hex gasLimit and hex gasPrice values together', function () { assert.equal( utils.getHexGasTotal({ gasLimit: '0x5208', gasPrice: '0x3b9aca00' }), - '0x1319718a5000' + '0x1319718a5000', ) }) it('should prefix the result with 0x', function () { assert.equal( utils.getHexGasTotal({ gasLimit: '5208', gasPrice: '3b9aca00' }), - '0x1319718a5000' + '0x1319718a5000', ) }) }) @@ -64,14 +64,14 @@ describe('Confirm Transaction utils', function () { it('should add two values together rounding to 6 decimal places', function () { assert.equal( utils.addEth('0.12345678', '0'), - '0.123457' + '0.123457', ) }) it('should add any number of values together rounding to 6 decimal places', function () { assert.equal( utils.addEth('0.1', '0.02', '0.003', '0.0004', '0.00005', '0.000006', '0.0000007'), - '0.123457' + '0.123457', ) }) }) @@ -80,14 +80,14 @@ describe('Confirm Transaction utils', function () { it('should add two values together rounding to 2 decimal places', function () { assert.equal( utils.addFiat('0.12345678', '0'), - '0.12' + '0.12', ) }) it('should add any number of values together rounding to 2 decimal places', function () { assert.equal( utils.addFiat('0.1', '0.02', '0.003', '0.0004', '0.00005', '0.000006', '0.0000007'), - '0.12' + '0.12', ) }) }) diff --git a/ui/app/helpers/utils/conversion-util.js b/ui/app/helpers/utils/conversion-util.js index 1b4f89ed7..adc9b65e2 100644 --- a/ui/app/helpers/utils/conversion-util.js +++ b/ui/app/helpers/utils/conversion-util.js @@ -222,7 +222,7 @@ const conversionMax = ( ) => { const firstIsGreater = conversionGreaterThan( { ...firstProps }, - { ...secondProps } + { ...secondProps }, ) return firstIsGreater ? firstProps.value : secondProps.value diff --git a/ui/app/helpers/utils/token-util.js b/ui/app/helpers/utils/token-util.js index e6245547f..eb427fe0b 100644 --- a/ui/app/helpers/utils/token-util.js +++ b/ui/app/helpers/utils/token-util.js @@ -160,7 +160,7 @@ export function getFormattedTokenFiatAmount ( conversionRate, currentCurrency, tokenAmount, - tokenSymbol + tokenSymbol, ) { // If the conversionRate is 0 (i.e. unknown) or the contract exchange rate // is currently unknown, the fiat amount cannot be calculated so it is not @@ -171,7 +171,7 @@ export function getFormattedTokenFiatAmount ( const currentTokenToFiatRate = multiplyCurrencies( contractExchangeRate, - conversionRate + conversionRate, ) const currentTokenInFiat = conversionUtil(tokenAmount, { fromNumericBase: 'dec', diff --git a/ui/app/hooks/tests/useCancelTransaction.test.js b/ui/app/hooks/tests/useCancelTransaction.test.js index 7154d0023..8bf58706a 100644 --- a/ui/app/hooks/tests/useCancelTransaction.test.js +++ b/ui/app/hooks/tests/useCancelTransaction.test.js @@ -52,9 +52,9 @@ describe('useCancelTransaction', function () { name: 'CANCEL_TRANSACTION', transactionId, originalGasPrice, - }) + }), ), - true + true, ) }) }) @@ -95,9 +95,9 @@ describe('useCancelTransaction', function () { name: 'CANCEL_TRANSACTION', transactionId, originalGasPrice, - }) + }), ), - true + true, ) }) }) diff --git a/ui/app/hooks/tests/useRetryTransaction.test.js b/ui/app/hooks/tests/useRetryTransaction.test.js index 5c241db63..d6c55d0f8 100644 --- a/ui/app/hooks/tests/useRetryTransaction.test.js +++ b/ui/app/hooks/tests/useRetryTransaction.test.js @@ -53,9 +53,9 @@ describe('useRetryTransaction', function () { transitionName: 'sidebar-left', type: 'customize-gas', props: { transaction: retryEnabledTransaction.initialTransaction }, - }) + }), ), - true + true, ) }) diff --git a/ui/app/hooks/useCurrencyDisplay.js b/ui/app/hooks/useCurrencyDisplay.js index b140f0d98..17568b874 100644 --- a/ui/app/hooks/useCurrencyDisplay.js +++ b/ui/app/hooks/useCurrencyDisplay.js @@ -51,7 +51,7 @@ export function useCurrencyDisplay (inputValue, { displayValue, prefix, numberOf numberOfDecimals: numberOfDecimals || 2, toDenomination: denomination, }), - toCurrency + toCurrency, ) }, [inputValue, nativeCurrency, conversionRate, displayValue, numberOfDecimals, denomination, toCurrency]) diff --git a/ui/app/hooks/useTokenDisplayValue.js b/ui/app/hooks/useTokenDisplayValue.js index 609d72b2b..107a2c11e 100644 --- a/ui/app/hooks/useTokenDisplayValue.js +++ b/ui/app/hooks/useTokenDisplayValue.js @@ -34,7 +34,7 @@ export function useTokenDisplayValue (transactionData, token, isTokenTransaction // and a token object has been provided token && // and we are able to parse the token details from the raw data - tokenData?.params?.length + tokenData?.params?.length, ) const displayValue = useMemo(() => { diff --git a/ui/app/hooks/useTokenFiatAmount.js b/ui/app/hooks/useTokenFiatAmount.js index 164220ce5..b8b24da23 100644 --- a/ui/app/hooks/useTokenFiatAmount.js +++ b/ui/app/hooks/useTokenFiatAmount.js @@ -25,9 +25,9 @@ export function useTokenFiatAmount (tokenAddress, tokenAmount, tokenSymbol) { conversionRate, currentCurrency, tokenAmount, - tokenSymbol + tokenSymbol, ), - [tokenExchangeRate, conversionRate, currentCurrency, tokenAmount, tokenSymbol] + [tokenExchangeRate, conversionRate, currentCurrency, tokenAmount, tokenSymbol], ) if (!showFiat || currentCurrency.toUpperCase() === tokenSymbol) { diff --git a/ui/app/hooks/useTransactionTimeRemaining.js b/ui/app/hooks/useTransactionTimeRemaining.js index 1f959c82f..f9c71c3a0 100644 --- a/ui/app/hooks/useTransactionTimeRemaining.js +++ b/ui/app/hooks/useTransactionTimeRemaining.js @@ -36,7 +36,7 @@ export function useTransactionTimeRemaining ( isPending, isEarliestNonce, submittedTime, - currentGasPrice + currentGasPrice, ) { // the following two selectors return the result of mapping over an array, as such they // will always be new objects and trigger effects. To avoid this, we use isEqual as the @@ -71,11 +71,11 @@ export function useTransactionTimeRemaining ( ) { clearInterval(interval.current) setTimeRemaining( - calcTransactionTimeRemaining(initialTimeEstimate, submittedTime) + calcTransactionTimeRemaining(initialTimeEstimate, submittedTime), ) interval.current = setInterval(() => { setTimeRemaining( - calcTransactionTimeRemaining(initialTimeEstimate, submittedTime) + calcTransactionTimeRemaining(initialTimeEstimate, submittedTime), ) }, 10000) return () => clearInterval(interval.current) diff --git a/ui/app/pages/add-token/tests/add-token.test.js b/ui/app/pages/add-token/tests/add-token.test.js index ab7dea743..fa9e4bd19 100644 --- a/ui/app/pages/add-token/tests/add-token.test.js +++ b/ui/app/pages/add-token/tests/add-token.test.js @@ -33,7 +33,7 @@ describe('Add Token', function () { wrapper = mountWithRouter( - , store + , store, ) wrapper.find({ name: 'customToken' }).simulate('click') diff --git a/ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.container.js b/ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.container.js index 390a074c6..1b84279b1 100644 --- a/ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.container.js +++ b/ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.container.js @@ -25,5 +25,5 @@ const mapDispatchToProps = (dispatch) => { export default compose( withRouter, - connect(mapStateToProps, mapDispatchToProps) + connect(mapStateToProps, mapDispatchToProps), )(ConfirmAddSuggestedToken) diff --git a/ui/app/pages/confirm-approve/confirm-approve.js b/ui/app/pages/confirm-approve/confirm-approve.js index 42a7d8843..b5c34c390 100644 --- a/ui/app/pages/confirm-approve/confirm-approve.js +++ b/ui/app/pages/confirm-approve/confirm-approve.js @@ -69,7 +69,7 @@ export default function ConfirmApprove () { } previousTokenAmount.current = tokenAmount }, - [customPermissionAmount, tokenAmount] + [customPermissionAmount, tokenAmount], ) const { origin } = transaction @@ -124,7 +124,7 @@ export default function ConfirmApprove () { tokenAmount, tokenBalance, tokenSymbol, - }) + }), ) } data={customData || data} diff --git a/ui/app/pages/confirm-decrypt-message/confirm-decrypt-message.container.js b/ui/app/pages/confirm-decrypt-message/confirm-decrypt-message.container.js index 85c14a8c6..e068b403f 100644 --- a/ui/app/pages/confirm-decrypt-message/confirm-decrypt-message.container.js +++ b/ui/app/pages/confirm-decrypt-message/confirm-decrypt-message.container.js @@ -65,5 +65,5 @@ function mapDispatchToProps (dispatch) { export default compose( withRouter, - connect(mapStateToProps, mapDispatchToProps) + connect(mapStateToProps, mapDispatchToProps), )(ConfirmDecryptMessage) diff --git a/ui/app/pages/confirm-encryption-public-key/confirm-encryption-public-key.container.js b/ui/app/pages/confirm-encryption-public-key/confirm-encryption-public-key.container.js index 264b29567..8d91540e5 100644 --- a/ui/app/pages/confirm-encryption-public-key/confirm-encryption-public-key.container.js +++ b/ui/app/pages/confirm-encryption-public-key/confirm-encryption-public-key.container.js @@ -59,5 +59,5 @@ function mapDispatchToProps (dispatch) { export default compose( withRouter, - connect(mapStateToProps, mapDispatchToProps) + connect(mapStateToProps, mapDispatchToProps), )(ConfirmEncryptionPublicKey) diff --git a/ui/app/pages/confirm-send-ether/confirm-send-ether.container.js b/ui/app/pages/confirm-send-ether/confirm-send-ether.container.js index 5640d9e0a..03268571e 100644 --- a/ui/app/pages/confirm-send-ether/confirm-send-ether.container.js +++ b/ui/app/pages/confirm-send-ether/confirm-send-ether.container.js @@ -43,5 +43,5 @@ const mapDispatchToProps = (dispatch) => { export default compose( withRouter, - connect(mapStateToProps, mapDispatchToProps) + connect(mapStateToProps, mapDispatchToProps), )(ConfirmSendEther) diff --git a/ui/app/pages/confirm-send-token/confirm-send-token.container.js b/ui/app/pages/confirm-send-token/confirm-send-token.container.js index c67bcb201..ba0517ab0 100644 --- a/ui/app/pages/confirm-send-token/confirm-send-token.container.js +++ b/ui/app/pages/confirm-send-token/confirm-send-token.container.js @@ -60,5 +60,5 @@ const mapDispatchToProps = (dispatch) => { export default compose( withRouter, - connect(mapStateToProps, mapDispatchToProps) + connect(mapStateToProps, mapDispatchToProps), )(ConfirmSendToken) diff --git a/ui/app/pages/confirm-token-transaction-base/confirm-token-transaction-base.container.js b/ui/app/pages/confirm-token-transaction-base/confirm-token-transaction-base.container.js index 796c39214..0faf6b471 100644 --- a/ui/app/pages/confirm-token-transaction-base/confirm-token-transaction-base.container.js +++ b/ui/app/pages/confirm-token-transaction-base/confirm-token-transaction-base.container.js @@ -63,5 +63,5 @@ const mapStateToProps = (state, ownProps) => { export default compose( withRouter, - connect(mapStateToProps) + connect(mapStateToProps), )(ConfirmTokenTransactionBase) diff --git a/ui/app/pages/confirm-transaction-base/confirm-transaction-base.container.js b/ui/app/pages/confirm-transaction-base/confirm-transaction-base.container.js index 7e6570850..11fb474fc 100644 --- a/ui/app/pages/confirm-transaction-base/confirm-transaction-base.container.js +++ b/ui/app/pages/confirm-transaction-base/confirm-transaction-base.container.js @@ -77,7 +77,7 @@ const mapStateToProps = (state, ownProps) => { } = confirmTransaction const { txParams = {}, lastGasPrice, id: transactionId, transactionCategory } = txData const transaction = Object.values(unapprovedTxs).find( - ({ id }) => id === (transactionId || Number(paramsTransactionId)) + ({ id }) => id === (transactionId || Number(paramsTransactionId)), ) || {} const { from: fromAddress, @@ -294,5 +294,5 @@ const mergeProps = (stateProps, dispatchProps, ownProps) => { export default compose( withRouter, - connect(mapStateToProps, mapDispatchToProps, mergeProps) + connect(mapStateToProps, mapDispatchToProps, mergeProps), )(ConfirmTransactionBase) diff --git a/ui/app/pages/confirm-transaction/conf-tx.js b/ui/app/pages/confirm-transaction/conf-tx.js index 8e57a0fb0..40df45a8f 100644 --- a/ui/app/pages/confirm-transaction/conf-tx.js +++ b/ui/app/pages/confirm-transaction/conf-tx.js @@ -99,7 +99,7 @@ class ConfirmTxScreen extends Component { unapprovedMsgs, unapprovedPersonalMsgs, unapprovedTypedMessages, - network + network, ) log.info(`rendering a combined ${unconfTxList.length} unconf msgs & txs`) @@ -256,5 +256,5 @@ class ConfirmTxScreen extends Component { export default compose( withRouter, - connect(mapStateToProps) + connect(mapStateToProps), )(ConfirmTxScreen) diff --git a/ui/app/pages/connected-sites/connected-sites.component.js b/ui/app/pages/connected-sites/connected-sites.component.js index 924321512..93a8d4e26 100644 --- a/ui/app/pages/connected-sites/connected-sites.component.js +++ b/ui/app/pages/connected-sites/connected-sites.component.js @@ -142,20 +142,20 @@ export default class ConnectedSites extends Component { { t('disconnect') } - { - numPermittedAccounts > 1 - ? ( - - ) - : null - } + { + numPermittedAccounts > 1 + ? ( + + ) + : null + } )} footerClassName="connected-sites__confirmation" diff --git a/ui/app/pages/create-account/connect-hardware/index.js b/ui/app/pages/create-account/connect-hardware/index.js index 1a16dbc46..8e172bba1 100644 --- a/ui/app/pages/create-account/connect-hardware/index.js +++ b/ui/app/pages/create-account/connect-hardware/index.js @@ -285,5 +285,5 @@ ConnectHardwareForm.contextTypes = { } export default connect(mapStateToProps, mapDispatchToProps)( - ConnectHardwareForm + ConnectHardwareForm, ) diff --git a/ui/app/pages/create-account/import-account/json.js b/ui/app/pages/create-account/import-account/json.js index 01b5a59d5..304e52c50 100644 --- a/ui/app/pages/create-account/import-account/json.js +++ b/ui/app/pages/create-account/import-account/json.js @@ -176,5 +176,5 @@ JsonImportSubview.contextTypes = { export default compose( withRouter, - connect(mapStateToProps, mapDispatchToProps) + connect(mapStateToProps, mapDispatchToProps), )(JsonImportSubview) diff --git a/ui/app/pages/create-account/import-account/private-key.js b/ui/app/pages/create-account/import-account/private-key.js index 5897b7e97..f23e7f418 100644 --- a/ui/app/pages/create-account/import-account/private-key.js +++ b/ui/app/pages/create-account/import-account/private-key.js @@ -128,7 +128,7 @@ class PrivateKeyImportView extends Component { export default compose( withRouter, - connect(mapStateToProps, mapDispatchToProps) + connect(mapStateToProps, mapDispatchToProps), )(PrivateKeyImportView) diff --git a/ui/app/pages/create-account/tests/create-account.test.js b/ui/app/pages/create-account/tests/create-account.test.js index 280f68d09..b680057f1 100644 --- a/ui/app/pages/create-account/tests/create-account.test.js +++ b/ui/app/pages/create-account/tests/create-account.test.js @@ -18,7 +18,7 @@ describe('Create Account Page', function () { before(function () { wrapper = mountWithRouter( - + , ) }) diff --git a/ui/app/pages/first-time-flow/end-of-flow/tests/end-of-flow.test.js b/ui/app/pages/first-time-flow/end-of-flow/tests/end-of-flow.test.js index 9be1db528..56f4aba0d 100644 --- a/ui/app/pages/first-time-flow/end-of-flow/tests/end-of-flow.test.js +++ b/ui/app/pages/first-time-flow/end-of-flow/tests/end-of-flow.test.js @@ -17,7 +17,7 @@ describe('End of Flow Screen', function () { beforeEach(function () { wrapper = mountWithRouter( - + , ) }) diff --git a/ui/app/pages/first-time-flow/first-time-flow-switch/tests/first-time-flow-switch.test.js b/ui/app/pages/first-time-flow/first-time-flow-switch/tests/first-time-flow-switch.test.js index 2e18f68f5..3aafd2134 100644 --- a/ui/app/pages/first-time-flow/first-time-flow-switch/tests/first-time-flow-switch.test.js +++ b/ui/app/pages/first-time-flow/first-time-flow-switch/tests/first-time-flow-switch.test.js @@ -13,7 +13,7 @@ describe('FirstTimeFlowSwitch', function () { it('redirects to /welcome route with no props', function () { const wrapper = mountWithRouter( - + , ) assert.equal(wrapper.find('Lifecycle').find({ to: { pathname: INITIALIZE_WELCOME_ROUTE } }).length, 1) }) @@ -23,7 +23,7 @@ describe('FirstTimeFlowSwitch', function () { completedOnboarding: true, } const wrapper = mountWithRouter( - + , ) assert.equal(wrapper.find('Lifecycle').find({ to: { pathname: DEFAULT_ROUTE } }).length, 1) @@ -36,7 +36,7 @@ describe('FirstTimeFlowSwitch', function () { } const wrapper = mountWithRouter( - + , ) assert.equal(wrapper.find('Lifecycle').find({ to: { pathname: LOCK_ROUTE } }).length, 1) @@ -50,7 +50,7 @@ describe('FirstTimeFlowSwitch', function () { } const wrapper = mountWithRouter( - + , ) assert.equal(wrapper.find('Lifecycle').find({ to: { pathname: INITIALIZE_WELCOME_ROUTE } }).length, 1) @@ -64,7 +64,7 @@ describe('FirstTimeFlowSwitch', function () { } const wrapper = mountWithRouter( - + , ) assert.equal(wrapper.find('Lifecycle').find({ to: { pathname: INITIALIZE_UNLOCK_ROUTE } }).length, 1) diff --git a/ui/app/pages/first-time-flow/metametrics-opt-in/tests/metametrics-opt-in.test.js b/ui/app/pages/first-time-flow/metametrics-opt-in/tests/metametrics-opt-in.test.js index 9f1195d5d..c3b7f04fe 100644 --- a/ui/app/pages/first-time-flow/metametrics-opt-in/tests/metametrics-opt-in.test.js +++ b/ui/app/pages/first-time-flow/metametrics-opt-in/tests/metametrics-opt-in.test.js @@ -18,7 +18,7 @@ describe('MetaMetricsOptIn', function () { metamask: {}, }) const wrapper = mountWithRouter( - , store + , store, ) const noThanksButton = wrapper.find('.btn-default.page-container__footer-button') noThanksButton.simulate('click') diff --git a/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/draggable-seed.component.js b/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/draggable-seed.component.js index 7293e6098..9eea945a5 100644 --- a/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/draggable-seed.component.js +++ b/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/draggable-seed.component.js @@ -61,7 +61,7 @@ class DraggableSeed extends Component { data-testid={`draggable-seed-${selected ? 'selected-' : ''}${word}`} > { word } - + , )) } } diff --git a/ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/tests/reveal-seed-phrase.test.js b/ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/tests/reveal-seed-phrase.test.js index 40722dfac..a9ac7b66c 100644 --- a/ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/tests/reveal-seed-phrase.test.js +++ b/ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/tests/reveal-seed-phrase.test.js @@ -25,7 +25,7 @@ describe('Reveal Seed Phrase', function () { t: (str) => str, metricsEvent: () => {}, }, - } + }, ) }) diff --git a/ui/app/pages/first-time-flow/seed-phrase/tests/confirm-seed-phrase-component.test.js b/ui/app/pages/first-time-flow/seed-phrase/tests/confirm-seed-phrase-component.test.js index d5a5b95ce..449bd3347 100644 --- a/ui/app/pages/first-time-flow/seed-phrase/tests/confirm-seed-phrase-component.test.js +++ b/ui/app/pages/first-time-flow/seed-phrase/tests/confirm-seed-phrase-component.test.js @@ -12,7 +12,7 @@ function shallowRender (props = {}, context = {}) { t: (str) => str + '_t', ...context, }, - } + }, ) } @@ -25,7 +25,7 @@ describe('ConfirmSeedPhrase Component', function () { assert.equal( root.find('.confirm-seed-phrase__seed-word--sorted').length, 12, - 'should render 12 seed phrases' + 'should render 12 seed phrases', ) }) @@ -39,7 +39,7 @@ describe('ConfirmSeedPhrase Component', function () { }, { metricsEvent: metricsEventSpy, - } + }, ) const seeds = root.find('.confirm-seed-phrase__seed-word--sorted') @@ -77,7 +77,7 @@ describe('ConfirmSeedPhrase Component', function () { }, { metricsEvent: metricsEventSpy, - } + }, ) const seeds = root.find('.confirm-seed-phrase__seed-word--sorted') @@ -110,7 +110,7 @@ describe('ConfirmSeedPhrase Component', function () { }, { metricsEvent: metricsEventSpy, - } + }, ) const seeds = root.find('.confirm-seed-phrase__seed-word--sorted') @@ -145,7 +145,7 @@ describe('ConfirmSeedPhrase Component', function () { }, { metricsEvent: metricsEventSpy, - } + }, ) const sorted = root.state().sortedSeedWords diff --git a/ui/app/pages/first-time-flow/select-action/select-action.container.js b/ui/app/pages/first-time-flow/select-action/select-action.container.js index dd3c2c2b5..7b13c1269 100644 --- a/ui/app/pages/first-time-flow/select-action/select-action.container.js +++ b/ui/app/pages/first-time-flow/select-action/select-action.container.js @@ -19,5 +19,5 @@ const mapDispatchToProps = (dispatch) => { export default compose( withRouter, - connect(mapStateToProps, mapDispatchToProps) + connect(mapStateToProps, mapDispatchToProps), )(Welcome) diff --git a/ui/app/pages/first-time-flow/select-action/tests/select-action.test.js b/ui/app/pages/first-time-flow/select-action/tests/select-action.test.js index 05d394dfe..2293cd6a5 100644 --- a/ui/app/pages/first-time-flow/select-action/tests/select-action.test.js +++ b/ui/app/pages/first-time-flow/select-action/tests/select-action.test.js @@ -17,7 +17,7 @@ describe('Selection Action', function () { beforeEach(function () { wrapper = mountWithRouter( - + , ) }) diff --git a/ui/app/pages/first-time-flow/welcome/tests/welcome.test.js b/ui/app/pages/first-time-flow/welcome/tests/welcome.test.js index 60996ff65..510334dca 100644 --- a/ui/app/pages/first-time-flow/welcome/tests/welcome.test.js +++ b/ui/app/pages/first-time-flow/welcome/tests/welcome.test.js @@ -25,7 +25,7 @@ describe('Welcome', function () { } const wrapper = mountWithRouter( - , store + , store, ) const getStartedButton = wrapper.find('.btn-primary.first-time-flow__button') @@ -45,7 +45,7 @@ describe('Welcome', function () { } const wrapper = mountWithRouter( - , store + , store, ) const getStartedButton = wrapper.find('.btn-primary.first-time-flow__button') diff --git a/ui/app/pages/first-time-flow/welcome/welcome.container.js b/ui/app/pages/first-time-flow/welcome/welcome.container.js index cfe99f2e4..9e8aff339 100644 --- a/ui/app/pages/first-time-flow/welcome/welcome.container.js +++ b/ui/app/pages/first-time-flow/welcome/welcome.container.js @@ -21,5 +21,5 @@ const mapDispatchToProps = (dispatch) => { export default compose( withRouter, - connect(mapStateToProps, mapDispatchToProps) + connect(mapStateToProps, mapDispatchToProps), )(Welcome) diff --git a/ui/app/pages/home/home.container.js b/ui/app/pages/home/home.container.js index 43a20bd20..8a1c0eed7 100644 --- a/ui/app/pages/home/home.container.js +++ b/ui/app/pages/home/home.container.js @@ -88,5 +88,5 @@ const mapDispatchToProps = (dispatch) => ({ export default compose( withRouter, - connect(mapStateToProps, mapDispatchToProps) + connect(mapStateToProps, mapDispatchToProps), )(Home) diff --git a/ui/app/pages/keychains/restore-vault.js b/ui/app/pages/keychains/restore-vault.js index d56e0eddc..7a83a50e1 100644 --- a/ui/app/pages/keychains/restore-vault.js +++ b/ui/app/pages/keychains/restore-vault.js @@ -195,5 +195,5 @@ export default connect( }, createNewVaultAndRestore: (pw, seed) => dispatch(createNewVaultAndRestore(pw, seed)), initializeThreeBox: () => dispatch(initializeThreeBox()), - }) + }), )(RestoreVaultPage) diff --git a/ui/app/pages/keychains/tests/reveal-seed.test.js b/ui/app/pages/keychains/tests/reveal-seed.test.js index 5681f4b97..7a5325aca 100644 --- a/ui/app/pages/keychains/tests/reveal-seed.test.js +++ b/ui/app/pages/keychains/tests/reveal-seed.test.js @@ -17,7 +17,7 @@ describe('Reveal Seed Page', function () { context: { t: (str) => str, }, - } + }, ) wrapper.find('form').simulate('submit') diff --git a/ui/app/pages/lock/lock.container.js b/ui/app/pages/lock/lock.container.js index 6a3a1c7d7..382f936c7 100644 --- a/ui/app/pages/lock/lock.container.js +++ b/ui/app/pages/lock/lock.container.js @@ -20,5 +20,5 @@ const mapDispatchToProps = (dispatch) => { export default compose( withRouter, - connect(mapStateToProps, mapDispatchToProps) + connect(mapStateToProps, mapDispatchToProps), )(Lock) diff --git a/ui/app/pages/lock/tests/lock.test.js b/ui/app/pages/lock/tests/lock.test.js index 78e1275f2..85eff210a 100644 --- a/ui/app/pages/lock/tests/lock.test.js +++ b/ui/app/pages/lock/tests/lock.test.js @@ -16,7 +16,7 @@ describe('Lock', function () { } mountWithRouter( - + , ) assert.equal(props.history.replace.getCall(0).args[0], '/') @@ -36,7 +36,7 @@ describe('Lock', function () { props.lockMetamask.resolves() mountWithRouter( - + , ) assert(props.lockMetamask.calledOnce) diff --git a/ui/app/pages/mobile-sync/mobile-sync.component.js b/ui/app/pages/mobile-sync/mobile-sync.component.js index 53e36364a..d93e64c0d 100644 --- a/ui/app/pages/mobile-sync/mobile-sync.component.js +++ b/ui/app/pages/mobile-sync/mobile-sync.component.js @@ -166,7 +166,7 @@ export default class MobileSyncPage extends Component { // Calculating a PubNub Message Payload Size. calculatePayloadSize (channel, message) { return encodeURIComponent( - channel + JSON.stringify(message) + channel + JSON.stringify(message), ).length + 100 } @@ -256,7 +256,7 @@ export default class MobileSyncPage extends Component { } else { reject(response) } - } + }, ) }) } diff --git a/ui/app/pages/send/account-list-item/tests/account-list-item-component.test.js b/ui/app/pages/send/account-list-item/tests/account-list-item-component.test.js index 83c55e232..a2949511a 100644 --- a/ui/app/pages/send/account-list-item/tests/account-list-item-component.test.js +++ b/ui/app/pages/send/account-list-item/tests/account-list-item-component.test.js @@ -55,7 +55,7 @@ describe('AccountListItem Component', function () { assert.equal(propsMethodSpies.handleClick.callCount, 1) assert.deepEqual( propsMethodSpies.handleClick.getCall(0).args, - [{ address: 'mockAddress', name: 'mockName', balance: 'mockBalance' }] + [{ address: 'mockAddress', name: 'mockName', balance: 'mockBalance' }], ) }) @@ -100,7 +100,7 @@ describe('AccountListItem Component', function () { assert.equal(wrapper.find('.account-list-item__account-address').text(), 'mockCheckSumAddress') assert.deepEqual( checksumAddressStub.getCall(0).args, - ['mockAddress'] + ['mockAddress'], ) }) @@ -123,7 +123,7 @@ describe('AccountListItem Component', function () { type: 'PRIMARY', value: 'mockBalance', hideTitle: true, - } + }, ) }) @@ -136,7 +136,7 @@ describe('AccountListItem Component', function () { type: 'PRIMARY', value: 'mockBalance', hideTitle: true, - } + }, ) }) diff --git a/ui/app/pages/send/send-content/add-recipient/ens-input.container.js b/ui/app/pages/send/send-content/add-recipient/ens-input.container.js index 8fc563d97..48d266db4 100644 --- a/ui/app/pages/send/send-content/add-recipient/ens-input.container.js +++ b/ui/app/pages/send/send-content/add-recipient/ens-input.container.js @@ -16,5 +16,5 @@ export default connect( selectedName: getSendToNickname(state), contact: getAddressBookEntry(state, selectedAddress), } - } + }, )(EnsInput) diff --git a/ui/app/pages/send/send-content/add-recipient/tests/add-recipient-component.test.js b/ui/app/pages/send/send-content/add-recipient/tests/add-recipient-component.test.js index e48cc8fd3..b031323be 100644 --- a/ui/app/pages/send/send-content/add-recipient/tests/add-recipient-component.test.js +++ b/ui/app/pages/send/send-content/add-recipient/tests/add-recipient-component.test.js @@ -58,7 +58,7 @@ describe('AddRecipient Component', function () { assert.equal(propsMethodSpies.updateSendTo.callCount, 1) assert.deepEqual( propsMethodSpies.updateSendTo.getCall(0).args, - ['mockTo2', 'mockNickname'] + ['mockTo2', 'mockNickname'], ) }) diff --git a/ui/app/pages/send/send-content/add-recipient/tests/add-recipient-container.test.js b/ui/app/pages/send/send-content/add-recipient/tests/add-recipient-container.test.js index 8b13618f7..e78ab7d46 100644 --- a/ui/app/pages/send/send-content/add-recipient/tests/add-recipient-container.test.js +++ b/ui/app/pages/send/send-content/add-recipient/tests/add-recipient-container.test.js @@ -53,7 +53,7 @@ describe('add-recipient container', function () { assert(actionSpies.updateSendTo.calledOnce) assert.deepEqual( actionSpies.updateSendTo.getCall(0).args, - ['mockTo', 'mockNickname'] + ['mockTo', 'mockNickname'], ) }) }) diff --git a/ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils.js b/ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils.js index 81ba394f3..606ab6a84 100644 --- a/ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils.js +++ b/ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils.js @@ -12,11 +12,11 @@ export function calcMaxAmount ({ balance, gasTotal, sendToken, tokenBalance }) { { toNumericBase: 'hex', multiplicandBase: 16, - } + }, ) : subtractCurrencies( ethUtil.addHexPrefix(balance), ethUtil.addHexPrefix(gasTotal), - { toNumericBase: 'hex' } + { toNumericBase: 'hex' }, ) } diff --git a/ui/app/pages/send/send-content/send-amount-row/amount-max-button/tests/amount-max-button-component.test.js b/ui/app/pages/send/send-content/send-amount-row/amount-max-button/tests/amount-max-button-component.test.js index 8812c2867..322d21288 100644 --- a/ui/app/pages/send/send-content/send-amount-row/amount-max-button/tests/amount-max-button-component.test.js +++ b/ui/app/pages/send/send-content/send-amount-row/amount-max-button/tests/amount-max-button-component.test.js @@ -62,7 +62,7 @@ describe('AmountMaxButton Component', function () { gasTotal: 'mockGasTotal', sendToken: { address: 'mockTokenAddress' }, tokenBalance: 'mockTokenBalance', - }] + }], ) }) @@ -85,7 +85,7 @@ describe('AmountMaxButton Component', function () { assert.equal(propsMethodSpies.setMaxModeTo.callCount, 1) assert.deepEqual( propsMethodSpies.setMaxModeTo.getCall(0).args, - [true] + [true], ) }) diff --git a/ui/app/pages/send/send-content/send-amount-row/amount-max-button/tests/amount-max-button-container.test.js b/ui/app/pages/send/send-content/send-amount-row/amount-max-button/tests/amount-max-button-container.test.js index 5b73051c8..dff5405bb 100644 --- a/ui/app/pages/send/send-content/send-amount-row/amount-max-button/tests/amount-max-button-container.test.js +++ b/ui/app/pages/send/send-content/send-amount-row/amount-max-button/tests/amount-max-button-container.test.js @@ -67,12 +67,12 @@ describe('amount-max-button container', function () { assert(duckActionSpies.updateSendErrors.calledOnce) assert.deepEqual( duckActionSpies.updateSendErrors.getCall(0).args[0], - { amount: null } + { amount: null }, ) assert(actionSpies.updateSendAmount.calledOnce) assert.equal( actionSpies.updateSendAmount.getCall(0).args[0], - 12 + 12, ) }) }) @@ -83,7 +83,7 @@ describe('amount-max-button container', function () { assert(dispatchSpy.calledOnce) assert.equal( actionSpies.setMaxModeTo.getCall(0).args[0], - 'mockVal' + 'mockVal', ) }) }) diff --git a/ui/app/pages/send/send-content/send-amount-row/tests/send-amount-row-container.test.js b/ui/app/pages/send/send-content/send-amount-row/tests/send-amount-row-container.test.js index c031e0e41..9e27496bc 100644 --- a/ui/app/pages/send/send-content/send-amount-row/tests/send-amount-row-container.test.js +++ b/ui/app/pages/send/send-content/send-amount-row/tests/send-amount-row-container.test.js @@ -47,7 +47,7 @@ describe('send-amount-row container', function () { assert(actionSpies.setMaxModeTo.calledOnce) assert.equal( actionSpies.setMaxModeTo.getCall(0).args[0], - 'mockBool' + 'mockBool', ) }) }) @@ -59,7 +59,7 @@ describe('send-amount-row container', function () { assert(actionSpies.updateSendAmount.calledOnce) assert.equal( actionSpies.updateSendAmount.getCall(0).args[0], - 'mockAmount' + 'mockAmount', ) }) }) @@ -71,7 +71,7 @@ describe('send-amount-row container', function () { assert(duckActionSpies.updateSendErrors.calledOnce) assert.deepEqual( duckActionSpies.updateSendErrors.getCall(0).args[0], - { some: 'data', mockGasFeeErrorChange: true } + { some: 'data', mockGasFeeErrorChange: true }, ) }) }) @@ -83,7 +83,7 @@ describe('send-amount-row container', function () { assert(duckActionSpies.updateSendErrors.calledOnce) assert.deepEqual( duckActionSpies.updateSendErrors.getCall(0).args[0], - { some: 'data', mockChange: true } + { some: 'data', mockChange: true }, ) }) }) diff --git a/ui/app/pages/send/send-content/send-asset-row/send-asset-row.component.js b/ui/app/pages/send/send-content/send-asset-row/send-asset-row.component.js index a4d33d2e1..4920156f0 100644 --- a/ui/app/pages/send/send-content/send-asset-row/send-asset-row.component.js +++ b/ui/app/pages/send/send-content/send-asset-row/send-asset-row.component.js @@ -13,7 +13,7 @@ export default class SendAssetRow extends Component { address: PropTypes.string, decimals: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), symbol: PropTypes.string, - }) + }), ).isRequired, accounts: PropTypes.object.isRequired, selectedAddress: PropTypes.string.isRequired, diff --git a/ui/app/pages/send/send-content/send-gas-row/tests/send-gas-row-container.test.js b/ui/app/pages/send/send-content/send-gas-row/tests/send-gas-row-container.test.js index 2ebe617ce..fd5e92bea 100644 --- a/ui/app/pages/send/send-content/send-gas-row/tests/send-gas-row-container.test.js +++ b/ui/app/pages/send/send-content/send-gas-row/tests/send-gas-row-container.test.js @@ -65,7 +65,7 @@ describe('send-gas-row container', function () { assert(dispatchSpy.calledOnce) assert.deepEqual( actionSpies.showModal.getCall(0).args[0], - { name: 'CUSTOMIZE_GAS', hideBasic: true } + { name: 'CUSTOMIZE_GAS', hideBasic: true }, ) }) }) diff --git a/ui/app/pages/send/send-content/send-row-wrapper/tests/send-row-wrapper-component.test.js b/ui/app/pages/send/send-content/send-row-wrapper/tests/send-row-wrapper-component.test.js index 82e64c239..6d793c1bd 100644 --- a/ui/app/pages/send/send-content/send-row-wrapper/tests/send-row-wrapper-component.test.js +++ b/ui/app/pages/send/send-content/send-row-wrapper/tests/send-row-wrapper-component.test.js @@ -46,7 +46,7 @@ describe('SendContent Component', function () { assert(expectedSendRowErrorMessage.is(SendRowErrorMessage)) assert.deepEqual( expectedSendRowErrorMessage.props(), - { errorType: 'mockErrorType' } + { errorType: 'mockErrorType' }, ) }) diff --git a/ui/app/pages/send/send-content/tests/send-content-component.test.js b/ui/app/pages/send/send-content/tests/send-content-component.test.js index f21c23967..01dc83277 100644 --- a/ui/app/pages/send/send-content/tests/send-content-component.test.js +++ b/ui/app/pages/send/send-content/tests/send-content-component.test.js @@ -18,7 +18,7 @@ describe('SendContent Component', function () { , - { context: { t: (str) => str + '_t' } } + { context: { t: (str) => str + '_t' } }, ) }) diff --git a/ui/app/pages/send/send-footer/send-footer.utils.js b/ui/app/pages/send/send-footer/send-footer.utils.js index cc5a3e97c..9235f6755 100644 --- a/ui/app/pages/send/send-footer/send-footer.utils.js +++ b/ui/app/pages/send/send-footer/send-footer.utils.js @@ -50,14 +50,14 @@ export function constructUpdatedTx ({ gas, gasPrice, value: amount, - }) + }), ), } if (sendToken) { const data = TOKEN_TRANSFER_FUNCTION_SIGNATURE + Array.prototype.map.call( ethAbi.rawEncode(['address', 'uint256'], [to, ethUtil.addHexPrefix(amount)]), - (x) => ('00' + x.toString(16)).slice(-2) + (x) => ('00' + x.toString(16)).slice(-2), ).join('') Object.assign(editingTx.txParams, addHexPrefixToObjectValues({ diff --git a/ui/app/pages/send/send-footer/tests/send-footer-component.test.js b/ui/app/pages/send/send-footer/tests/send-footer-component.test.js index 4e245573b..8ab8e4754 100644 --- a/ui/app/pages/send/send-footer/tests/send-footer-component.test.js +++ b/ui/app/pages/send/send-footer/tests/send-footer-component.test.js @@ -142,7 +142,7 @@ describe('SendFooter Component', function () { assert(propsMethodSpies.addToAddressBookIfNew.calledOnce) assert.deepEqual( propsMethodSpies.addToAddressBookIfNew.getCall(0).args, - ['mockTo', ['mockAccount']] + ['mockTo', ['mockAccount']], ) }) @@ -161,7 +161,7 @@ describe('SendFooter Component', function () { sendToken: { mockProp: 'mockSendTokenProp' }, to: 'mockTo', unapprovedTxs: {}, - } + }, ) }) @@ -183,7 +183,7 @@ describe('SendFooter Component', function () { gasPrice: 'mockGasPrice', sendToken: { mockProp: 'mockSendTokenProp' }, to: 'mockTo', - } + }, ) }) diff --git a/ui/app/pages/send/send-footer/tests/send-footer-container.test.js b/ui/app/pages/send/send-footer/tests/send-footer-container.test.js index 5f73e9183..54040bfd7 100644 --- a/ui/app/pages/send/send-footer/tests/send-footer-container.test.js +++ b/ui/app/pages/send/send-footer/tests/send-footer-container.test.js @@ -93,11 +93,11 @@ describe('send-footer container', function () { from: 'mockFrom', gas: 'mockGas', gasPrice: 'mockGasPrice', - } + }, ) assert.deepEqual( actionSpies.signTokenTx.getCall(0).args, - [ '0xabc', 'mockTo', 'mockAmount', { value: 'mockAmount' } ] + [ '0xabc', 'mockTo', 'mockAmount', { value: 'mockAmount' } ], ) }) @@ -121,11 +121,11 @@ describe('send-footer container', function () { from: 'mockFrom', gas: 'mockGas', gasPrice: 'mockGasPrice', - } + }, ) assert.deepEqual( actionSpies.signTx.getCall(0).args, - [ { value: 'mockAmount' } ] + [ { value: 'mockAmount' } ], ) }) }) @@ -155,7 +155,7 @@ describe('send-footer container', function () { editingTransactionId: 'mockEditingTransactionId', sendToken: { address: 'mockAddress' }, unapprovedTxs: 'mockUnapprovedTxs', - } + }, ) assert.equal(actionSpies.updateTransaction.getCall(0).args[0], 'mockConstructedUpdatedTxParams') }) @@ -168,7 +168,7 @@ describe('send-footer container', function () { assert.equal(utilsStubs.addressIsNew.getCall(0).args[0], 'mockToAccounts') assert.deepEqual( actionSpies.addToAddressBook.getCall(0).args, - [ '0xmockNewAddress', 'mockNickname' ] + [ '0xmockNewAddress', 'mockNickname' ], ) }) }) diff --git a/ui/app/pages/send/send-footer/tests/send-footer-utils.test.js b/ui/app/pages/send/send-footer/tests/send-footer-utils.test.js index 4ce3a5ca3..c84856c3c 100644 --- a/ui/app/pages/send/send-footer/tests/send-footer-utils.test.js +++ b/ui/app/pages/send/send-footer/tests/send-footer-utils.test.js @@ -35,7 +35,7 @@ describe('send-footer utils', function () { prop1: '0x123', prop2: '0x456', prop3: '0xx', - } + }, ) }) }) @@ -48,7 +48,7 @@ describe('send-footer utils', function () { { address: '0xdef' }, { address: '0xghi' }, ], '0xdef'), - false + false, ) }) @@ -59,7 +59,7 @@ describe('send-footer utils', function () { { address: '0xdef' }, { address: '0xghi' }, ], '0xxyz'), - true + true, ) }) }) @@ -83,7 +83,7 @@ describe('send-footer utils', function () { from: '0xmockFrom', gas: '0xmockGas', gasPrice: '0xmockGasPrice', - } + }, ) }) @@ -104,7 +104,7 @@ describe('send-footer utils', function () { from: '0xmockFrom', gas: '0xmockGas', gasPrice: '0xmockGasPrice', - } + }, ) }) @@ -124,7 +124,7 @@ describe('send-footer utils', function () { from: '0xmockFrom', gas: '0xmockGas', gasPrice: '0xmockGasPrice', - } + }, ) }) }) diff --git a/ui/app/pages/send/send.container.js b/ui/app/pages/send/send.container.js index e2cb5692d..e4a1c8194 100644 --- a/ui/app/pages/send/send.container.js +++ b/ui/app/pages/send/send.container.js @@ -122,5 +122,5 @@ function mapDispatchToProps (dispatch) { export default compose( withRouter, - connect(mapStateToProps, mapDispatchToProps) + connect(mapStateToProps, mapDispatchToProps), )(SendEther) diff --git a/ui/app/pages/send/send.utils.js b/ui/app/pages/send/send.utils.js index 67742ff68..7ffc5dcdb 100644 --- a/ui/app/pages/send/send.utils.js +++ b/ui/app/pages/send/send.utils.js @@ -305,7 +305,7 @@ function generateTokenTransferData ({ toAddress = '0x0', amount = '0x0', sendTok } return TOKEN_TRANSFER_FUNCTION_SIGNATURE + Array.prototype.map.call( abi.rawEncode(['address', 'uint256'], [toAddress, ethUtil.addHexPrefix(amount)]), - (x) => ('00' + x.toString(16)).slice(-2) + (x) => ('00' + x.toString(16)).slice(-2), ).join('') } diff --git a/ui/app/pages/send/tests/send-component.test.js b/ui/app/pages/send/tests/send-component.test.js index d7431f06b..757b8fa63 100644 --- a/ui/app/pages/send/tests/send-component.test.js +++ b/ui/app/pages/send/tests/send-component.test.js @@ -143,7 +143,7 @@ describe('Send Component', function () { prevTokenBalance: undefined, sendToken: { address: 'mockTokenAddress', decimals: 18, symbol: 'TST' }, tokenBalance: 'mockTokenBalance', - } + }, ) }) @@ -175,7 +175,7 @@ describe('Send Component', function () { primaryCurrency: 'mockPrimaryCurrency', sendToken: { address: 'mockTokenAddress', decimals: 18, symbol: 'TST' }, tokenBalance: 'mockTokenBalance', - } + }, ) }) @@ -195,7 +195,7 @@ describe('Send Component', function () { gasTotal: 'mockGasTotal', primaryCurrency: 'mockPrimaryCurrency', sendToken: { address: 'mockTokenAddress', decimals: 18, symbol: 'TST' }, - } + }, ) }) @@ -229,7 +229,7 @@ describe('Send Component', function () { assert.equal(propsMethodSpies.updateSendErrors.callCount, 1) assert.deepEqual( propsMethodSpies.updateSendErrors.getCall(0).args[0], - { amount: 'mockAmountError', gasFee: null } + { amount: 'mockAmountError', gasFee: null }, ) }) @@ -244,7 +244,7 @@ describe('Send Component', function () { assert.equal(propsMethodSpies.updateSendErrors.callCount, 1) assert.deepEqual( propsMethodSpies.updateSendErrors.getCall(0).args[0], - { amount: 'mockAmountError', gasFee: 'mockGasFeeError' } + { amount: 'mockAmountError', gasFee: 'mockGasFeeError' }, ) }) @@ -294,12 +294,12 @@ describe('Send Component', function () { sendToken: { address: 'mockTokenAddress', decimals: 18, symbol: 'TST' }, // Make sure not to hit updateGas when changing asset tokenContract: { method: 'mockTokenMethod' }, address: 'mockAddress', - } + }, ) assert.equal(SendTransactionScreen.prototype.updateGas.callCount, 1) assert.deepEqual( SendTransactionScreen.prototype.updateGas.getCall(0).args, - [] + [], ) }) @@ -335,7 +335,7 @@ describe('Send Component', function () { to: '', value: 'mockAmount', data: undefined, - } + }, ) }) @@ -377,7 +377,7 @@ describe('Send Component', function () { wrapper.find(SendFooter).props(), { history: { mockProp: 'history-abc' }, - } + }, ) }) diff --git a/ui/app/pages/send/tests/send-container.test.js b/ui/app/pages/send/tests/send-container.test.js index 8c23d998a..84a138d92 100644 --- a/ui/app/pages/send/tests/send-container.test.js +++ b/ui/app/pages/send/tests/send-container.test.js @@ -60,19 +60,19 @@ describe('send container', function () { assert(dispatchSpy.calledOnce) assert.equal( actionSpies.setGasTotal.getCall(0).args[0], - '0x30x4' + '0x30x4', ) }) it('should dispatch an updateGasData action when editingTransactionId is falsy', function () { const { gasPrice, selectedAddress, sendToken, blockGasLimit, to, value, data } = mockProps mapDispatchToPropsObject.updateAndSetGasLimit( - Object.assign({}, mockProps, { editingTransactionId: false }) + Object.assign({}, mockProps, { editingTransactionId: false }), ) assert(dispatchSpy.calledOnce) assert.deepEqual( actionSpies.updateGasData.getCall(0).args[0], - { gasPrice, selectedAddress, sendToken, blockGasLimit, to, value, data } + { gasPrice, selectedAddress, sendToken, blockGasLimit, to, value, data }, ) }) }) @@ -89,7 +89,7 @@ describe('send container', function () { assert(dispatchSpy.calledOnce) assert.deepEqual( actionSpies.updateSendTokenBalance.getCall(0).args[0], - mockProps + mockProps, ) }) }) @@ -100,7 +100,7 @@ describe('send container', function () { assert(dispatchSpy.calledOnce) assert.equal( duckActionSpies.updateSendErrors.getCall(0).args[0], - 'mockError' + 'mockError', ) }) }) @@ -111,7 +111,7 @@ describe('send container', function () { assert(dispatchSpy.calledOnce) assert.equal( duckActionSpies.resetSendState.getCall(0).args.length, - 0 + 0, ) }) }) diff --git a/ui/app/pages/send/tests/send-utils.test.js b/ui/app/pages/send/tests/send-utils.test.js index 219d252e9..c3d92e801 100644 --- a/ui/app/pages/send/tests/send-utils.test.js +++ b/ui/app/pages/send/tests/send-utils.test.js @@ -69,7 +69,7 @@ describe('send utils', function () { toNumericBase: 'hex', multiplicandBase: 16, multiplierBase: 16, - } ] + } ], ) }) }) @@ -121,14 +121,14 @@ describe('send utils', function () { generateTokenTransferData({ toAddress: 'mockAddress', amount: 'ab', sendToken: { address: '0x0' } }) assert.deepEqual( stubs.rawEncode.getCall(0).args, - [['address', 'uint256'], ['mockAddress', '0xab']] + [['address', 'uint256'], ['mockAddress', '0xab']], ) }) it('should return encoded token transfer data', function () { assert.equal( generateTokenTransferData({ toAddress: 'mockAddress', amount: '0xa', sendToken: { address: '0x0' } }), - '0xa9059cbb104c' + '0xa9059cbb104c', ) }) }) @@ -229,7 +229,7 @@ describe('send utils', function () { bBase: 16, toNumericBase: 'hex', }, - ] + ], ) assert.deepEqual( stubs.conversionGTE.getCall(0).args, @@ -246,7 +246,7 @@ describe('send utils', function () { conversionRate: 3, fromCurrency: 'ABC', }, - ] + ], ) assert.equal(result, true) @@ -268,7 +268,7 @@ describe('send utils', function () { '0x10', { fromNumericBase: 'hex', }, - ] + ], ) assert.deepEqual( stubs.conversionGTE.getCall(0).args, @@ -280,7 +280,7 @@ describe('send utils', function () { { value: 'calc:1610', }, - ] + ], ) assert.equal(result, false) @@ -298,7 +298,7 @@ describe('send utils', function () { throw new Error(to.match(/:(.+)$/)[1]) } return { toString: (n) => `0xabc${n}` } - } + }, ), } const baseExpectedCall = { @@ -311,7 +311,7 @@ describe('send utils', function () { beforeEach(function () { global.eth = { getCode: sinon.stub().callsFake( - (address) => Promise.resolve(address.match(/isContract/) ? 'not-0x' : '0x') + (address) => Promise.resolve(address.match(/isContract/) ? 'not-0x' : '0x'), ), } }) @@ -326,7 +326,7 @@ describe('send utils', function () { assert.equal(baseMockParams.estimateGasMethod.callCount, 1) assert.deepEqual( baseMockParams.estimateGasMethod.getCall(0).args[0], - Object.assign({ gasPrice: undefined, value: undefined }, baseExpectedCall) + Object.assign({ gasPrice: undefined, value: undefined }, baseExpectedCall), ) assert.equal(result, '0xabc16') }) @@ -336,7 +336,7 @@ describe('send utils', function () { assert.equal(baseMockParams.estimateGasMethod.callCount, 1) assert.deepEqual( baseMockParams.estimateGasMethod.getCall(0).args[0], - Object.assign({ gasPrice: undefined, value: undefined }, baseExpectedCall, { gas: '0xbcdx0.95' }) + Object.assign({ gasPrice: undefined, value: undefined }, baseExpectedCall, { gas: '0xbcdx0.95' }), ) assert.equal(result, '0xabc16x1.5') }) @@ -351,7 +351,7 @@ describe('send utils', function () { value: '0x0', data: '0xa9059cbb104c', to: 'mockAddress', - }) + }), ) assert.equal(result, '0xabc16') }) diff --git a/ui/app/pages/settings/advanced-tab/advanced-tab.component.js b/ui/app/pages/settings/advanced-tab/advanced-tab.component.js index 9c83f1fa0..df952eff6 100644 --- a/ui/app/pages/settings/advanced-tab/advanced-tab.component.js +++ b/ui/app/pages/settings/advanced-tab/advanced-tab.component.js @@ -489,7 +489,7 @@ export default class AdvancedTab extends PureComponent { function addUrlProtocolPrefix (urlString) { if (!urlString.match( - /(^http:\/\/)|(^https:\/\/)/ + /(^http:\/\/)|(^https:\/\/)/, )) { return 'https://' + urlString } diff --git a/ui/app/pages/settings/advanced-tab/advanced-tab.container.js b/ui/app/pages/settings/advanced-tab/advanced-tab.container.js index be473f5e5..c36bc204f 100644 --- a/ui/app/pages/settings/advanced-tab/advanced-tab.container.js +++ b/ui/app/pages/settings/advanced-tab/advanced-tab.container.js @@ -73,5 +73,5 @@ export const mapDispatchToProps = (dispatch) => { export default compose( withRouter, - connect(mapStateToProps, mapDispatchToProps) + connect(mapStateToProps, mapDispatchToProps), )(AdvancedTab) diff --git a/ui/app/pages/settings/advanced-tab/tests/advanced-tab-component.test.js b/ui/app/pages/settings/advanced-tab/tests/advanced-tab-component.test.js index aeb048d3f..69fe064c8 100644 --- a/ui/app/pages/settings/advanced-tab/tests/advanced-tab-component.test.js +++ b/ui/app/pages/settings/advanced-tab/tests/advanced-tab-component.test.js @@ -21,7 +21,7 @@ describe('AdvancedTab Component', function () { context: { t: (s) => `_${s}`, }, - } + }, ) assert.equal(root.find('.settings-page__content-row').length, 11) @@ -43,7 +43,7 @@ describe('AdvancedTab Component', function () { context: { t: (s) => `_${s}`, }, - } + }, ) const autoTimeout = root.find('.settings-page__content-row').at(8) diff --git a/ui/app/pages/settings/contact-list-tab/add-contact/add-contact.container.js b/ui/app/pages/settings/contact-list-tab/add-contact/add-contact.container.js index 4f9849cbc..66c40e51a 100644 --- a/ui/app/pages/settings/contact-list-tab/add-contact/add-contact.container.js +++ b/ui/app/pages/settings/contact-list-tab/add-contact/add-contact.container.js @@ -23,5 +23,5 @@ const mapDispatchToProps = (dispatch) => { export default compose( withRouter, - connect(mapStateToProps, mapDispatchToProps) + connect(mapStateToProps, mapDispatchToProps), )(AddContact) diff --git a/ui/app/pages/settings/contact-list-tab/contact-list-tab.container.js b/ui/app/pages/settings/contact-list-tab/contact-list-tab.container.js index bfe64fa68..d3bb1799a 100644 --- a/ui/app/pages/settings/contact-list-tab/contact-list-tab.container.js +++ b/ui/app/pages/settings/contact-list-tab/contact-list-tab.container.js @@ -29,7 +29,7 @@ const mapStateToProps = (state, ownProps) => { const showingMyAccounts = Boolean( pathname.match(CONTACT_MY_ACCOUNTS_ROUTE) || pathname.match(CONTACT_MY_ACCOUNTS_VIEW_ROUTE) || - pathname.match(CONTACT_MY_ACCOUNTS_EDIT_ROUTE) + pathname.match(CONTACT_MY_ACCOUNTS_EDIT_ROUTE), ) const envIsPopup = getEnvironmentType() === ENVIRONMENT_TYPE_POPUP @@ -50,5 +50,5 @@ const mapStateToProps = (state, ownProps) => { export default compose( withRouter, - connect(mapStateToProps) + connect(mapStateToProps), )(ContactListTab) diff --git a/ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.container.js b/ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.container.js index 4959f70ee..f649c2300 100644 --- a/ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.container.js +++ b/ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.container.js @@ -46,5 +46,5 @@ const mapDispatchToProps = (dispatch) => { export default compose( withRouter, - connect(mapStateToProps, mapDispatchToProps) + connect(mapStateToProps, mapDispatchToProps), )(EditContact) diff --git a/ui/app/pages/settings/contact-list-tab/my-accounts/my-accounts.container.js b/ui/app/pages/settings/contact-list-tab/my-accounts/my-accounts.container.js index 8790125ae..86e569e3d 100644 --- a/ui/app/pages/settings/contact-list-tab/my-accounts/my-accounts.container.js +++ b/ui/app/pages/settings/contact-list-tab/my-accounts/my-accounts.container.js @@ -4,7 +4,7 @@ import { connect } from 'react-redux' import { withRouter } from 'react-router-dom' import { accountsWithSendEtherInfoSelector } from '../../../../selectors' -const mapStateToProps = (state,) => { +const mapStateToProps = (state) => { const myAccounts = accountsWithSendEtherInfoSelector(state) return { @@ -14,5 +14,5 @@ const mapStateToProps = (state,) => { export default compose( withRouter, - connect(mapStateToProps) + connect(mapStateToProps), )(ViewContact) diff --git a/ui/app/pages/settings/contact-list-tab/view-contact/view-contact.container.js b/ui/app/pages/settings/contact-list-tab/view-contact/view-contact.container.js index e69df8536..3390e1a0b 100644 --- a/ui/app/pages/settings/contact-list-tab/view-contact/view-contact.container.js +++ b/ui/app/pages/settings/contact-list-tab/view-contact/view-contact.container.js @@ -32,5 +32,5 @@ const mapStateToProps = (state, ownProps) => { export default compose( withRouter, - connect(mapStateToProps) + connect(mapStateToProps), )(ViewContact) diff --git a/ui/app/pages/settings/networks-tab/network-form/network-form.component.js b/ui/app/pages/settings/networks-tab/network-form/network-form.component.js index 3e94a7377..34209983a 100644 --- a/ui/app/pages/settings/networks-tab/network-form/network-form.component.js +++ b/ui/app/pages/settings/networks-tab/network-form/network-form.component.js @@ -208,7 +208,7 @@ export default class NetworkForm extends PureComponent { validateChainId = (chainId) => { this.setErrorTo('chainId', !!chainId && Number.isNaN(parseInt(chainId)) ? `${this.context.t('invalidInput')} chainId` - : '' + : '', ) } diff --git a/ui/app/pages/settings/networks-tab/networks-tab.container.js b/ui/app/pages/settings/networks-tab/networks-tab.container.js index 64e0e195e..9377a1111 100644 --- a/ui/app/pages/settings/networks-tab/networks-tab.container.js +++ b/ui/app/pages/settings/networks-tab/networks-tab.container.js @@ -78,5 +78,5 @@ const mapDispatchToProps = (dispatch) => { export default compose( withRouter, - connect(mapStateToProps, mapDispatchToProps) + connect(mapStateToProps, mapDispatchToProps), )(NetworksTab) diff --git a/ui/app/pages/settings/security-tab/security-tab.container.js b/ui/app/pages/settings/security-tab/security-tab.container.js index 138419913..9852b685e 100644 --- a/ui/app/pages/settings/security-tab/security-tab.container.js +++ b/ui/app/pages/settings/security-tab/security-tab.container.js @@ -36,5 +36,5 @@ const mapDispatchToProps = (dispatch) => { export default compose( withRouter, - connect(mapStateToProps, mapDispatchToProps) + connect(mapStateToProps, mapDispatchToProps), )(SecurityTab) diff --git a/ui/app/pages/settings/security-tab/tests/security-tab.test.js b/ui/app/pages/settings/security-tab/tests/security-tab.test.js index 3dff3b9ac..1ac996d05 100644 --- a/ui/app/pages/settings/security-tab/tests/security-tab.test.js +++ b/ui/app/pages/settings/security-tab/tests/security-tab.test.js @@ -30,7 +30,7 @@ describe('Security Tab', function () { t: (str) => str, metricsEvent: () => {}, }, - } + }, ) }) diff --git a/ui/app/pages/settings/settings-tab/tests/settings-tab.test.js b/ui/app/pages/settings/settings-tab/tests/settings-tab.test.js index 5ba3aa159..7fefd559e 100644 --- a/ui/app/pages/settings/settings-tab/tests/settings-tab.test.js +++ b/ui/app/pages/settings/settings-tab/tests/settings-tab.test.js @@ -27,7 +27,7 @@ describe('Settings Tab', function () { context: { t: (str) => str, }, - } + }, ) }) diff --git a/ui/app/pages/settings/settings.container.js b/ui/app/pages/settings/settings.container.js index 61a443eb3..ebeb2ae4b 100644 --- a/ui/app/pages/settings/settings.container.js +++ b/ui/app/pages/settings/settings.container.js @@ -94,5 +94,5 @@ const mapStateToProps = (state, ownProps) => { export default compose( withRouter, - connect(mapStateToProps) + connect(mapStateToProps), )(Settings) diff --git a/ui/app/pages/unlock-page/tests/unlock-page.test.js b/ui/app/pages/unlock-page/tests/unlock-page.test.js index fe9c2a4bb..ec4eb914d 100644 --- a/ui/app/pages/unlock-page/tests/unlock-page.test.js +++ b/ui/app/pages/unlock-page/tests/unlock-page.test.js @@ -27,7 +27,7 @@ describe('Unlock Page', function () { context: { t: (str) => str, }, - } + }, ) }) diff --git a/ui/app/pages/unlock-page/unlock-page.container.js b/ui/app/pages/unlock-page/unlock-page.container.js index 906490b8f..848f52a50 100644 --- a/ui/app/pages/unlock-page/unlock-page.container.js +++ b/ui/app/pages/unlock-page/unlock-page.container.js @@ -61,5 +61,5 @@ const mergeProps = (stateProps, dispatchProps, ownProps) => { export default compose( withRouter, - connect(mapStateToProps, mapDispatchToProps, mergeProps) + connect(mapStateToProps, mapDispatchToProps, mergeProps), )(UnlockPage) diff --git a/ui/app/selectors/confirm-transaction.js b/ui/app/selectors/confirm-transaction.js index 27e5d94f0..553a44307 100644 --- a/ui/app/selectors/confirm-transaction.js +++ b/ui/app/selectors/confirm-transaction.js @@ -37,7 +37,7 @@ export const unconfirmedTransactionsListSelector = createSelector( unapprovedDecryptMsgs = {}, unapprovedEncryptionPublicKeyMsgs = {}, unapprovedTypedMessages = {}, - network + network, ) => txHelper( unapprovedTxs, unapprovedMsgs, @@ -45,8 +45,8 @@ export const unconfirmedTransactionsListSelector = createSelector( unapprovedDecryptMsgs, unapprovedEncryptionPublicKeyMsgs, unapprovedTypedMessages, - network - ) || [] + network, + ) || [], ) export const unconfirmedTransactionsHashSelector = createSelector( @@ -64,7 +64,7 @@ export const unconfirmedTransactionsHashSelector = createSelector( unapprovedDecryptMsgs = {}, unapprovedEncryptionPublicKeyMsgs = {}, unapprovedTypedMessages = {}, - network + network, ) => { const filteredUnapprovedTxs = Object.keys(unapprovedTxs).reduce((acc, address) => { const { metamaskNetworkId } = unapprovedTxs[address] @@ -85,7 +85,7 @@ export const unconfirmedTransactionsHashSelector = createSelector( ...unapprovedEncryptionPublicKeyMsgs, ...unapprovedTypedMessages, } - } + }, ) const unapprovedMsgCountSelector = (state) => state.metamask.unapprovedMsgCount @@ -109,7 +109,7 @@ export const unconfirmedTransactionsCountSelector = createSelector( unapprovedDecryptMsgCount = 0, unapprovedEncryptionPublicKeyMsgCount = 0, unapprovedTypedMessagesCount = 0, - network + network, ) => { const filteredUnapprovedTxIds = Object.keys(unapprovedTxs).filter((txId) => { const { metamaskNetworkId } = unapprovedTxs[txId] @@ -118,7 +118,7 @@ export const unconfirmedTransactionsCountSelector = createSelector( return filteredUnapprovedTxIds.length + unapprovedTypedMessagesCount + unapprovedMsgCount + unapprovedPersonalMsgCount + unapprovedDecryptMsgCount + unapprovedEncryptionPublicKeyMsgCount - } + }, ) @@ -133,22 +133,22 @@ const contractExchangeRatesSelector = (state) => state.metamask.contractExchange const tokenDecimalsSelector = createSelector( tokenPropsSelector, - (tokenProps) => tokenProps && tokenProps.tokenDecimals + (tokenProps) => tokenProps && tokenProps.tokenDecimals, ) const tokenDataParamsSelector = createSelector( tokenDataSelector, - (tokenData) => (tokenData && tokenData.params) || [] + (tokenData) => (tokenData && tokenData.params) || [], ) const txParamsSelector = createSelector( txDataSelector, - (txData) => (txData && txData.txParams) || {} + (txData) => (txData && txData.txParams) || {}, ) export const tokenAddressSelector = createSelector( txParamsSelector, - (txParams) => txParams && txParams.to + (txParams) => txParams && txParams.to, ) const TOKEN_PARAM_SPENDER = '_spender' @@ -179,7 +179,7 @@ export const tokenAmountAndToAddressSelector = createSelector( toAddress, tokenAmount, } - } + }, ) export const approveTokenAmountAndToAddressSelector = createSelector( @@ -204,7 +204,7 @@ export const approveTokenAmountAndToAddressSelector = createSelector( toAddress, tokenAmount, } - } + }, ) export const sendTokenTokenAmountAndToAddressSelector = createSelector( @@ -229,13 +229,13 @@ export const sendTokenTokenAmountAndToAddressSelector = createSelector( toAddress, tokenAmount, } - } + }, ) export const contractExchangeRateSelector = createSelector( contractExchangeRatesSelector, tokenAddressSelector, - (contractExchangeRates, tokenAddress) => contractExchangeRates[tokenAddress] + (contractExchangeRates, tokenAddress) => contractExchangeRates[tokenAddress], ) export const transactionFeeSelector = function (state, txData) { diff --git a/ui/app/selectors/custom-gas.js b/ui/app/selectors/custom-gas.js index e041269aa..816242874 100644 --- a/ui/app/selectors/custom-gas.js +++ b/ui/app/selectors/custom-gas.js @@ -107,7 +107,7 @@ export function isCustomPriceSafe (state) { fromDenomination: 'WEI', toDenomination: 'GWEI', }, - { value: safeLow, fromNumericBase: 'dec' } + { value: safeLow, fromNumericBase: 'dec' }, ) return customPriceSafe diff --git a/ui/app/selectors/permissions.js b/ui/app/selectors/permissions.js index 8c294b762..d42081153 100644 --- a/ui/app/selectors/permissions.js +++ b/ui/app/selectors/permissions.js @@ -37,8 +37,8 @@ export function getPermissionDomainsMetadata (state) { export function getPermittedAccounts (state, origin) { return getAccountsFromPermission( getAccountsPermissionFromDomain( - domainSelector(state, origin) - ) + domainSelector(state, origin), + ), ) } @@ -52,7 +52,7 @@ export function getPermittedAccounts (state, origin) { export function getPermittedAccountsForCurrentTab (state) { return getPermittedAccounts( state, - getOriginOfCurrentTab(state) + getOriginOfCurrentTab(state), ) } @@ -66,7 +66,7 @@ export function getPermittedAccountsByOrigin (state) { const domains = getPermissionDomains(state) return Object.keys(domains).reduce((acc, domainKey) => { const accounts = getAccountsFromPermission( - getAccountsPermissionFromDomain(domains[domainKey]) + getAccountsPermissionFromDomain(domains[domainKey]), ) if (accounts.length > 0) { acc[domainKey] = accounts @@ -155,7 +155,7 @@ export function getAddressConnectedDomainMap (state) { function getAccountsFromDomain (domain) { return getAccountsFromPermission( - getAccountsPermissionFromDomain(domain) + getAccountsPermissionFromDomain(domain), ) } @@ -163,7 +163,7 @@ function getAccountsPermissionFromDomain (domain = {}) { return ( Array.isArray(domain.permissions) ? domain.permissions.find( - (perm) => perm.parentCapability === 'eth_accounts' + (perm) => perm.parentCapability === 'eth_accounts', ) : {} ) @@ -182,7 +182,7 @@ function getAccountsCaveatFromPermission (accountsPermission = {}) { return ( Array.isArray(accountsPermission.caveats) && accountsPermission.caveats.find( - (c) => c.name === CAVEAT_NAMES.exposedAccounts + (c) => c.name === CAVEAT_NAMES.exposedAccounts, ) ) } diff --git a/ui/app/selectors/selectors.js b/ui/app/selectors/selectors.js index 2c09e5708..cfa680186 100644 --- a/ui/app/selectors/selectors.js +++ b/ui/app/selectors/selectors.js @@ -69,7 +69,7 @@ export const getMetaMaskAccounts = createSelector( [accountID]: account, } } - }, {}) + }, {}), ) export function getSelectedAddress (state) { @@ -120,7 +120,7 @@ export const getMetaMaskAccountsOrdered = createSelector( (keyrings, identities, accounts) => keyrings .reduce((list, keyring) => list.concat(keyring.accounts), []) .filter((address) => !!identities[address]) - .map((address) => ({ ...identities[address], ...accounts[address] })) + .map((address) => ({ ...identities[address], ...accounts[address] })), ) export function isBalanceCached (state) { diff --git a/ui/app/selectors/tests/custom-gas.test.js b/ui/app/selectors/tests/custom-gas.test.js index 5b9c5db53..7e3e6c085 100644 --- a/ui/app/selectors/tests/custom-gas.test.js +++ b/ui/app/selectors/tests/custom-gas.test.js @@ -341,7 +341,7 @@ describe('custom-gas selectors', function () { tests.forEach((test) => { assert.deepEqual( getRenderableBasicEstimateData(test.mockState, '0x5208'), - test.expectedResult + test.expectedResult, ) }) }) @@ -605,7 +605,7 @@ describe('custom-gas selectors', function () { tests.forEach((test) => { assert.deepEqual( getRenderableEstimateDataForSmallButtonsFromGWEI(test.mockState), - test.expectedResult + test.expectedResult, ) }) }) diff --git a/ui/app/selectors/tests/selectors.test.js b/ui/app/selectors/tests/selectors.test.js index 042c7a6b8..12a9ba3fd 100644 --- a/ui/app/selectors/tests/selectors.test.js +++ b/ui/app/selectors/tests/selectors.test.js @@ -22,7 +22,7 @@ describe('Selectors', function () { { address: '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc', name: 'Test Account', - } + }, ) }) diff --git a/ui/app/selectors/tests/send.test.js b/ui/app/selectors/tests/send.test.js index c730b6b72..d232baf1b 100644 --- a/ui/app/selectors/tests/send.test.js +++ b/ui/app/selectors/tests/send.test.js @@ -83,7 +83,7 @@ describe('send selectors', function () { address: '0xd85a4b6a394794842887b8284293d69163007bbb', name: 'Send Account 4', }, - ] + ], ) }) }) @@ -92,7 +92,7 @@ describe('send selectors', function () { it('should return the current block gas limit', function () { assert.deepEqual( getBlockGasLimit(mockState), - '0x4c1878' + '0x4c1878', ) }) }) @@ -101,7 +101,7 @@ describe('send selectors', function () { it('should return the eth conversion rate', function () { assert.deepEqual( getConversionRate(mockState), - 1200.88200327 + 1200.88200327, ) }) }) @@ -116,7 +116,7 @@ describe('send selectors', function () { nonce: '0x0', address: '0xd85a4b6a394794842887b8284293d69163007bbb', name: 'Send Account 4', - } + }, ) }) }) @@ -125,7 +125,7 @@ describe('send selectors', function () { it('should return the ticker symbol of the selected network', function () { assert.equal( getNativeCurrency(mockState), - 'ETH' + 'ETH', ) }) }) @@ -134,7 +134,7 @@ describe('send selectors', function () { it('should return the id of the currently selected network', function () { assert.equal( getCurrentNetwork(mockState), - '3' + '3', ) }) }) @@ -143,7 +143,7 @@ describe('send selectors', function () { it('should return the send.gasLimit', function () { assert.equal( getGasLimit(mockState), - '0xFFFF' + '0xFFFF', ) }) }) @@ -152,7 +152,7 @@ describe('send selectors', function () { it('should return the send.gasPrice', function () { assert.equal( getGasPrice(mockState), - '0xaa' + '0xaa', ) }) }) @@ -161,7 +161,7 @@ describe('send selectors', function () { it('should return the send.gasTotal', function () { assert.equal( getGasTotal(mockState), - 'a9ff56' + 'a9ff56', ) }) }) @@ -170,7 +170,7 @@ describe('send selectors', function () { it('should return the symbol of the send token', function () { assert.equal( getPrimaryCurrency({ metamask: { send: { token: { symbol: 'DEF' } } } }), - 'DEF' + 'DEF', ) }) }) @@ -193,7 +193,7 @@ describe('send selectors', function () { address: '0x8d6b81208414189a58339873ab429b6c47ab92d3', decimals: 4, symbol: 'DEF', - } + }, ) }) }) @@ -212,7 +212,7 @@ describe('send selectors', function () { }, }, }), - 'mockAt:0x8d6b81208414189a58339873ab429b6c47ab92d3' + 'mockAt:0x8d6b81208414189a58339873ab429b6c47ab92d3', ) }) @@ -220,7 +220,7 @@ describe('send selectors', function () { const modifiedMetamaskState = Object.assign({}, mockState.metamask, { send: {} }) assert.equal( getSendTokenContract(Object.assign({}, mockState, { metamask: modifiedMetamaskState })), - null + null, ) }) }) @@ -229,7 +229,7 @@ describe('send selectors', function () { it('should return the send.amount', function () { assert.equal( getSendAmount(mockState), - '0x080' + '0x080', ) }) }) @@ -238,7 +238,7 @@ describe('send selectors', function () { it('should return the send.editingTransactionId', function () { assert.equal( getSendEditingTransactionId(mockState), - 97531 + 97531, ) }) }) @@ -247,7 +247,7 @@ describe('send selectors', function () { it('should return the send.errors', function () { assert.deepEqual( getSendErrors(mockState), - { someError: null } + { someError: null }, ) }) }) @@ -256,7 +256,7 @@ describe('send selectors', function () { it('should return the sendHexData feature flag state', function () { assert.deepEqual( getSendHexDataFeatureFlagState(mockState), - true + true, ) }) }) @@ -274,7 +274,7 @@ describe('send selectors', function () { it('should get the send.from balance if it exists', function () { assert.equal( getSendFromBalance(mockState), - '0x37452b1315889f80' + '0x37452b1315889f80', ) }) @@ -288,7 +288,7 @@ describe('send selectors', function () { } assert.equal( getSendFromBalance(editedMockState), - '0x0' + '0x0', ) }) }) @@ -302,7 +302,7 @@ describe('send selectors', function () { balance: '0x37452b1315889f80', code: '0x', nonce: '0xa', - } + }, ) }) @@ -321,7 +321,7 @@ describe('send selectors', function () { balance: '0x0', nonce: '0x0', address: '0xd85a4b6a394794842887b8284293d69163007bbb', - } + }, ) }) }) @@ -330,7 +330,7 @@ describe('send selectors', function () { it('should return send.maxModeOn', function () { assert.equal( getSendMaxModeState(mockState), - false + false, ) }) }) @@ -339,7 +339,7 @@ describe('send selectors', function () { it('should return send.to', function () { assert.equal( getSendTo(mockState), - '0x987fedabc' + '0x987fedabc', ) }) }) @@ -382,7 +382,7 @@ describe('send selectors', function () { name: 'Address Book Account 1', chainId: '3', }, - ] + ], ) }) }) @@ -391,7 +391,7 @@ describe('send selectors', function () { it('should', function () { assert.equal( getTokenBalance(mockState), - 3434 + 3434, ) }) }) @@ -420,7 +420,7 @@ describe('send selectors', function () { maxCost: 'de234b52e4a0800', gasPrice: '4a817c800', }, - } + }, ) }) }) @@ -531,7 +531,7 @@ describe('send selectors', function () { to: true, editingTransactionId: true, token: {}, - }) + }), ), 'edit') }) @@ -542,7 +542,7 @@ describe('send selectors', function () { to: true, editingTransactionId: false, token: {}, - }) + }), ), 'sendTokens') }) @@ -553,7 +553,7 @@ describe('send selectors', function () { to: true, editingTransactionId: false, token: null, - }) + }), ), 'sendETH') }) }) @@ -572,7 +572,7 @@ describe('send selectors', function () { assert.equal(isSendFormInError( getSendMockState({ errors: [ true ], - }) + }), ), true) }) @@ -580,12 +580,12 @@ describe('send selectors', function () { assert.equal(isSendFormInError( getSendMockState({ errors: [], - }) + }), ), false) assert.equal(isSendFormInError( getSendMockState({ errors: [ false ], - }) + }), ), false) }) }) diff --git a/ui/app/selectors/transactions.js b/ui/app/selectors/transactions.js index 5950bbf0d..f0d63b115 100644 --- a/ui/app/selectors/transactions.js +++ b/ui/app/selectors/transactions.js @@ -41,7 +41,7 @@ export const selectedAddressTxListSelector = createSelector( currentNetworkTxListSelector, (selectedAddress, transactions = []) => { return transactions.filter(({ txParams }) => txParams.from === selectedAddress) - } + }, ) export const unapprovedMessagesSelector = createSelector( @@ -57,7 +57,7 @@ export const unapprovedMessagesSelector = createSelector( unapprovedDecryptMsgs = {}, unapprovedEncryptionPublicKeyMsgs = {}, unapprovedTypedMessages = {}, - network + network, ) => txHelper( {}, unapprovedMsgs, @@ -65,8 +65,8 @@ export const unapprovedMessagesSelector = createSelector( unapprovedDecryptMsgs, unapprovedEncryptionPublicKeyMsgs, unapprovedTypedMessages, - network - ) || [] + network, + ) || [], ) export const transactionSubSelector = createSelector( @@ -74,7 +74,7 @@ export const transactionSubSelector = createSelector( incomingTxListSelector, (unapprovedMessages = [], incomingTxList = []) => { return unapprovedMessages.concat(incomingTxList) - } + }, ) export const transactionsSelector = createSelector( @@ -85,7 +85,7 @@ export const transactionsSelector = createSelector( return txsToRender .sort((a, b) => b.time - a.time) - } + }, ) /** @@ -267,7 +267,7 @@ export const nonceSortedTransactionsSelector = createSelector( const orderedTransactionGroups = orderedNonces.map((nonce) => nonceToTransactionsMap[nonce]) mergeNonNonceTransactionGroups(orderedTransactionGroups, incomingTransactionGroups) return unapprovedTransactionGroups.concat(orderedTransactionGroups) - } + }, ) /** @@ -280,7 +280,7 @@ export const nonceSortedPendingTransactionsSelector = createSelector( nonceSortedTransactionsSelector, (transactions = []) => ( transactions.filter(({ primaryTransaction }) => primaryTransaction.status in PENDING_STATUS_HASH) - ) + ), ) /** @@ -295,12 +295,12 @@ export const nonceSortedCompletedTransactionsSelector = createSelector( transactions .filter(({ primaryTransaction }) => !(primaryTransaction.status in PENDING_STATUS_HASH)) .reverse() - ) + ), ) export const submittedPendingTransactionsSelector = createSelector( transactionsSelector, (transactions = []) => ( transactions.filter((transaction) => transaction.status === SUBMITTED_STATUS) - ) + ), ) diff --git a/ui/app/store/actions.js b/ui/app/store/actions.js index bc5e9b6bb..5cdfaaecb 100644 --- a/ui/app/store/actions.js +++ b/ui/app/store/actions.js @@ -1301,7 +1301,7 @@ export function addTokens (tokens) { .entries(tokens) .map(([_, { address, symbol, decimals }]) => ( dispatch(addToken(address, symbol, decimals)) - )) + )), ) } } @@ -1727,8 +1727,8 @@ export function exportAccounts (password, addresses) { return reject(err) } return resolve(result) - }) - ) + }), + ), ) return resolve(Promise.all(accountPromises)) }) diff --git a/ui/index.js b/ui/index.js index 44f5fd500..c5547fbfb 100644 --- a/ui/index.js +++ b/ui/index.js @@ -101,7 +101,7 @@ async function startApp (metamaskState, backgroundConnection, opts) { metamaskState.unapprovedDecryptMsgs, metamaskState.unapprovedEncryptionPublicKeyMsgs, metamaskState.unapprovedTypedMessages, - metamaskState.network + metamaskState.network, ) const numberOfUnapprivedTx = unapprovedTxsAll.length if (numberOfUnapprivedTx > 0) { diff --git a/yarn.lock b/yarn.lock index 1f2a9dd2b..4131f5818 100644 --- a/yarn.lock +++ b/yarn.lock @@ -54,19 +54,12 @@ dependencies: "@babel/highlight" "^7.0.0" -"@babel/code-frame@^7.0.0": - version "7.5.5" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.5.5.tgz#bc0782f6d69f7b7d49531219699b988f669a8f9d" - integrity sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw== +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.8.3": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a" + integrity sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg== dependencies: - "@babel/highlight" "^7.0.0" - -"@babel/code-frame@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e" - integrity sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g== - dependencies: - "@babel/highlight" "^7.8.3" + "@babel/highlight" "^7.10.4" "@babel/core@>=7.2.2", "@babel/core@^7.4.3", "@babel/core@^7.5.5", "@babel/core@^7.7.5": version "7.8.3" @@ -89,12 +82,12 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.8.3": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.8.4.tgz#35bbc74486956fe4251829f9f6c48330e8d0985e" - integrity sha512-PwhclGdRpNAf3IxZb0YVuITPZmmrXz9zf6fH8lT4XbrmfQKr6ryBzhv593P5C6poJRciFCL/eHGW2NuGrgEyxA== +"@babel/generator@^7.10.4", "@babel/generator@^7.8.3": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.10.4.tgz#e49eeed9fe114b62fa5b181856a43a5e32f5f243" + integrity sha512-toLIHUIAgcQygFZRAQcsLQV3CBuX6yOIru1kJk/qqqvcRmZrYe6WavZTSG+bB8MxhnL9YPf+pKQfuiP161q7ng== dependencies: - "@babel/types" "^7.8.3" + "@babel/types" "^7.10.4" jsesc "^2.5.1" lodash "^4.17.13" source-map "^0.5.0" @@ -160,21 +153,21 @@ "@babel/traverse" "^7.1.0" "@babel/types" "^7.0.0" -"@babel/helper-function-name@^7.1.0", "@babel/helper-function-name@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz#eeeb665a01b1f11068e9fb86ad56a1cb1a824cca" - integrity sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA== +"@babel/helper-function-name@^7.1.0", "@babel/helper-function-name@^7.10.4", "@babel/helper-function-name@^7.8.3": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz#d2d3b20c59ad8c47112fa7d2a94bc09d5ef82f1a" + integrity sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ== dependencies: - "@babel/helper-get-function-arity" "^7.8.3" - "@babel/template" "^7.8.3" - "@babel/types" "^7.8.3" + "@babel/helper-get-function-arity" "^7.10.4" + "@babel/template" "^7.10.4" + "@babel/types" "^7.10.4" -"@babel/helper-get-function-arity@^7.0.0", "@babel/helper-get-function-arity@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz#b894b947bd004381ce63ea1db9f08547e920abd5" - integrity sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA== +"@babel/helper-get-function-arity@^7.0.0", "@babel/helper-get-function-arity@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz#98c1cbea0e2332f33f9a4661b8ce1505b2c19ba2" + integrity sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A== dependencies: - "@babel/types" "^7.8.3" + "@babel/types" "^7.10.4" "@babel/helper-hoist-variables@^7.4.4": version "7.4.4" @@ -209,26 +202,14 @@ "@babel/types" "^7.4.4" lodash "^4.17.11" -"@babel/helper-optimise-call-expression@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz#a2920c5702b073c15de51106200aa8cad20497d5" - integrity sha512-u8nd9NQePYNQV8iPWu/pLLYBqZBa4ZaY1YWRFMuxrid94wKI1QNt67NEZ7GAe5Kc/0LLScbim05xZFWkAdrj9g== - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-optimise-call-expression@^7.8.3": +"@babel/helper-optimise-call-expression@^7.0.0", "@babel/helper-optimise-call-expression@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.8.3.tgz#7ed071813d09c75298ef4f208956006b6111ecb9" integrity sha512-Kag20n86cbO2AvHca6EJsvqAd82gc6VMGule4HwebwMlwkpXuVqrNRj6CkCV2sKxgi9MyAUnZVnZ6lJ1/vKhHQ== dependencies: "@babel/types" "^7.8.3" -"@babel/helper-plugin-utils@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" - integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA== - -"@babel/helper-plugin-utils@^7.10.4": +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz#2f75a831269d4f677de49986dff59927533cf375" integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg== @@ -274,12 +255,17 @@ "@babel/template" "^7.1.0" "@babel/types" "^7.0.0" -"@babel/helper-split-export-declaration@^7.4.4", "@babel/helper-split-export-declaration@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz#31a9f30070f91368a7182cf05f831781065fc7a9" - integrity sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA== +"@babel/helper-split-export-declaration@^7.10.4", "@babel/helper-split-export-declaration@^7.4.4", "@babel/helper-split-export-declaration@^7.8.3": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.10.4.tgz#2c70576eaa3b5609b24cb99db2888cc3fc4251d1" + integrity sha512-pySBTeoUff56fL5CBU2hWm9TesA4r/rOkI9DyJLvvgz09MB9YtfIYe3iBriVaYNaPe+Alua0vBIOVOLs2buWhg== dependencies: - "@babel/types" "^7.8.3" + "@babel/types" "^7.10.4" + +"@babel/helper-validator-identifier@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2" + integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw== "@babel/helper-wrap-function@^7.1.0": version "7.2.0" @@ -300,19 +286,19 @@ "@babel/traverse" "^7.8.3" "@babel/types" "^7.8.3" -"@babel/highlight@^7.0.0", "@babel/highlight@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.8.3.tgz#28f173d04223eaaa59bc1d439a3836e6d1265797" - integrity sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg== +"@babel/highlight@^7.0.0", "@babel/highlight@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143" + integrity sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA== dependencies: + "@babel/helper-validator-identifier" "^7.10.4" chalk "^2.0.0" - esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@^7.0.0", "@babel/parser@^7.4.4", "@babel/parser@^7.7.5", "@babel/parser@^7.8.3": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.4.tgz#d1dbe64691d60358a974295fa53da074dd2ce8e8" - integrity sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw== +"@babel/parser@^7.10.4", "@babel/parser@^7.7.0", "@babel/parser@^7.7.5", "@babel/parser@^7.8.3": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.10.4.tgz#9eedf27e1998d87739fb5028a5120557c06a1a64" + integrity sha512-8jHII4hf+YVDsskTF6WuMB3X4Eh+PsUkC2ljq22so5rHvH+T8BzyL94VOdyFLNR8tBSVXOTbNHOKpR4TfRxVtA== "@babel/plugin-proposal-async-generator-functions@^7.2.0": version "7.2.0" @@ -996,94 +982,43 @@ dependencies: regenerator-runtime "^0.12.0" -"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.4.5": - version "7.4.5" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.4.5.tgz#582bb531f5f9dc67d2fcb682979894f75e253f12" - integrity sha512-TuI4qpWZP6lGOGIuGWtp9sPluqYICmbk8T/1vpSysqJxRPkudh/ofFWyqdcMsDf2s7KvDL4/YHgKyvcS3g9CJQ== - dependencies: - regenerator-runtime "^0.13.2" - -"@babel/runtime@^7.4.0": - version "7.7.4" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.7.4.tgz#b23a856751e4bf099262f867767889c0e3fe175b" - integrity sha512-r24eVUUr0QqNZa+qrImUk8fn5SPhHq+IfYvIoIMg0do3GdK9sMdiLKP3GYVVaxpPKORgm8KRKaNTEhAjgIpLMw== - dependencies: - regenerator-runtime "^0.13.2" - -"@babel/runtime@^7.4.2": - version "7.4.3" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.4.3.tgz#79888e452034223ad9609187a0ad1fe0d2ad4bdc" - integrity sha512-9lsJwJLxDh/T3Q3SZszfWOTkk3pHbkmH+3KY+zwIDmsNlxsumuhS2TH3NIpktU4kNvfzy+k3eLT7aTJSPTo0OA== - dependencies: - regenerator-runtime "^0.13.2" - -"@babel/runtime@^7.5.0", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.8.3.tgz#0811944f73a6c926bb2ad35e918dcc1bfab279f1" - integrity sha512-fVHx1rzEmwB130VTkLnxR+HmxcTjGzH12LYQcFFoBwakMd3aOMD4OsRN7tGG/UOYE2ektgFrS8uACAoRk1CY0w== - dependencies: - regenerator-runtime "^0.13.2" - -"@babel/runtime@^7.5.4": - version "7.9.6" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.9.6.tgz#a9102eb5cadedf3f31d08a9ecf294af7827ea29f" - integrity sha512-64AF1xY3OAkFHqOb9s4jpgk1Mm5vDZ4L3acHvAml+53nO1XbXLuDodsVpO4OIUsmemlUHMxNdYMNJmsvOwLrvQ== - dependencies: - regenerator-runtime "^0.13.4" - -"@babel/runtime@^7.5.5": - version "7.5.5" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.5.5.tgz#74fba56d35efbeca444091c7850ccd494fd2f132" - integrity sha512-28QvEGyQyNkB0/m2B4FU7IEZGK2NUrcMtT6BZEFALTguLk+AUT6ofsHtPk5QyjAdUkpMJ+/Em+quwz4HOt30AQ== - dependencies: - regenerator-runtime "^0.13.2" - -"@babel/runtime@^7.8.3", "@babel/runtime@^7.8.7": +"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.0", "@babel/runtime@^7.4.2", "@babel/runtime@^7.4.4", "@babel/runtime@^7.4.5", "@babel/runtime@^7.5.0", "@babel/runtime@^7.5.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.3", "@babel/runtime@^7.8.7": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.10.4.tgz#a6724f1a6b8d2f6ea5236dbfe58c7d7ea9c5eb99" integrity sha512-UpTN5yUJr9b4EX2CnGNWIvER7Ab83ibv0pcvvHc4UOdrBI5jb8bj+32cCwPX6xu0mt2daFNjYhoi+X7beH0RSw== dependencies: regenerator-runtime "^0.13.4" -"@babel/template@^7.1.0", "@babel/template@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.4.4.tgz#f4b88d1225689a08f5bc3a17483545be9e4ed237" - integrity sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw== +"@babel/template@^7.1.0", "@babel/template@^7.10.4", "@babel/template@^7.4.4", "@babel/template@^7.7.4", "@babel/template@^7.8.3": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.10.4.tgz#3251996c4200ebc71d1a8fc405fba940f36ba278" + integrity sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA== dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.4.4" - "@babel/types" "^7.4.4" + "@babel/code-frame" "^7.10.4" + "@babel/parser" "^7.10.4" + "@babel/types" "^7.10.4" -"@babel/template@^7.7.4", "@babel/template@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.3.tgz#e02ad04fe262a657809327f578056ca15fd4d1b8" - integrity sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ== +"@babel/traverse@^7.1.0", "@babel/traverse@^7.4.4", "@babel/traverse@^7.7.0", "@babel/traverse@^7.7.4", "@babel/traverse@^7.8.3": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.10.4.tgz#e642e5395a3b09cc95c8e74a27432b484b697818" + integrity sha512-aSy7p5THgSYm4YyxNGz6jZpXf+Ok40QF3aA2LyIONkDHpAcJzDUqlCKXv6peqYUs2gmic849C/t2HKw2a2K20Q== dependencies: - "@babel/code-frame" "^7.8.3" - "@babel/parser" "^7.8.3" - "@babel/types" "^7.8.3" - -"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.4.4", "@babel/traverse@^7.7.4", "@babel/traverse@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.8.3.tgz#a826215b011c9b4f73f3a893afbc05151358bf9a" - integrity sha512-we+a2lti+eEImHmEXp7bM9cTxGzxPmBiVJlLVD+FuuQMeeO7RaDbutbgeheDkw+Xe3mCfJHnGOWLswT74m2IPg== - dependencies: - "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.8.3" - "@babel/helper-function-name" "^7.8.3" - "@babel/helper-split-export-declaration" "^7.8.3" - "@babel/parser" "^7.8.3" - "@babel/types" "^7.8.3" + "@babel/code-frame" "^7.10.4" + "@babel/generator" "^7.10.4" + "@babel/helper-function-name" "^7.10.4" + "@babel/helper-split-export-declaration" "^7.10.4" + "@babel/parser" "^7.10.4" + "@babel/types" "^7.10.4" debug "^4.1.0" globals "^11.1.0" lodash "^4.17.13" -"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.5.5", "@babel/types@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.3.tgz#5a383dffa5416db1b73dedffd311ffd0788fb31c" - integrity sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg== +"@babel/types@^7.0.0", "@babel/types@^7.10.4", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.5.5", "@babel/types@^7.7.0", "@babel/types@^7.8.3": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.10.4.tgz#369517188352e18219981efd156bfdb199fff1ee" + integrity sha512-UTCFOxC3FsFHb7lkRMVvgLzaRVamXuAs2Tz4wajva4WxtVY82eZeaUBtC2Zt95FU9TiznuC0Zk35tsim8jeVpg== dependencies: - esutils "^2.0.2" + "@babel/helper-validator-identifier" "^7.10.4" lodash "^4.17.13" to-fast-properties "^2.0.0" @@ -3014,14 +2949,7 @@ acorn-dynamic-import@^4.0.0: resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz#482210140582a36b83c3e342e1cfebcaa9240948" integrity sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw== -acorn-globals@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.1.0.tgz#ab716025dbe17c54d3ef81d32ece2b2d99fe2538" - integrity sha512-KjZwU26uG3u6eZcfGbTULzFcsoz6pegNKtHPksZPOUsiKo5bUmiBPa38FuHZ/Eun+XYh/JCCkS9AS3Lu4McQOQ== - dependencies: - acorn "^5.0.0" - -acorn-globals@^4.1.0, acorn-globals@^4.3.3: +acorn-globals@^4.0.0, acorn-globals@^4.1.0, acorn-globals@^4.3.3: version "4.3.4" resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.3.4.tgz#9fa1926addc11c97308c4e66d7add0d40c3272e7" integrity sha512-clfQEh21R+D0leSbUdWf3OcfqyaCSAQ8Ryq00bofSekfr9W8u1jyYZo6ir0xu9Gtcf7BjcHJpnbZH7JOCpP60A== @@ -3036,15 +2964,10 @@ acorn-jsx@^3.0.0: dependencies: acorn "^3.0.4" -acorn-jsx@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.0.1.tgz#32a064fd925429216a09b141102bfdd185fae40e" - integrity sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg== - -acorn-jsx@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.0.2.tgz#84b68ea44b373c4f8686023a551f61a21b7c4a4f" - integrity sha512-tiNTrP1MP0QrChmD2DdupCr6HWSFeKVw5d/dHTu4Y7rkAkRhU/Dt7dphAfIUyxtHpl/eBVip5uTNSpQJHylpAw== +acorn-jsx@^5.0.0, acorn-jsx@^5.0.2, acorn-jsx@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.2.0.tgz#4c66069173d6fdd68ed85239fc256226182b2ebe" + integrity sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ== acorn-node@^1.2.0, acorn-node@^1.3.0, acorn-node@^1.5.2: version "1.6.2" @@ -3056,16 +2979,11 @@ acorn-node@^1.2.0, acorn-node@^1.3.0, acorn-node@^1.5.2: acorn-walk "^6.1.0" xtend "^4.0.1" -acorn-walk@^6.0.1, acorn-walk@^6.1.1: +acorn-walk@^6.0.1, acorn-walk@^6.1.0, acorn-walk@^6.1.1: version "6.2.0" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.2.0.tgz#123cb8f3b84c2171f1f7fb252615b1c78a6b1a8c" integrity sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA== -acorn-walk@^6.1.0: - version "6.1.1" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.1.1.tgz#d363b66f5fac5f018ff9c3a1e7b6f8e310cc3913" - integrity sha512-OtUw6JUTgxA2QoqqmrmQ7F2NYqiBPi/L2jqHyFtllhOUvXYQXf0Z1CYUinIfyT4bTCGmrA7gX9FvHA81uzCoVw== - acorn@5.X, acorn@^5.0.0, acorn@^5.0.3, acorn@^5.1.2, acorn@^5.2.1, acorn@^5.5.3: version "5.7.4" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.4.tgz#3e8d8a9947d0599a1796d10225d7432f4a4acf5e" @@ -3086,10 +3004,10 @@ acorn@^6.0.1, acorn@^6.0.2, acorn@^6.0.7, acorn@^6.2.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== -acorn@^7.0.0: - version "7.1.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.1.tgz#e35668de0b402f359de515c5482a1ab9f89a69bf" - integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg== +acorn@^7.0.0, acorn@^7.1.1: + version "7.3.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.3.1.tgz#85010754db53c3fbaf3b9ea3e083aa5c5d147ffd" + integrity sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA== addons-linter@1.14.0: version "1.14.0" @@ -4244,17 +4162,17 @@ babel-core@^6.0.14, babel-core@^6.26.0: slash "^1.0.0" source-map "^0.5.7" -babel-eslint@^10.0.2: - version "10.0.2" - resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.0.2.tgz#182d5ac204579ff0881684b040560fdcc1558456" - integrity sha512-UdsurWPtgiPgpJ06ryUnuaSXC2s0WoSZnQmEpbAH65XZSdwowgN5MvyP7e88nW07FYXv72erVtpBkxyDVKhH1Q== +babel-eslint@^10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.1.0.tgz#6968e568a910b78fb3779cdd8b6ac2f479943232" + integrity sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg== dependencies: "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.0.0" - "@babel/traverse" "^7.0.0" - "@babel/types" "^7.0.0" - eslint-scope "3.7.1" + "@babel/parser" "^7.7.0" + "@babel/traverse" "^7.7.0" + "@babel/types" "^7.7.0" eslint-visitor-keys "^1.0.0" + resolve "^1.12.0" babel-generator@^6.26.0: version "6.26.1" @@ -7011,7 +6929,7 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -concat-stream@^1.4.6, concat-stream@^1.5.0, concat-stream@^1.5.1, concat-stream@^1.5.2, concat-stream@^1.6.0, concat-stream@~1.6.0, concat-stream@^1.6.1, concat-stream@^1.6.2: +concat-stream@^1.4.6, concat-stream@^1.5.0, concat-stream@^1.5.1, concat-stream@^1.5.2, concat-stream@^1.6.0, concat-stream@^1.6.1, concat-stream@^1.6.2, concat-stream@~1.6.0: version "1.6.2" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== @@ -9696,14 +9614,6 @@ eslint-rule-composer@^0.3.0: resolved "https://registry.yarnpkg.com/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz#79320c927b0c5c0d3d3d2b76c8b4a488f25bbaf9" integrity sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg== -eslint-scope@3.7.1: - version "3.7.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" - integrity sha1-PWPD7f2gLgbgGkUq2IyqzHzctug= - dependencies: - esrecurse "^4.1.0" - estraverse "^4.1.1" - eslint-scope@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" @@ -9712,12 +9622,20 @@ eslint-scope@^4.0.3: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint-utils@^1.3.1: - version "1.4.2" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.2.tgz#166a5180ef6ab7eb462f162fd0e6f2463d7309ab" - integrity sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q== +eslint-scope@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.0.tgz#d0f971dfe59c69e0cada684b23d49dbf82600ce5" + integrity sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w== dependencies: - eslint-visitor-keys "^1.0.0" + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-utils@^1.3.1, eslint-utils@^1.4.3: + version "1.4.3" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" + integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== + dependencies: + eslint-visitor-keys "^1.1.0" eslint-visitor-keys@1.1.0, eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: version "1.1.0" @@ -9807,10 +9725,10 @@ eslint@^3.7.1: text-table "~0.2.0" user-home "^2.0.0" -eslint@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.0.1.tgz#4a32181d72cb999d6f54151df7d337131f81cda7" - integrity sha512-DyQRaMmORQ+JsWShYsSg4OPTjY56u1nCjAmICrE8vLWqyLKxhFXOthwMj1SA8xwfrv0CofLNVnqbfyhwCkaO0w== +eslint@^6.8.0: + version "6.8.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.8.0.tgz#62262d6729739f9275723824302fb227c8c93ffb" + integrity sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig== dependencies: "@babel/code-frame" "^7.0.0" ajv "^6.10.0" @@ -9818,36 +9736,37 @@ eslint@^6.0.1: cross-spawn "^6.0.5" debug "^4.0.1" doctrine "^3.0.0" - eslint-scope "^4.0.3" - eslint-utils "^1.3.1" - eslint-visitor-keys "^1.0.0" - espree "^6.0.0" + eslint-scope "^5.0.0" + eslint-utils "^1.4.3" + eslint-visitor-keys "^1.1.0" + espree "^6.1.2" esquery "^1.0.1" esutils "^2.0.2" file-entry-cache "^5.0.1" functional-red-black-tree "^1.0.1" - glob-parent "^3.1.0" - globals "^11.7.0" + glob-parent "^5.0.0" + globals "^12.1.0" ignore "^4.0.6" import-fresh "^3.0.0" imurmurhash "^0.1.4" - inquirer "^6.2.2" + inquirer "^7.0.0" is-glob "^4.0.0" js-yaml "^3.13.1" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.3.0" - lodash "^4.17.11" + lodash "^4.17.14" minimatch "^3.0.4" mkdirp "^0.5.1" natural-compare "^1.4.0" - optionator "^0.8.2" + optionator "^0.8.3" progress "^2.0.0" regexpp "^2.0.1" - semver "^5.5.1" - strip-ansi "^4.0.0" - strip-json-comments "^2.0.1" + semver "^6.1.2" + strip-ansi "^5.2.0" + strip-json-comments "^3.0.1" table "^5.2.3" text-table "^0.2.0" + v8-compile-cache "^2.0.3" espree@6.1.1: version "6.1.1" @@ -9875,14 +9794,14 @@ espree@^5.0.1: acorn-jsx "^5.0.0" eslint-visitor-keys "^1.0.0" -espree@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/espree/-/espree-6.0.0.tgz#716fc1f5a245ef5b9a7fdb1d7b0d3f02322e75f6" - integrity sha512-lJvCS6YbCn3ImT3yKkPe0+tJ+mH6ljhGNjHQH9mRtiO6gjhVAOhVXW1yjnwqGwTkK3bGbye+hb00nFNmu0l/1Q== +espree@^6.1.2: + version "6.2.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-6.2.1.tgz#77fc72e1fd744a2052c20f38a5b575832e82734a" + integrity sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw== dependencies: - acorn "^6.0.7" - acorn-jsx "^5.0.0" - eslint-visitor-keys "^1.0.0" + acorn "^7.1.1" + acorn-jsx "^5.2.0" + eslint-visitor-keys "^1.1.0" esprima@3.x.x, esprima@^3.1.3: version "3.1.3" @@ -9899,14 +9818,7 @@ esprima@^4.0.0, esprima@~4.0.0: resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" integrity sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw== -esquery@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.0.tgz#cfba8b57d7fba93f17298a8a006a04cda13d80fa" - integrity sha1-z7qLV9f7qT8XKYqKAGoEzaE9gPo= - dependencies: - estraverse "^4.0.0" - -esquery@^1.0.1: +esquery@^1.0.0, esquery@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708" integrity sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA== @@ -9926,12 +9838,7 @@ estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" integrity sha1-De4/7TH81GlhjOc0IJn8GvoL2xM= -esutils@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" - integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs= - -esutils@^2.0.2: +esutils@^2.0.0, esutils@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== @@ -11267,7 +11174,7 @@ fast-json-stable-stringify@^2.0.0: resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= -fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.4: +fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.4, fast-levenshtein@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= @@ -12567,6 +12474,13 @@ globals@^11.1.0, globals@^11.7.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== +globals@^12.1.0: + version "12.4.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-12.4.0.tgz#a18813576a41b00a24a97e7f815918c2e19925f8" + integrity sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg== + dependencies: + type-fest "^0.8.1" + globals@^9.14.0, globals@^9.18.0: version "9.18.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" @@ -19632,6 +19546,18 @@ optionator@^0.8.1, optionator@^0.8.2: type-check "~0.3.2" wordwrap "~1.0.0" +optionator@^0.8.3: + version "0.8.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" + integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.6" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + word-wrap "~1.2.3" + options@>=0.0.5: version "0.0.6" resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f" @@ -23810,7 +23736,7 @@ semver-truncate@^1.1.2: resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" integrity sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg== -semver@6.3.0, semver@^6.1.1, semver@^6.2.0, semver@^6.3.0: +semver@6.3.0, semver@^6.1.1, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -25198,6 +25124,11 @@ strip-json-comments@2.0.1, strip-json-comments@^2.0.0, strip-json-comments@^2.0. resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= +strip-json-comments@^3.0.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + strip-outer@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/strip-outer/-/strip-outer-1.0.1.tgz#b2fd2abf6604b9d1e6013057195df836b8a9d631" @@ -26901,6 +26832,11 @@ uuid@^3.3.2, uuid@^3.3.3: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.3.tgz#4568f0216e78760ee1dbf3a4d2cf53e224112866" integrity sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ== +v8-compile-cache@^2.0.3: + version "2.1.1" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz#54bc3cdd43317bca91e35dcaf305b1a7237de745" + integrity sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ== + v8flags@^3.1.1, v8flags@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-3.2.0.tgz#b243e3b4dfd731fa774e7492128109a0fe66d656" @@ -27768,6 +27704,11 @@ winston@^2.4.0: isstream "0.1.x" stack-trace "0.0.x" +word-wrap@~1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + wordwrap@~0.0.2: version "0.0.3" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107"