Fix import/order issues (#9239)

See [`import/order`](https://eslint.org/docs/rules/import/order) for more information.

This change enables `import/order` and fixes the issues raised by the rule.
feature/default_network_editable
Whymarrh Whitby 4 years ago committed by GitHub
parent b7259e5d6a
commit c1e3c229bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      .eslintrc.js
  2. 14
      app/scripts/background.js
  3. 2
      app/scripts/contentscript.js
  4. 2
      app/scripts/controllers/app-state.js
  5. 4
      app/scripts/controllers/detect-tokens.js
  6. 2
      app/scripts/controllers/ens/index.js
  7. 2
      app/scripts/controllers/network/middleware/pending.js
  8. 2
      app/scripts/controllers/network/network.js
  9. 2
      app/scripts/controllers/preferences.js
  10. 8
      app/scripts/controllers/threebox.js
  11. 10
      app/scripts/controllers/transactions/index.js
  12. 2
      app/scripts/controllers/transactions/tx-gas-utils.js
  13. 2
      app/scripts/controllers/transactions/tx-state-manager.js
  14. 2
      app/scripts/lib/account-tracker.js
  15. 2
      app/scripts/lib/decrypt-message-manager.js
  16. 2
      app/scripts/lib/encryption-public-key-manager.js
  17. 2
      app/scripts/lib/ens-ipfs/resolver.js
  18. 2
      app/scripts/lib/personal-message-manager.js
  19. 4
      app/scripts/lib/typed-message-manager.js
  20. 2
      app/scripts/lib/util.js
  21. 35
      app/scripts/metamask-controller.js
  22. 2
      app/scripts/phishing-detect.js
  23. 20
      app/scripts/ui.js
  24. 2
      development/build/etc.js
  25. 2
      development/build/scripts.js
  26. 2
      development/build/static.js
  27. 4
      development/sentry-publish.js
  28. 2
      development/sourcemap-validator.js
  29. 2
      test/e2e/address-book.spec.js
  30. 2
      test/e2e/ethereum-on.spec.js
  31. 2
      test/e2e/fixture-server.js
  32. 2
      test/e2e/from-import-ui.spec.js
  33. 2
      test/e2e/ganache.js
  34. 2
      test/e2e/helpers.js
  35. 2
      test/e2e/incremental-security.spec.js
  36. 2
      test/e2e/metamask-responsive-ui.spec.js
  37. 2
      test/e2e/metamask-ui.spec.js
  38. 2
      test/e2e/permissions.spec.js
  39. 2
      test/e2e/send-edit.spec.js
  40. 2
      test/e2e/threebox.spec.js
  41. 2
      test/e2e/webdriver/driver.js
  42. 2
      test/e2e/webdriver/index.js
  43. 2
      test/unit/app/ComposableObservableStore.js
  44. 4
      test/unit/app/controllers/metamask-controller-test.js
  45. 2
      test/unit/app/controllers/preferences-controller-test.js
  46. 2
      test/unit/app/controllers/token-rates-controller.js
  47. 2
      test/unit/app/controllers/transactions/pending-tx-tracker-test.js
  48. 2
      test/unit/lib/account-link.test.js
  49. 2
      test/unit/responsive/components/dropdown-test.js
  50. 2
      ui/app/components/app/account-list-item/tests/account-list-item-component.test.js
  51. 4
      ui/app/components/app/account-menu/tests/account-menu.test.js
  52. 2
      ui/app/components/app/add-token-button/add-token-button.component.js
  53. 2
      ui/app/components/app/alerts/alerts.js
  54. 2
      ui/app/components/app/app-header/app-header.container.js
  55. 2
      ui/app/components/app/app-header/tests/app-header.test.js
  56. 4
      ui/app/components/app/asset-list-item/asset-list-item.js
  57. 4
      ui/app/components/app/confirm-page-container/confirm-detail-row/tests/confirm-detail-row.component.test.js
  58. 2
      ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js
  59. 2
      ui/app/components/app/connected-accounts-list/connected-accounts-list.component.js
  60. 2
      ui/app/components/app/connected-status-indicator/connected-status-indicator.container.js
  61. 2
      ui/app/components/app/contact-list/recipient-group/recipient-group.component.js
  62. 2
      ui/app/components/app/dropdowns/network-dropdown.js
  63. 2
      ui/app/components/app/dropdowns/tests/dropdown.test.js
  64. 2
      ui/app/components/app/dropdowns/tests/network-dropdown-icon.test.js
  65. 2
      ui/app/components/app/dropdowns/tests/network-dropdown.test.js
  66. 2
      ui/app/components/app/gas-customization/advanced-gas-inputs/tests/advanced-gas-input-component.test.js
  67. 4
      ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/tests/advanced-tab-content-component.test.js
  68. 2
      ui/app/components/app/gas-customization/gas-modal-page-container/basic-tab-content/tests/basic-tab-content-component.test.js
  69. 4
      ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js
  70. 4
      ui/app/components/app/gas-customization/gas-modal-page-container/tests/gas-modal-page-container-component.test.js
  71. 4
      ui/app/components/app/gas-customization/gas-price-button-group/tests/gas-price-button-group-component.test.js
  72. 4
      ui/app/components/app/gas-customization/gas-price-chart/tests/gas-price-chart.component.test.js
  73. 2
      ui/app/components/app/info-box/tests/info-box.test.js
  74. 2
      ui/app/components/app/loading-network-screen/loading-network-screen.container.js
  75. 2
      ui/app/components/app/menu-bar/menu-bar.js
  76. 2
      ui/app/components/app/menu-bar/tests/menu-bar.test.js
  77. 2
      ui/app/components/app/modal/modal-content/tests/modal-content.component.test.js
  78. 2
      ui/app/components/app/modal/modal.component.js
  79. 2
      ui/app/components/app/modal/tests/modal.component.test.js
  80. 2
      ui/app/components/app/modals/account-modal-container/account-modal-container.component.js
  81. 2
      ui/app/components/app/modals/add-to-addressbook-modal/add-to-addressbook-modal.container.js
  82. 2
      ui/app/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/tests/cancel-transaction-gas-fee.component.test.js
  83. 2
      ui/app/components/app/modals/cancel-transaction/cancel-transaction.component.js
  84. 2
      ui/app/components/app/modals/cancel-transaction/cancel-transaction.container.js
  85. 2
      ui/app/components/app/modals/cancel-transaction/tests/cancel-transaction.component.test.js
  86. 2
      ui/app/components/app/modals/confirm-delete-network/confirm-delete-network.container.js
  87. 2
      ui/app/components/app/modals/confirm-delete-network/tests/confirm-delete-network.test.js
  88. 2
      ui/app/components/app/modals/confirm-remove-account/confirm-remove-account.container.js
  89. 2
      ui/app/components/app/modals/confirm-remove-account/tests/confirm-remove-account.test.js
  90. 2
      ui/app/components/app/modals/confirm-reset-account/confirm-reset-account.container.js
  91. 2
      ui/app/components/app/modals/confirm-reset-account/tests/confirm-reset-account.test.js
  92. 4
      ui/app/components/app/modals/edit-approval-permission/edit-approval-permission.component.js
  93. 2
      ui/app/components/app/modals/edit-approval-permission/edit-approval-permission.container.js
  94. 2
      ui/app/components/app/modals/loading-network-error/loading-network-error.container.js
  95. 2
      ui/app/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.container.js
  96. 2
      ui/app/components/app/modals/metametrics-opt-in-modal/tests/metametrics-opt-in-modal.test.js
  97. 2
      ui/app/components/app/modals/modal.js
  98. 2
      ui/app/components/app/modals/new-account-modal/new-account-modal.container.js
  99. 2
      ui/app/components/app/modals/qr-scanner/qr-scanner.container.js
  100. 2
      ui/app/components/app/modals/reject-transactions/reject-transactions.container.js
  101. Some files were not shown because too many files have changed in this diff Show More

@ -50,6 +50,7 @@ module.exports = {
'implicit-arrow-linebreak': 'error',
'import/extensions': ['error', 'never', { 'json': 'always' }],
'import/no-extraneous-dependencies': 'error',
'import/order': 'error',
'import/unambiguous': 'error',
'max-statements-per-line': ['error', { 'max': 1 }],
'no-case-declarations': 'error',

@ -1,11 +1,11 @@
/**
* @file The entry point for the web extension singleton process.
*/
// these need to run before anything else
/* eslint-disable import/order */
import './lib/freezeGlobals'
import setupFetchDebugging from './lib/setupFetchDebugging'
/* eslint-enable import/order */
setupFetchDebugging()
@ -17,14 +17,14 @@ import pump from 'pump'
import debounce from 'debounce-stream'
import log from 'loglevel'
import extension from 'extensionizer'
import ReadOnlyNetworkStore from './lib/network-store'
import LocalStore from './lib/local-store'
import storeTransform from 'obs-store/lib/transform'
import asStream from 'obs-store/lib/asStream'
import ExtensionPlatform from './platforms/extension'
import Migrator from './lib/migrator'
import migrations from './migrations'
import PortStream from 'extension-port-stream'
import migrations from './migrations'
import Migrator from './lib/migrator'
import ExtensionPlatform from './platforms/extension'
import LocalStore from './lib/local-store'
import ReadOnlyNetworkStore from './lib/network-store'
import createStreamSink from './lib/createStreamSink'
import NotificationManager from './lib/notification-manager'
import MetamaskController from './metamask-controller'

@ -1,5 +1,5 @@
import pump from 'pump'
import querystring from 'querystring'
import pump from 'pump'
import LocalMessageDuplexStream from 'post-message-stream'
import ObjectMultiplex from 'obj-multiplex'
import extension from 'extensionizer'

@ -1,5 +1,5 @@
import ObservableStore from 'obs-store'
import EventEmitter from 'events'
import ObservableStore from 'obs-store'
export default class AppStateController extends EventEmitter {
/**

@ -1,11 +1,11 @@
import Web3 from 'web3'
import contracts from 'eth-contract-metadata'
import { warn } from 'loglevel'
import SINGLE_CALL_BALANCES_ABI from 'single-call-balance-checker-abi'
import { MAINNET } from './network/enums'
// By default, poll every 3 minutes
const DEFAULT_INTERVAL = 180 * 1000
import SINGLE_CALL_BALANCES_ABI from 'single-call-balance-checker-abi'
const SINGLE_CALL_BALANCES_ADDRESS = '0xb1f8e55c7f64d203c1400b9d8555d050f94adf39'
/**
* A controller that polls for token exchange

@ -1,6 +1,6 @@
import punycode from 'punycode'
import ethUtil from 'ethereumjs-util'
import ObservableStore from 'obs-store'
import punycode from 'punycode'
import log from 'loglevel'
import Ens from './ens'

@ -1,5 +1,5 @@
import { formatTxMetaForRpcResult } from '../util'
import createAsyncMiddleware from 'json-rpc-engine/src/createAsyncMiddleware'
import { formatTxMetaForRpcResult } from '../util'
export function createPendingNonceMiddleware ({ getPendingNonce }) {
return createAsyncMiddleware(async (req, res, next) => {

@ -6,11 +6,11 @@ import EthQuery from 'eth-query'
import JsonRpcEngine from 'json-rpc-engine'
import providerFromEngine from 'eth-json-rpc-middleware/providerFromEngine'
import log from 'loglevel'
import { createSwappableProxy, createEventEmitterProxy } from 'swappable-obj-proxy'
import createMetamaskMiddleware from './createMetamaskMiddleware'
import createInfuraClient from './createInfuraClient'
import createJsonRpcClient from './createJsonRpcClient'
import createLocalhostClient from './createLocalhostClient'
import { createSwappableProxy, createEventEmitterProxy } from 'swappable-obj-proxy'
const networks = { networkList: {} }

@ -1,7 +1,7 @@
import ObservableStore from 'obs-store'
import { addInternalMethodPrefix } from './permissions'
import { normalize as normalizeAddress } from 'eth-sig-util'
import { isValidAddress, sha3, bufferToHex } from 'ethereumjs-util'
import { addInternalMethodPrefix } from './permissions'
export default class PreferencesController {

@ -1,16 +1,18 @@
import ObservableStore from 'obs-store'
/* eslint-disable import/order */
const Box = process.env.IN_TEST
? require('../../../development/mock-3box')
: require('3box')
/* eslint-enable import/order */
import log from 'loglevel'
import migrations from '../migrations'
import Migrator from '../lib/migrator'
import JsonRpcEngine from 'json-rpc-engine'
import providerFromEngine from 'eth-json-rpc-middleware/providerFromEngine'
import createMetamaskMiddleware from './network/createMetamaskMiddleware'
import Migrator from '../lib/migrator'
import migrations from '../migrations'
import createOriginMiddleware from '../lib/createOriginMiddleware'
import createMetamaskMiddleware from './network/createMetamaskMiddleware'
const SYNC_TIMEOUT = 60 * 1000 // one minute

@ -9,6 +9,8 @@ import abiDecoder from 'abi-decoder'
abiDecoder.addABI(abi)
import NonceTracker from 'nonce-tracker'
import log from 'loglevel'
import {
TOKEN_METHOD_APPROVE,
TOKEN_METHOD_TRANSFER,
@ -18,13 +20,13 @@ import {
CONTRACT_INTERACTION_KEY,
} from '../../../../ui/app/helpers/constants/transactions'
import cleanErrorStack from '../../lib/cleanErrorStack'
import { hexToBn, bnToHex, BnMultiplyByFraction } from '../../lib/util'
import { TRANSACTION_NO_CONTRACT_ERROR_KEY } from '../../../../ui/app/helpers/constants/error-keys'
import TransactionStateManager from './tx-state-manager'
import TxGasUtil from './tx-gas-utils'
import PendingTransactionTracker from './pending-tx-tracker'
import NonceTracker from 'nonce-tracker'
import * as txUtils from './lib/util'
import cleanErrorStack from '../../lib/cleanErrorStack'
import log from 'loglevel'
import {
TRANSACTION_TYPE_CANCEL,
@ -33,8 +35,6 @@ import {
TRANSACTION_STATUS_APPROVED,
} from './enums'
import { hexToBn, bnToHex, BnMultiplyByFraction } from '../../lib/util'
import { TRANSACTION_NO_CONTRACT_ERROR_KEY } from '../../../../ui/app/helpers/constants/error-keys'
const SIMPLE_GAS_COST = '0x5208' // Hex for 21000, cost of a simple send.
const MAX_MEMSTORE_TX_LIST_SIZE = 100 // Number of transactions (by unique nonces) to keep in memory

@ -1,6 +1,6 @@
import EthQuery from 'ethjs-query'
import { hexToBn, BnMultiplyByFraction, bnToHex } from '../../lib/util'
import log from 'loglevel'
import { hexToBn, BnMultiplyByFraction, bnToHex } from '../../lib/util'
/**
* Result of gas analysis, including either a gas estimate for a successful analysis, or

@ -1,8 +1,8 @@
import EventEmitter from 'safe-event-emitter'
import ObservableStore from 'obs-store'
import log from 'loglevel'
import { generateHistoryEntry, replayHistory, snapshotFromTxMeta } from './lib/tx-state-history-helpers'
import createId from '../../lib/random-id'
import { generateHistoryEntry, replayHistory, snapshotFromTxMeta } from './lib/tx-state-history-helpers'
import { getFinalStates, normalizeTxParams } from './lib/util'
/**
TransactionStateManager is responsible for the state of a transaction and

@ -14,7 +14,6 @@ import log from 'loglevel'
import pify from 'pify'
import Web3 from 'web3'
import SINGLE_CALL_BALANCES_ABI from 'single-call-balance-checker-abi'
import { bnToHex } from './util'
import { MAINNET_NETWORK_ID, RINKEBY_NETWORK_ID, ROPSTEN_NETWORK_ID, KOVAN_NETWORK_ID } from '../controllers/network/enums'
import {
@ -23,6 +22,7 @@ import {
SINGLE_CALL_BALANCES_ADDRESS_ROPSTEN,
SINGLE_CALL_BALANCES_ADDRESS_KOVAN,
} from '../controllers/network/contract-addresses'
import { bnToHex } from './util'
export default class AccountTracker {

@ -2,11 +2,11 @@ import EventEmitter from 'events'
import ObservableStore from 'obs-store'
import ethUtil from 'ethereumjs-util'
import { ethErrors } from 'eth-json-rpc-errors'
import log from 'loglevel'
import createId from './random-id'
import { MESSAGE_TYPE } from './enums'
const hexRe = /^[0-9A-Fa-f]+$/ug
import log from 'loglevel'
/**
* Represents, and contains data about, an 'eth_decrypt' type decryption request. These are created when a

@ -1,8 +1,8 @@
import EventEmitter from 'events'
import ObservableStore from 'obs-store'
import { ethErrors } from 'eth-json-rpc-errors'
import createId from './random-id'
import log from 'loglevel'
import createId from './random-id'
import { MESSAGE_TYPE } from './enums'
/**

@ -1,9 +1,9 @@
import namehash from 'eth-ens-namehash'
import Eth from 'ethjs-query'
import EthContract from 'ethjs-contract'
import contentHash from 'content-hash'
import registryAbi from './contracts/registry'
import resolverAbi from './contracts/resolver'
import contentHash from 'content-hash'
export default async function resolveEnsToIpfsContentId ({ provider, name }) {
const eth = new Eth(provider)

@ -2,11 +2,11 @@ import EventEmitter from 'events'
import ObservableStore from 'obs-store'
import ethUtil from 'ethereumjs-util'
import { ethErrors } from 'eth-json-rpc-errors'
import log from 'loglevel'
import createId from './random-id'
import { MESSAGE_TYPE } from './enums'
const hexRe = /^[0-9A-Fa-f]+$/ug
import log from 'loglevel'
/**
* Represents, and contains data about, an 'personal_sign' type signature request. These are created when a

@ -1,12 +1,12 @@
import EventEmitter from 'events'
import ObservableStore from 'obs-store'
import createId from './random-id'
import assert from 'assert'
import ObservableStore from 'obs-store'
import { ethErrors } from 'eth-json-rpc-errors'
import sigUtil from 'eth-sig-util'
import { isValidAddress } from 'ethereumjs-util'
import log from 'loglevel'
import jsonschema from 'jsonschema'
import createId from './random-id'
import { MESSAGE_TYPE } from './enums'
/**

@ -1,6 +1,6 @@
import assert from 'assert'
import extension from 'extensionizer'
import ethUtil from 'ethereumjs-util'
import assert from 'assert'
import BN from 'bn.js'
import { memoize } from 'lodash'

@ -10,22 +10,35 @@ import pump from 'pump'
import Dnode from 'dnode'
import extension from 'extensionizer'
import ObservableStore from 'obs-store'
import ComposableObservableStore from './lib/ComposableObservableStore'
import asStream from 'obs-store/lib/asStream'
import AccountTracker from './lib/account-tracker'
import RpcEngine from 'json-rpc-engine'
import { debounce } from 'lodash'
import createEngineStream from 'json-rpc-middleware-stream/engineStream'
import createFilterMiddleware from 'eth-json-rpc-filters'
import createSubscriptionManager from 'eth-json-rpc-filters/subscriptionManager'
import providerAsMiddleware from 'eth-json-rpc-middleware/providerAsMiddleware'
import KeyringController from 'eth-keyring-controller'
import { Mutex } from 'await-semaphore'
import ethUtil from 'ethereumjs-util'
import log from 'loglevel'
import TrezorKeyring from 'eth-trezor-keyring'
import LedgerBridgeKeyring from '@metamask/eth-ledger-bridge-keyring'
import EthQuery from 'eth-query'
import nanoid from 'nanoid'
import contractMap from 'eth-contract-metadata'
import {
AddressBookController,
CurrencyRateController,
PhishingController,
} from '@metamask/controllers'
import ComposableObservableStore from './lib/ComposableObservableStore'
import AccountTracker from './lib/account-tracker'
import createLoggerMiddleware from './lib/createLoggerMiddleware'
import createMethodMiddleware from './lib/createMethodMiddleware'
import createOriginMiddleware from './lib/createOriginMiddleware'
import createTabIdMiddleware from './lib/createTabIdMiddleware'
import createOnboardingMiddleware from './lib/createOnboardingMiddleware'
import providerAsMiddleware from 'eth-json-rpc-middleware/providerAsMiddleware'
import { setupMultiplex } from './lib/stream-utils'
import KeyringController from 'eth-keyring-controller'
import EnsController from './controllers/ens'
import NetworkController from './controllers/network'
import PreferencesController from './controllers/preferences'
@ -48,22 +61,8 @@ import getRestrictedMethods from './controllers/permissions/restrictedMethods'
import nodeify from './lib/nodeify'
import accountImporter from './account-import-strategies'
import selectChainId from './lib/select-chain-id'
import { Mutex } from 'await-semaphore'
import ethUtil from 'ethereumjs-util'
import seedPhraseVerifier from './lib/seed-phrase-verifier'
import log from 'loglevel'
import TrezorKeyring from 'eth-trezor-keyring'
import LedgerBridgeKeyring from '@metamask/eth-ledger-bridge-keyring'
import EthQuery from 'eth-query'
import nanoid from 'nanoid'
import contractMap from 'eth-contract-metadata'
import {
AddressBookController,
CurrencyRateController,
PhishingController,
} from '@metamask/controllers'
import backgroundMetaMetricsEvent from './lib/background-metametrics'

@ -1,6 +1,6 @@
import querystring from 'querystring'
import dnode from 'dnode'
import { EventEmitter } from 'events'
import dnode from 'dnode'
import PortStream from 'extension-port-stream'
import extension from 'extensionizer'
import { setupMultiplex } from './lib/stream-utils'

@ -6,26 +6,26 @@ import './lib/freezeGlobals'
import 'abortcontroller-polyfill/dist/polyfill-patch-fetch'
import '@formatjs/intl-relativetimeformat/polyfill'
import { EventEmitter } from 'events'
import PortStream from 'extension-port-stream'
import { getEnvironmentType } from './lib/util'
import {
ENVIRONMENT_TYPE_FULLSCREEN,
ENVIRONMENT_TYPE_POPUP,
} from './lib/enums'
import extension from 'extensionizer'
import ExtensionPlatform from './platforms/extension'
import setupSentry from './lib/setupSentry'
import { EventEmitter } from 'events'
import Dnode from 'dnode'
import Eth from 'ethjs'
import EthQuery from 'eth-query'
import launchMetaMaskUi from '../../ui'
import StreamProvider from 'web3-stream-provider'
import { setupMultiplex } from './lib/stream-utils'
import log from 'loglevel'
import launchMetaMaskUi from '../../ui'
import { setupMultiplex } from './lib/stream-utils'
import setupSentry from './lib/setupSentry'
import ExtensionPlatform from './platforms/extension'
import {
ENVIRONMENT_TYPE_FULLSCREEN,
ENVIRONMENT_TYPE_POPUP,
} from './lib/enums'
import { getEnvironmentType } from './lib/util'
start().catch(log.error)

@ -1,7 +1,7 @@
const { promises: fs } = require('fs')
const gulp = require('gulp')
const gulpZip = require('gulp-zip')
const del = require('del')
const { promises: fs } = require('fs')
const pify = require('pify')
const pump = pify(require('pump'))
const baseManifest = require('../../app/manifest/_base.json')

@ -17,8 +17,8 @@ const { makeStringTransform } = require('browserify-transform-tools')
const conf = require('rc')('metamask', {})
const { createTask, composeParallel, composeSeries, runInChildProcess } = require('./task')
const packageJSON = require('../../package.json')
const { createTask, composeParallel, composeSeries, runInChildProcess } = require('./task')
module.exports = createScriptTasks

@ -1,5 +1,5 @@
const fs = require('fs-extra')
const path = require('path')
const fs = require('fs-extra')
const watch = require('gulp-watch')
const glob = require('fast-glob')

@ -1,6 +1,8 @@
#!/usr/bin/env node
const childProcess = require('child_process')
const pify = require('pify')
const exec = pify(require('child_process').exec, { multiArgs: true })
const exec = pify(childProcess.exec, { multiArgs: true })
const VERSION = require('../dist/chrome/manifest.json').version // eslint-disable-line import/no-unresolved
start().catch(console.error)

@ -1,6 +1,6 @@
const fs = require('fs')
const { SourceMapConsumer } = require('source-map')
const path = require('path')
const { SourceMapConsumer } = require('source-map')
const pify = require('pify')
const fsAsync = pify(fs)

@ -1,6 +1,7 @@
const assert = require('assert')
const { By, until } = require('selenium-webdriver')
const enLocaleMessages = require('../../app/_locales/en/messages.json')
const {
tinyDelayMs,
regularDelayMs,
@ -8,7 +9,6 @@ const {
} = require('./helpers')
const { buildWebDriver } = require('./webdriver')
const Ganache = require('./ganache')
const enLocaleMessages = require('../../app/_locales/en/messages.json')
const ganacheServer = new Ganache()

@ -2,13 +2,13 @@ const assert = require('assert')
const webdriver = require('selenium-webdriver')
const { By, until } = webdriver
const enLocaleMessages = require('../../app/_locales/en/messages.json')
const {
regularDelayMs,
largeDelayMs,
} = require('./helpers')
const { buildWebDriver } = require('./webdriver')
const Ganache = require('./ganache')
const enLocaleMessages = require('../../app/_locales/en/messages.json')
const ganacheServer = new Ganache()

@ -1,6 +1,6 @@
const { promises: fs } = require('fs')
const Koa = require('koa')
const path = require('path')
const Koa = require('koa')
const CURRENT_STATE_KEY = '__CURRENT__'
const DEFAULT_STATE_KEY = '__DEFAULT__'

@ -2,13 +2,13 @@ const assert = require('assert')
const webdriver = require('selenium-webdriver')
const { By, Key, until } = webdriver
const enLocaleMessages = require('../../app/_locales/en/messages.json')
const {
regularDelayMs,
largeDelayMs,
} = require('./helpers')
const { buildWebDriver } = require('./webdriver')
const Ganache = require('./ganache')
const enLocaleMessages = require('../../app/_locales/en/messages.json')
const ganacheServer = new Ganache()

@ -1,5 +1,5 @@
const ganache = require('ganache-core')
const { promisify } = require('util')
const ganache = require('ganache-core')
const defaultOptions = {
blockTime: 2,

@ -1,8 +1,8 @@
const path = require('path')
const createStaticServer = require('../../development/create-static-server')
const Ganache = require('./ganache')
const FixtureServer = require('./fixture-server')
const { buildWebDriver } = require('./webdriver')
const createStaticServer = require('../../development/create-static-server')
const tinyDelayMs = 200
const regularDelayMs = tinyDelayMs * 2

@ -2,6 +2,7 @@ const assert = require('assert')
const webdriver = require('selenium-webdriver')
const { By, until } = webdriver
const enLocaleMessages = require('../../app/_locales/en/messages.json')
const {
tinyDelayMs,
regularDelayMs,
@ -9,7 +10,6 @@ const {
} = require('./helpers')
const { buildWebDriver } = require('./webdriver')
const Ganache = require('./ganache')
const enLocaleMessages = require('../../app/_locales/en/messages.json')
const ganacheServer = new Ganache()

@ -2,6 +2,7 @@ const assert = require('assert')
const webdriver = require('selenium-webdriver')
const { By, until } = webdriver
const enLocaleMessages = require('../../app/_locales/en/messages.json')
const {
tinyDelayMs,
regularDelayMs,
@ -9,7 +10,6 @@ const {
} = require('./helpers')
const { buildWebDriver } = require('./webdriver')
const Ganache = require('./ganache')
const enLocaleMessages = require('../../app/_locales/en/messages.json')
const ganacheServer = new Ganache()

@ -2,6 +2,7 @@ const assert = require('assert')
const webdriver = require('selenium-webdriver')
const { By, Key, until } = webdriver
const enLocaleMessages = require('../../app/_locales/en/messages.json')
const {
tinyDelayMs,
regularDelayMs,
@ -9,7 +10,6 @@ const {
} = require('./helpers')
const { buildWebDriver } = require('./webdriver')
const Ganache = require('./ganache')
const enLocaleMessages = require('../../app/_locales/en/messages.json')
const ganacheServer = new Ganache()

@ -2,13 +2,13 @@ const assert = require('assert')
const webdriver = require('selenium-webdriver')
const { By, until } = webdriver
const enLocaleMessages = require('../../app/_locales/en/messages.json')
const {
regularDelayMs,
largeDelayMs,
} = require('./helpers')
const { buildWebDriver } = require('./webdriver')
const Ganache = require('./ganache')
const enLocaleMessages = require('../../app/_locales/en/messages.json')
const ganacheServer = new Ganache()

@ -2,6 +2,7 @@ const assert = require('assert')
const webdriver = require('selenium-webdriver')
const { By, until } = webdriver
const enLocaleMessages = require('../../app/_locales/en/messages.json')
const {
tinyDelayMs,
regularDelayMs,
@ -9,7 +10,6 @@ const {
} = require('./helpers')
const { buildWebDriver } = require('./webdriver')
const Ganache = require('./ganache')
const enLocaleMessages = require('../../app/_locales/en/messages.json')
const ganacheServer = new Ganache()

@ -3,6 +3,7 @@ const webdriver = require('selenium-webdriver')
const getPort = require('get-port')
const { By, until } = webdriver
const enLocaleMessages = require('../../app/_locales/en/messages.json')
const {
tinyDelayMs,
regularDelayMs,
@ -10,7 +11,6 @@ const {
} = require('./helpers')
const { buildWebDriver } = require('./webdriver')
const Ganache = require('./ganache')
const enLocaleMessages = require('../../app/_locales/en/messages.json')
const ganacheServer = new Ganache()

@ -1,6 +1,6 @@
const { promises: fs } = require('fs')
const { until, error: webdriverError } = require('selenium-webdriver')
const { strict: assert } = require('assert')
const { until, error: webdriverError } = require('selenium-webdriver')
class Driver {
/**

@ -1,8 +1,8 @@
const { Browser } = require('selenium-webdriver')
const fetchMockResponses = require('../../data/fetch-mocks.json')
const Driver = require('./driver')
const ChromeDriver = require('./chrome')
const FirefoxDriver = require('./firefox')
const fetchMockResponses = require('../../data/fetch-mocks.json')
async function buildWebDriver ({ responsive, port } = {}) {
const browser = process.env.SELENIUM_BROWSER

@ -1,6 +1,6 @@
import assert from 'assert'
import ComposableObservableStore from '../../../app/scripts/lib/ComposableObservableStore'
import ObservableStore from 'obs-store'
import ComposableObservableStore from '../../../app/scripts/lib/ComposableObservableStore'
describe('ComposableObservableStore', function () {
it('should register initial state', function () {

@ -4,10 +4,10 @@ import { cloneDeep } from 'lodash'
import nock from 'nock'
import ethUtil from 'ethereumjs-util'
import { obj as createThoughStream } from 'through2'
import firstTimeState from '../../localhostState'
import createTxMeta from '../../../lib/createTxMeta'
import EthQuery from 'eth-query'
import proxyquire from 'proxyquire'
import firstTimeState from '../../localhostState'
import createTxMeta from '../../../lib/createTxMeta'
const threeBoxSpies = {
init: sinon.stub(),

@ -1,8 +1,8 @@
import assert from 'assert'
import ObservableStore from 'obs-store'
import sinon from 'sinon'
import PreferencesController from '../../../../app/scripts/controllers/preferences'
import { addInternalMethodPrefix } from '../../../../app/scripts/controllers/permissions'
import sinon from 'sinon'
describe('preferences controller', function () {
let preferencesController

@ -1,7 +1,7 @@
import assert from 'assert'
import sinon from 'sinon'
import TokenRatesController from '../../../../app/scripts/controllers/token-rates'
import ObservableStore from 'obs-store'
import TokenRatesController from '../../../../app/scripts/controllers/token-rates'
describe('TokenRatesController', function () {
it('should listen for preferences store updates', function () {

@ -1,5 +1,5 @@
import sinon from 'sinon'
import { strict as assert } from 'assert'
import sinon from 'sinon'
import BN from 'bn.js'
import PendingTransactionTracker from '../../../../../app/scripts/controllers/transactions/pending-tx-tracker'

@ -1,5 +1,5 @@
import getAccountLink from '../../../ui/lib/account-link'
import assert from 'assert'
import getAccountLink from '../../../ui/lib/account-link'
describe('Account link', function () {
describe('getAccountLink', function () {

@ -1,5 +1,5 @@
import React from 'react'
import assert from 'assert'
import React from 'react'
import configureMockStore from 'redux-mock-store'
import thunk from 'redux-thunk'
import sinon from 'sinon'

@ -1,5 +1,5 @@
import React from 'react'
import assert from 'assert'
import React from 'react'
import { shallow } from 'enzyme'
import sinon from 'sinon'
import * as utils from '../../../../helpers/utils/util'

@ -1,10 +1,10 @@
import React from 'react'
import assert from 'assert'
import React from 'react'
import sinon from 'sinon'
import configureMockStore from 'redux-mock-store'
import { Provider } from 'react-redux'
import { mountWithRouter } from '../../../../../../test/lib/render-helpers'
import AccountMenu from '../index'
import { Provider } from 'react-redux'
describe('Account Menu', function () {

@ -1,7 +1,7 @@
import React from 'react'
import { useHistory } from 'react-router-dom'
import { useMetricEvent } from '../../../hooks/useMetricEvent'
import { useI18nContext } from '../../../hooks/useI18nContext'
import { useHistory } from 'react-router-dom'
import { ADD_TOKEN_ROUTE } from '../../../helpers/constants/routes'
import Button from '../../ui/button'

@ -1,8 +1,8 @@
import React from 'react'
import { useSelector } from 'react-redux'
import UnconnectedAccountAlert from './unconnected-account-alert'
import { alertIsOpen as unconnectedAccountAlertIsOpen } from '../../../ducks/alerts/unconnected-account'
import UnconnectedAccountAlert from './unconnected-account-alert'
const Alerts = () => {
const _unconnectedAccountAlertIsOpen = useSelector(unconnectedAccountAlertIsOpen)

@ -2,8 +2,8 @@ import { connect } from 'react-redux'
import { withRouter } from 'react-router-dom'
import { compose } from 'redux'
import AppHeader from './app-header.component'
import * as actions from '../../../store/actions'
import AppHeader from './app-header.component'
const mapStateToProps = (state) => {
const { appState, metamask } = state

@ -1,5 +1,5 @@
import React from 'react'
import assert from 'assert'
import React from 'react'
import sinon from 'sinon'
import { shallow } from 'enzyme'
import MetaFoxLogo from '../../../ui/metafox-logo'

@ -1,6 +1,8 @@
import React, { useMemo } from 'react'
import PropTypes from 'prop-types'
import classnames from 'classnames'
import { useDispatch } from 'react-redux'
import { useHistory } from 'react-router-dom'
import Identicon from '../../ui/identicon'
import ListItem from '../../ui/list-item'
import Tooltip from '../../ui/tooltip'
@ -8,9 +10,7 @@ import InfoIcon from '../../ui/icon/info-icon.component'
import Button from '../../ui/button'
import { useI18nContext } from '../../../hooks/useI18nContext'
import { useMetricEvent } from '../../../hooks/useMetricEvent'
import { useDispatch } from 'react-redux'
import { updateSendToken } from '../../../store/actions'
import { useHistory } from 'react-router-dom'
import { SEND_ROUTE } from '../../../helpers/constants/routes'

@ -1,8 +1,8 @@
import React from 'react'
import assert from 'assert'
import React from 'react'
import { shallow } from 'enzyme'
import ConfirmDetailRow from '../confirm-detail-row.component'
import sinon from 'sinon'
import ConfirmDetailRow from '../confirm-detail-row.component'
const propsMethodSpies = {
onHeaderClick: sinon.spy(),

@ -2,9 +2,9 @@ import React, { Component } from 'react'
import PropTypes from 'prop-types'
import classnames from 'classnames'
import { Tabs, Tab } from '../../../ui/tabs'
import { ConfirmPageContainerSummary, ConfirmPageContainerWarning } from '.'
import ErrorMessage from '../../../ui/error-message'
import { PageContainerFooter } from '../../../ui/page-container'
import { ConfirmPageContainerSummary, ConfirmPageContainerWarning } from '.'
export default class ConfirmPageContainerContent extends Component {

@ -1,8 +1,8 @@
import PropTypes from 'prop-types'
import React, { PureComponent } from 'react'
import { MenuItem } from '../../ui/menu'
import ConnectedAccountsListItem from './connected-accounts-list-item'
import ConnectedAccountsListOptions from './connected-accounts-list-options'
import { MenuItem } from '../../ui/menu'
export default class ConnectedAccountsList extends PureComponent {
static contextTypes = {

@ -1,6 +1,5 @@
import { findKey } from 'lodash'
import { connect } from 'react-redux'
import ConnectedStatusIndicator from './connected-status-indicator.component'
import {
STATUS_CONNECTED,
STATUS_CONNECTED_TO_ANOTHER_ACCOUNT,
@ -11,6 +10,7 @@ import {
getOriginOfCurrentTab,
getSelectedAddress,
} from '../../../selectors'
import ConnectedStatusIndicator from './connected-status-indicator.component'
const mapStateToProps = (state) => {

@ -1,7 +1,7 @@
import React from 'react'
import PropTypes from 'prop-types'
import Identicon from '../../../ui/identicon'
import classnames from 'classnames'
import Identicon from '../../../ui/identicon'
import { ellipsify } from '../../../../pages/send/send.utils'
function addressesEqual (address1, address2) {

@ -4,9 +4,9 @@ import { connect } from 'react-redux'
import { withRouter } from 'react-router-dom'
import { compose } from 'redux'
import * as actions from '../../../store/actions'
import { NETWORKS_ROUTE } from '../../../helpers/constants/routes'
import { Dropdown, DropdownMenuItem } from './components/dropdown'
import NetworkDropdownIcon from './components/network-dropdown-icon'
import { NETWORKS_ROUTE } from '../../../helpers/constants/routes'
// classes from nodes of the toggle element.
const notToggleElementClassnames = [

@ -1,5 +1,5 @@
import React from 'react'
import assert from 'assert'
import React from 'react'
import sinon from 'sinon'
import { shallow } from 'enzyme'
import { DropdownMenuItem } from '../components/dropdown'

@ -1,5 +1,5 @@
import React from 'react'
import assert from 'assert'
import React from 'react'
import { shallow } from 'enzyme'
import NetworkDropdownIcon from '../components/network-dropdown-icon'

@ -1,5 +1,5 @@
import React from 'react'
import assert from 'assert'
import React from 'react'
import configureMockStore from 'redux-mock-store'
import thunk from 'redux-thunk'
import { mountWithRouter } from '../../../../../../test/lib/render-helpers'

@ -1,5 +1,5 @@
import React from 'react'
import assert from 'assert'
import React from 'react'
import sinon from 'sinon'
import { mount } from 'enzyme'
import AdvancedTabContent from '../index'

@ -1,7 +1,7 @@
import React from 'react'
import assert from 'assert'
import shallow from '../../../../../../../lib/shallow-with-context'
import React from 'react'
import sinon from 'sinon'
import shallow from '../../../../../../../lib/shallow-with-context'
import AdvancedTabContent from '../advanced-tab-content.component'
import GasPriceChart from '../../../gas-price-chart'

@ -1,5 +1,5 @@
import React from 'react'
import assert from 'assert'
import React from 'react'
import shallow from '../../../../../../../lib/shallow-with-context'
import BasicTabContent from '../basic-tab-content.component'
import GasPriceButtonGroup from '../../../gas-price-button-group'

@ -1,6 +1,6 @@
import { connect } from 'react-redux'
import GasModalPageContainer from './gas-modal-page-container.component'
import { captureException } from '@sentry/browser'
import { addHexPrefix } from 'ethereumjs-util'
import {
hideModal,
setGasLimit,
@ -63,8 +63,8 @@ import {
calcGasTotal,
isBalanceSufficient,
} from '../../../../pages/send/send.utils'
import { addHexPrefix } from 'ethereumjs-util'
import { calcMaxAmount } from '../../../../pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils'
import GasModalPageContainer from './gas-modal-page-container.component'
const mapStateToProps = (state, ownProps) => {
const { currentNetworkTxList, send } = state.metamask

@ -1,7 +1,7 @@
import React from 'react'
import assert from 'assert'
import shallow from '../../../../../../lib/shallow-with-context'
import React from 'react'
import sinon from 'sinon'
import shallow from '../../../../../../lib/shallow-with-context'
import GasModalPageContainer from '../gas-modal-page-container.component'
import timeout from '../../../../../../lib/test-timeout'

@ -1,7 +1,7 @@
import React from 'react'
import assert from 'assert'
import shallow from '../../../../../../lib/shallow-with-context'
import React from 'react'
import sinon from 'sinon'
import shallow from '../../../../../../lib/shallow-with-context'
import GasPriceButtonGroup from '../gas-price-button-group.component'
import ButtonGroup from '../../../../ui/button-group'

@ -1,9 +1,9 @@
import React from 'react'
import assert from 'assert'
import React from 'react'
import proxyquire from 'proxyquire'
import sinon from 'sinon'
import shallow from '../../../../../../lib/shallow-with-context'
import * as d3 from 'd3'
import shallow from '../../../../../../lib/shallow-with-context'
function timeout (time) {
return new Promise((resolve) => {

@ -1,5 +1,5 @@
import React from 'react'
import assert from 'assert'
import React from 'react'
import sinon from 'sinon'
import { shallow } from 'enzyme'

@ -1,7 +1,7 @@
import { connect } from 'react-redux'
import LoadingNetworkScreen from './loading-network-screen.component'
import * as actions from '../../../store/actions'
import { getNetworkIdentifier } from '../../../selectors'
import LoadingNetworkScreen from './loading-network-screen.component'
const mapStateToProps = (state) => {
const {

@ -4,13 +4,13 @@ import { useHistory } from 'react-router-dom'
import { useSelector } from 'react-redux'
import SelectedAccount from '../selected-account'
import ConnectedStatusIndicator from '../connected-status-indicator'
import AccountOptionsMenu from './account-options-menu'
import { getEnvironmentType } from '../../../../../app/scripts/lib/util'
import { ENVIRONMENT_TYPE_POPUP } from '../../../../../app/scripts/lib/enums'
import { CONNECTED_ACCOUNTS_ROUTE } from '../../../helpers/constants/routes'
import { useI18nContext } from '../../../hooks/useI18nContext'
import { useMetricEvent } from '../../../hooks/useMetricEvent'
import { getOriginOfCurrentTab } from '../../../selectors'
import AccountOptionsMenu from './account-options-menu'
export default function MenuBar () {
const t = useI18nContext()

@ -1,5 +1,5 @@
import React from 'react'
import assert from 'assert'
import React from 'react'
import { Provider } from 'react-redux'
import configureStore from 'redux-mock-store'
import { mountWithRouter } from '../../../../../../test/lib/render-helpers'

@ -1,5 +1,5 @@
import React from 'react'
import assert from 'assert'
import React from 'react'
import { shallow } from 'enzyme'
import ModalContent from '../modal-content.component'

@ -1,7 +1,7 @@
import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import Button from '../../ui/button'
import classnames from 'classnames'
import Button from '../../ui/button'
export default class Modal extends PureComponent {
static propTypes = {

@ -1,5 +1,5 @@
import React from 'react'
import assert from 'assert'
import React from 'react'
import { mount, shallow } from 'enzyme'
import sinon from 'sinon'
import Modal from '../modal.component'

@ -1,7 +1,7 @@
import PropTypes from 'prop-types'
import React from 'react'
import Identicon from '../../../ui/identicon'
import classnames from 'classnames'
import Identicon from '../../../ui/identicon'
export default function AccountModalContainer (props, context) {
const {

@ -1,6 +1,6 @@
import { connect } from 'react-redux'
import AddToAddressBookModal from './add-to-addressbook-modal.component'
import * as actions from '../../../../store/actions'
import AddToAddressBookModal from './add-to-addressbook-modal.component'
function mapStateToProps (state) {
return {

@ -1,5 +1,5 @@
import React from 'react'
import assert from 'assert'
import React from 'react'
import { shallow } from 'enzyme'
import CancelTransactionGasFee from '../cancel-transaction-gas-fee.component'
import UserPreferencedCurrencyDisplay from '../../../../user-preferenced-currency-display'

@ -1,8 +1,8 @@
import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import Modal from '../../modal'
import CancelTransactionGasFee from './cancel-transaction-gas-fee'
import { SUBMITTED_STATUS } from '../../../../helpers/constants/transactions'
import CancelTransactionGasFee from './cancel-transaction-gas-fee'
export default class CancelTransaction extends PureComponent {
static contextTypes = {

@ -3,9 +3,9 @@ import { compose } from 'redux'
import ethUtil from 'ethereumjs-util'
import { multiplyCurrencies } from '../../../../helpers/utils/conversion-util'
import withModalProps from '../../../../helpers/higher-order-components/with-modal-props'
import CancelTransaction from './cancel-transaction.component'
import { showModal, createCancelTransaction } from '../../../../store/actions'
import { getHexGasTotal } from '../../../../helpers/utils/confirm-tx.util'
import CancelTransaction from './cancel-transaction.component'
const mapStateToProps = (state, ownProps) => {
const { metamask } = state

@ -1,5 +1,5 @@
import React from 'react'
import assert from 'assert'
import React from 'react'
import { shallow } from 'enzyme'
import sinon from 'sinon'
import CancelTransaction from '../cancel-transaction.component'

@ -1,8 +1,8 @@
import { connect } from 'react-redux'
import { compose } from 'redux'
import withModalProps from '../../../../helpers/higher-order-components/with-modal-props'
import ConfirmDeleteNetwork from './confirm-delete-network.component'
import { delRpcTarget } from '../../../../store/actions'
import ConfirmDeleteNetwork from './confirm-delete-network.component'
const mapDispatchToProps = (dispatch) => {
return {

@ -1,5 +1,5 @@
import React from 'react'
import assert from 'assert'
import React from 'react'
import sinon from 'sinon'
import { mount } from 'enzyme'
import ConfirmDeleteNetwork from '../index'

@ -1,8 +1,8 @@
import { connect } from 'react-redux'
import { compose } from 'redux'
import ConfirmRemoveAccount from './confirm-remove-account.component'
import withModalProps from '../../../../helpers/higher-order-components/with-modal-props'
import { removeAccount } from '../../../../store/actions'
import ConfirmRemoveAccount from './confirm-remove-account.component'
const mapStateToProps = (state) => {
return {

@ -1,7 +1,7 @@
import assert from 'assert'
import React from 'react'
import PropTypes from 'prop-types'
import { Provider } from 'react-redux'
import assert from 'assert'
import sinon from 'sinon'
import configureStore from 'redux-mock-store'
import { mount } from 'enzyme'

@ -1,8 +1,8 @@
import { connect } from 'react-redux'
import { compose } from 'redux'
import withModalProps from '../../../../helpers/higher-order-components/with-modal-props'
import ConfirmResetAccount from './confirm-reset-account.component'
import { resetAccount } from '../../../../store/actions'
import ConfirmResetAccount from './confirm-reset-account.component'
const mapDispatchToProps = (dispatch) => {
return {

@ -1,5 +1,5 @@
import React from 'react'
import assert from 'assert'
import React from 'react'
import sinon from 'sinon'
import { mount } from 'enzyme'
import ConfirmResetAccount from '../index'

@ -1,12 +1,12 @@
import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import log from 'loglevel'
import classnames from 'classnames'
import BigNumber from 'bignumber.js'
import Modal from '../../modal'
import Identicon from '../../../ui/identicon'
import TextField from '../../../ui/text-field'
import { calcTokenAmount } from '../../../../helpers/utils/token-util'
import classnames from 'classnames'
import BigNumber from 'bignumber.js'
const MAX_UNSIGNED_256_INT = new BigNumber(2).pow(256).minus(1).toString(10)

@ -1,8 +1,8 @@
import { connect } from 'react-redux'
import { compose } from 'redux'
import withModalProps from '../../../../helpers/higher-order-components/with-modal-props'
import EditApprovalPermission from './edit-approval-permission.component'
import { getSelectedIdentity } from '../../../../selectors'
import EditApprovalPermission from './edit-approval-permission.component'
const mapStateToProps = (state) => {
const modalStateProps = state.appState.modal.modalState.props || {}

@ -1,4 +1,4 @@
import LoadingNetworkError from './loading-network-error.component'
import withModalProps from '../../../../helpers/higher-order-components/with-modal-props'
import LoadingNetworkError from './loading-network-error.component'
export default withModalProps(LoadingNetworkError)

@ -1,8 +1,8 @@
import { connect } from 'react-redux'
import { compose } from 'redux'
import MetaMetricsOptInModal from './metametrics-opt-in-modal.component'
import withModalProps from '../../../../helpers/higher-order-components/with-modal-props'
import { setParticipateInMetaMetrics } from '../../../../store/actions'
import MetaMetricsOptInModal from './metametrics-opt-in-modal.component'
const mapStateToProps = (_, ownProps) => {
const { unapprovedTxCount } = ownProps

@ -1,5 +1,5 @@
import React from 'react'
import assert from 'assert'
import React from 'react'
import sinon from 'sinon'
import { mount } from 'enzyme'
import MetaMetricsOptIn from '../index'

@ -9,6 +9,7 @@ import { getEnvironmentType } from '../../../../../app/scripts/lib/util'
import { ENVIRONMENT_TYPE_POPUP } from '../../../../../app/scripts/lib/enums'
// Modal Components
import ConfirmCustomizeGasModal from '../gas-customization/gas-modal-page-container'
import DepositEtherModal from './deposit-ether-modal'
import AccountDetailsModal from './account-details-modal'
import ExportPrivateKeyModal from './export-private-key-modal'
@ -24,7 +25,6 @@ import CancelTransaction from './cancel-transaction'
import FadeModal from './fade-modal'
import MetaMetricsOptInModal from './metametrics-opt-in-modal'
import RejectTransactions from './reject-transactions'
import ConfirmCustomizeGasModal from '../gas-customization/gas-modal-page-container'
import ConfirmDeleteNetwork from './confirm-delete-network'
import AddToAddressBookModal from './add-to-addressbook-modal'
import EditApprovalPermission from './edit-approval-permission'

@ -1,6 +1,6 @@
import { connect } from 'react-redux'
import NewAccountModal from './new-account-modal.component'
import * as actions from '../../../../store/actions'
import NewAccountModal from './new-account-modal.component'
function mapStateToProps (state) {
return {

@ -1,7 +1,7 @@
import { connect } from 'react-redux'
import { hideModal, qrCodeDetected } from '../../../../store/actions'
import QrScanner from './qr-scanner.component'
import { hideModal, qrCodeDetected } from '../../../../store/actions'
const mapDispatchToProps = (dispatch) => {
return {

@ -1,7 +1,7 @@
import { connect } from 'react-redux'
import { compose } from 'redux'
import RejectTransactionsModal from './reject-transactions.component'
import withModalProps from '../../../../helpers/higher-order-components/with-modal-props'
import RejectTransactionsModal from './reject-transactions.component'
const mapStateToProps = (_, ownProps) => {
const { unapprovedTxCount } = ownProps

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save