diff --git a/.eslintrc.js b/.eslintrc.js index 8b9f27b12..fa67adaaf 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -108,7 +108,7 @@ module.exports = { }, { files: ['**/*.test.js'], - excludedFiles: ['ui/**/*.test.js', 'ui/app/__mocks__/*.js'], + excludedFiles: ['ui/**/*.test.js', 'ui/__mocks__/*.js'], extends: ['@metamask/eslint-config-mocha'], rules: { 'mocha/no-setup-in-describe': 'off', @@ -125,7 +125,7 @@ module.exports = { }, }, { - files: ['ui/**/*.test.js', 'ui/app/__mocks__/*.js'], + files: ['ui/**/*.test.js', 'ui/__mocks__/*.js'], extends: ['@metamask/eslint-config-jest'], rules: { 'jest/no-restricted-matchers': 'off', diff --git a/.gitignore b/.gitignore index 6333a39a1..21c882a97 100644 --- a/.gitignore +++ b/.gitignore @@ -39,7 +39,7 @@ test-builds build-artifacts #ignore css output and sourcemaps -ui/app/css/output/ +ui/css/output/ notes.txt diff --git a/.storybook/i18n.js b/.storybook/i18n.js index 9eadca331..314ea544e 100644 --- a/.storybook/i18n.js +++ b/.storybook/i18n.js @@ -1,12 +1,12 @@ import React, { Component, createContext, useMemo } from 'react'; import PropTypes from 'prop-types'; -import { getMessage } from '../ui/app/helpers/utils/i18n-helper'; -import { I18nContext } from '../ui/app/contexts/i18n'; +import { getMessage } from '../ui/helpers/utils/i18n-helper'; +import { I18nContext } from '../ui/contexts/i18n'; -export { I18nContext } +export { I18nContext }; export const I18nProvider = (props) => { - const { currentLocale, current, en } = props + const { currentLocale, current, en } = props; const t = useMemo(() => { return (key, ...args) => diff --git a/.storybook/main.js b/.storybook/main.js index 2e708e264..310bce17d 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -1,9 +1,9 @@ -const path = require('path') +const path = require('path'); -const CopyWebpackPlugin = require('copy-webpack-plugin') +const CopyWebpackPlugin = require('copy-webpack-plugin'); module.exports = { - stories: ['../ui/app/**/*.stories.js'], + stories: ['../ui/**/*.stories.js'], addons: [ '@storybook/addon-knobs', '@storybook/addon-actions', @@ -12,7 +12,7 @@ module.exports = { './i18n-party-addon/register.js', ], webpackFinal: async (config) => { - config.module.strictExportPresence = true + config.module.strictExportPresence = true; config.module.rules.push({ test: /\.scss$/, loaders: [ @@ -31,12 +31,12 @@ module.exports = { sourceMap: true, implementation: require('sass'), sassOptions: { - includePaths: ['ui/app/css/'], + includePaths: ['ui/css/'], }, }, }, ], - }) + }); config.plugins.push( new CopyWebpackPlugin({ patterns: [ @@ -51,7 +51,7 @@ module.exports = { }, ], }), - ) - return config + ); + return config; }, -} +}; diff --git a/.storybook/preview.js b/.storybook/preview.js index 112c8f16e..24d195c4e 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -3,12 +3,12 @@ import { addDecorator, addParameters } from '@storybook/react'; import { useGlobals } from '@storybook/api'; import { withKnobs } from '@storybook/addon-knobs'; import { Provider } from 'react-redux'; -import configureStore from '../ui/app/store/store'; -import '../ui/app/css/index.scss'; +import configureStore from '../ui/store/store'; +import '../ui/css/index.scss'; import localeList from '../app/_locales/index.json'; import * as allLocales from './locales'; import { I18nProvider, LegacyI18nProvider } from './i18n'; -import testData from './test-data.js' +import testData from './test-data.js'; addParameters({ backgrounds: { @@ -41,7 +41,7 @@ const styles = { alignItems: 'center', }; -const store = configureStore(testData) +const store = configureStore(testData); const metamaskDecorator = (story, context) => { const currentLocale = context.globals.locale; diff --git a/app/scripts/controllers/swaps.js b/app/scripts/controllers/swaps.js index 2496e9b0b..9e4247231 100644 --- a/app/scripts/controllers/swaps.js +++ b/app/scripts/controllers/swaps.js @@ -4,9 +4,9 @@ import BigNumber from 'bignumber.js'; import { ObservableStore } from '@metamask/obs-store'; import { mapValues, cloneDeep } from 'lodash'; import abi from 'human-standard-token-abi'; -import { calcTokenAmount } from '../../../ui/app/helpers/utils/token-util'; -import { calcGasTotal } from '../../../ui/app/pages/send/send.utils'; -import { conversionUtil } from '../../../ui/app/helpers/utils/conversion-util'; +import { calcTokenAmount } from '../../../ui/helpers/utils/token-util'; +import { calcGasTotal } from '../../../ui/pages/send/send.utils'; +import { conversionUtil } from '../../../ui/helpers/utils/conversion-util'; import { DEFAULT_ERC20_APPROVE_GAS, QUOTES_EXPIRED_ERROR, @@ -20,7 +20,7 @@ import { fetchTradesInfo as defaultFetchTradesInfo, fetchSwapsFeatureLiveness as defaultFetchSwapsFeatureLiveness, fetchSwapsQuoteRefreshTime as defaultFetchSwapsQuoteRefreshTime, -} from '../../../ui/app/pages/swaps/swaps.util'; +} from '../../../ui/pages/swaps/swaps.util'; import { NETWORK_EVENTS } from './network'; // The MAX_GAS_LIMIT is a number that is higher than the maximum gas costs we have observed on any aggregator diff --git a/app/scripts/controllers/transactions/index.js b/app/scripts/controllers/transactions/index.js index 3067b3e4f..9b7011a66 100644 --- a/app/scripts/controllers/transactions/index.js +++ b/app/scripts/controllers/transactions/index.js @@ -16,8 +16,8 @@ import { BnMultiplyByFraction, addHexPrefix, } from '../../lib/util'; -import { TRANSACTION_NO_CONTRACT_ERROR_KEY } from '../../../../ui/app/helpers/constants/error-keys'; -import { getSwapsTokensReceivedFromTxMeta } from '../../../../ui/app/pages/swaps/swaps.util'; +import { TRANSACTION_NO_CONTRACT_ERROR_KEY } from '../../../../ui/helpers/constants/error-keys'; +import { getSwapsTokensReceivedFromTxMeta } from '../../../../ui/pages/swaps/swaps.util'; import { TRANSACTION_STATUSES, TRANSACTION_TYPES, diff --git a/development/build/static.js b/development/build/static.js index 0adba6745..9ae309e53 100644 --- a/development/build/static.js +++ b/development/build/static.js @@ -35,7 +35,7 @@ const copyTargets = [ dest: `fonts/fontawesome`, }, { - src: `./ui/app/css/output/`, + src: `./ui/css/output/`, pattern: `*.css`, dest: ``, }, diff --git a/development/build/styles.js b/development/build/styles.js index 108561261..ecda4b661 100644 --- a/development/build/styles.js +++ b/development/build/styles.js @@ -18,8 +18,8 @@ function createStyleTasks({ livereload }) { const prod = createTask( 'styles:prod', createScssBuildTask({ - src: 'ui/app/css/index.scss', - dest: 'ui/app/css/output', + src: 'ui/css/index.scss', + dest: 'ui/css/output', devMode: false, }), ); @@ -27,15 +27,15 @@ function createStyleTasks({ livereload }) { const dev = createTask( 'styles:dev', createScssBuildTask({ - src: 'ui/app/css/index.scss', - dest: 'ui/app/css/output', + src: 'ui/css/index.scss', + dest: 'ui/css/output', devMode: true, - pattern: 'ui/app/**/*.scss', + pattern: 'ui/**/*.scss', }), ); const lint = createTask('lint-scss', function () { - return gulp.src('ui/app/css/itcss/**/*.scss').pipe( + return gulp.src('ui/css/itcss/**/*.scss').pipe( gulpStylelint({ reporters: [{ formatter: 'string', console: true }], fix: true, diff --git a/development/verify-locale-strings.js b/development/verify-locale-strings.js index 2e7b7584b..a37a7936e 100644 --- a/development/verify-locale-strings.js +++ b/development/verify-locale-strings.js @@ -171,8 +171,8 @@ async function verifyEnglishLocale() { // In the meantime we'll use glob to specify which paths can be strict searched // and gradually phase out the key based search const globsToStrictSearch = [ - 'ui/app/components/app/metamask-translation/*.js', - 'ui/app/pages/confirmation/templates/*.js', + 'ui/components/app/metamask-translation/*.js', + 'ui/pages/confirmation/templates/*.js', ]; const testGlob = '**/*.test.js'; const javascriptFiles = await glob(['ui/**/*.js', 'shared/**/*.js'], { diff --git a/jest.config.js b/jest.config.js index df0558fcf..e186bc814 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,7 +1,7 @@ module.exports = { restoreMocks: true, coverageDirectory: 'jest-coverage/', - collectCoverageFrom: ['/ui/app/**/swaps/**'], + collectCoverageFrom: ['/ui/**/swaps/**'], coveragePathIgnorePatterns: ['.stories.js', '.snap'], coverageThreshold: { global: { diff --git a/package.json b/package.json index f6e3c4dc6..9ca5d612f 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "verify-locales": "node ./development/verify-locale-strings.js", "verify-locales:fix": "node ./development/verify-locale-strings.js --fix", "mozilla-lint": "addons-linter dist/firefox", - "watch": "mocha --watch --require test/env.js --require test/setup.js --reporter min --recursive \"test/unit/**/*.js\" \"ui/app/**/*.test.js\" \"shared/**/*.test.js\"", + "watch": "mocha --watch --require test/env.js --require test/setup.js --reporter min --recursive \"test/unit/**/*.js\" \"ui/**/*.test.js\" \"shared/**/*.test.js\"", "devtools:react": "react-devtools", "devtools:redux": "remotedev --hostname=localhost --port=8000", "start:dev": "concurrently -k -n build,react,redux yarn:start yarn:devtools:react yarn:devtools:redux", diff --git a/test/jest/background.js b/test/jest/background.js index 49a6bdf8f..99d181308 100644 --- a/test/jest/background.js +++ b/test/jest/background.js @@ -1,4 +1,4 @@ -import * as actions from '../../ui/app/store/actions'; +import * as actions from '../../ui/store/actions'; export const setBackgroundConnection = (backgroundConnection = {}) => { actions._setBackgroundConnection(backgroundConnection); diff --git a/test/jest/rendering.js b/test/jest/rendering.js index d215cbc0d..f84ecfe0b 100644 --- a/test/jest/rendering.js +++ b/test/jest/rendering.js @@ -4,8 +4,8 @@ import { render } from '@testing-library/react'; import { MemoryRouter } from 'react-router-dom'; import PropTypes from 'prop-types'; -import { I18nContext, LegacyI18nProvider } from '../../ui/app/contexts/i18n'; -import { getMessage } from '../../ui/app/helpers/utils/i18n-helper'; +import { I18nContext, LegacyI18nProvider } from '../../ui/contexts/i18n'; +import { getMessage } from '../../ui/helpers/utils/i18n-helper'; import * as en from '../../app/_locales/en/messages.json'; export const I18nProvider = (props) => { diff --git a/test/lib/render-helpers.js b/test/lib/render-helpers.js index fc4621015..37c5d6370 100644 --- a/test/lib/render-helpers.js +++ b/test/lib/render-helpers.js @@ -1,13 +1,19 @@ import React, { useMemo } from 'react'; import { Provider } from 'react-redux'; import { render } from '@testing-library/react'; -import { mount } from 'enzyme'; +import { mount, shallow } from 'enzyme'; import { MemoryRouter } from 'react-router-dom'; import PropTypes from 'prop-types'; -import { I18nContext, LegacyI18nProvider } from '../../ui/app/contexts/i18n'; -import { getMessage } from '../../ui/app/helpers/utils/i18n-helper'; +import { I18nContext, LegacyI18nProvider } from '../../ui/contexts/i18n'; +import { getMessage } from '../../ui/helpers/utils/i18n-helper'; import * as en from '../../app/_locales/en/messages.json'; +export function shallowWithContext(jsxComponent) { + return shallow(jsxComponent, { + context: { t: (str1, str2) => (str2 ? str1 + str2 : str1) }, + }); +} + export function mountWithRouter(component, store = {}, pathname = '/') { // Instantiate router context const router = { diff --git a/test/unit-global/balance-formatter.test.js b/test/unit-global/balance-formatter.test.js index cd63ee68f..d96668e3b 100644 --- a/test/unit-global/balance-formatter.test.js +++ b/test/unit-global/balance-formatter.test.js @@ -1,6 +1,6 @@ import assert from 'assert'; import currencyFormatter from 'currency-formatter'; -import availableCurrencies from '../../ui/app/helpers/constants/available-conversions.json'; +import availableCurrencies from '../../ui/helpers/constants/available-conversions.json'; describe('currencyFormatting', function () { it('be able to format any infura currency', function (done) { diff --git a/ui/app/__mocks__/react-router-dom.js b/ui/__mocks__/react-router-dom.js similarity index 100% rename from ui/app/__mocks__/react-router-dom.js rename to ui/__mocks__/react-router-dom.js diff --git a/ui/app/components/app/signature-request/signature-request.constants.js b/ui/app/components/app/signature-request/signature-request.constants.js deleted file mode 100644 index 34ac7b40d..000000000 --- a/ui/app/components/app/signature-request/signature-request.constants.js +++ /dev/null @@ -1,3 +0,0 @@ -import { ENVIRONMENT_TYPE_NOTIFICATION } from '../../../../../shared/constants/app'; - -export { ENVIRONMENT_TYPE_NOTIFICATION }; diff --git a/ui/app/components/app/account-list-item/account-list-item-component.test.js b/ui/components/app/account-list-item/account-list-item-component.test.js similarity index 96% rename from ui/app/components/app/account-list-item/account-list-item-component.test.js rename to ui/components/app/account-list-item/account-list-item-component.test.js index 03c038cf4..d8a05ce46 100644 --- a/ui/app/components/app/account-list-item/account-list-item-component.test.js +++ b/ui/components/app/account-list-item/account-list-item-component.test.js @@ -2,10 +2,10 @@ import React from 'react'; import { shallow } from 'enzyme'; import sinon from 'sinon'; import Identicon from '../../ui/identicon'; -import { toChecksumHexAddress } from '../../../../../shared/modules/hexstring-utils'; +import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils'; import AccountListItem from './account-list-item'; -jest.mock('../../../../../shared/modules/hexstring-utils', () => ({ +jest.mock('../../../../shared/modules/hexstring-utils', () => ({ toChecksumHexAddress: jest.fn(() => 'mockCheckSumAddress'), })); diff --git a/ui/app/components/app/account-list-item/account-list-item.js b/ui/components/app/account-list-item/account-list-item.js similarity index 93% rename from ui/app/components/app/account-list-item/account-list-item.js rename to ui/components/app/account-list-item/account-list-item.js index fd1b80bc4..5220dede9 100644 --- a/ui/app/components/app/account-list-item/account-list-item.js +++ b/ui/components/app/account-list-item/account-list-item.js @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import Identicon from '../../ui/identicon'; import AccountMismatchWarning from '../../ui/account-mismatch-warning/account-mismatch-warning.component'; -import { toChecksumHexAddress } from '../../../../../shared/modules/hexstring-utils'; +import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils'; export default function AccountListItem({ account, diff --git a/ui/app/components/app/account-list-item/index.js b/ui/components/app/account-list-item/index.js similarity index 100% rename from ui/app/components/app/account-list-item/index.js rename to ui/components/app/account-list-item/index.js diff --git a/ui/app/components/app/account-list-item/index.scss b/ui/components/app/account-list-item/index.scss similarity index 100% rename from ui/app/components/app/account-list-item/index.scss rename to ui/components/app/account-list-item/index.scss diff --git a/ui/app/components/app/account-menu/account-menu.component.js b/ui/components/app/account-menu/account-menu.component.js similarity index 98% rename from ui/app/components/app/account-menu/account-menu.component.js rename to ui/components/app/account-menu/account-menu.component.js index fe3ebffe6..a7f083041 100644 --- a/ui/app/components/app/account-menu/account-menu.component.js +++ b/ui/components/app/account-menu/account-menu.component.js @@ -4,8 +4,8 @@ import { debounce } from 'lodash'; import Fuse from 'fuse.js'; import InputAdornment from '@material-ui/core/InputAdornment'; import classnames from 'classnames'; -import { ENVIRONMENT_TYPE_POPUP } from '../../../../../shared/constants/app'; -import { getEnvironmentType } from '../../../../../app/scripts/lib/util'; +import { ENVIRONMENT_TYPE_POPUP } from '../../../../shared/constants/app'; +import { getEnvironmentType } from '../../../../app/scripts/lib/util'; import Identicon from '../../ui/identicon'; import SiteIcon from '../../ui/site-icon'; import UserPreferencedCurrencyDisplay from '../user-preferenced-currency-display'; diff --git a/ui/app/components/app/account-menu/account-menu.container.js b/ui/components/app/account-menu/account-menu.container.js similarity index 100% rename from ui/app/components/app/account-menu/account-menu.container.js rename to ui/components/app/account-menu/account-menu.container.js diff --git a/ui/app/components/app/account-menu/account-menu.test.js b/ui/components/app/account-menu/account-menu.test.js similarity index 98% rename from ui/app/components/app/account-menu/account-menu.test.js rename to ui/components/app/account-menu/account-menu.test.js index 44666899d..fc715ead1 100644 --- a/ui/app/components/app/account-menu/account-menu.test.js +++ b/ui/components/app/account-menu/account-menu.test.js @@ -2,7 +2,7 @@ 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 { mountWithRouter } from '../../../../test/lib/render-helpers'; import AccountMenu from '.'; describe('Account Menu', () => { diff --git a/ui/app/components/app/account-menu/index.js b/ui/components/app/account-menu/index.js similarity index 100% rename from ui/app/components/app/account-menu/index.js rename to ui/components/app/account-menu/index.js diff --git a/ui/app/components/app/account-menu/index.scss b/ui/components/app/account-menu/index.scss similarity index 100% rename from ui/app/components/app/account-menu/index.scss rename to ui/components/app/account-menu/index.scss diff --git a/ui/app/components/app/add-token-button/add-token-button.component.js b/ui/components/app/add-token-button/add-token-button.component.js similarity index 100% rename from ui/app/components/app/add-token-button/add-token-button.component.js rename to ui/components/app/add-token-button/add-token-button.component.js diff --git a/ui/app/components/app/add-token-button/index.js b/ui/components/app/add-token-button/index.js similarity index 100% rename from ui/app/components/app/add-token-button/index.js rename to ui/components/app/add-token-button/index.js diff --git a/ui/app/components/app/add-token-button/index.scss b/ui/components/app/add-token-button/index.scss similarity index 100% rename from ui/app/components/app/add-token-button/index.scss rename to ui/components/app/add-token-button/index.scss diff --git a/ui/app/components/app/alerts/alerts.js b/ui/components/app/alerts/alerts.js similarity index 100% rename from ui/app/components/app/alerts/alerts.js rename to ui/components/app/alerts/alerts.js diff --git a/ui/app/components/app/alerts/alerts.scss b/ui/components/app/alerts/alerts.scss similarity index 100% rename from ui/app/components/app/alerts/alerts.scss rename to ui/components/app/alerts/alerts.scss diff --git a/ui/app/components/app/alerts/index.js b/ui/components/app/alerts/index.js similarity index 100% rename from ui/app/components/app/alerts/index.js rename to ui/components/app/alerts/index.js diff --git a/ui/app/components/app/alerts/invalid-custom-network-alert/index.js b/ui/components/app/alerts/invalid-custom-network-alert/index.js similarity index 100% rename from ui/app/components/app/alerts/invalid-custom-network-alert/index.js rename to ui/components/app/alerts/invalid-custom-network-alert/index.js diff --git a/ui/app/components/app/alerts/invalid-custom-network-alert/invalid-custom-network-alert.js b/ui/components/app/alerts/invalid-custom-network-alert/invalid-custom-network-alert.js similarity index 100% rename from ui/app/components/app/alerts/invalid-custom-network-alert/invalid-custom-network-alert.js rename to ui/components/app/alerts/invalid-custom-network-alert/invalid-custom-network-alert.js diff --git a/ui/app/components/app/alerts/invalid-custom-network-alert/invalid-custom-network-alert.scss b/ui/components/app/alerts/invalid-custom-network-alert/invalid-custom-network-alert.scss similarity index 100% rename from ui/app/components/app/alerts/invalid-custom-network-alert/invalid-custom-network-alert.scss rename to ui/components/app/alerts/invalid-custom-network-alert/invalid-custom-network-alert.scss diff --git a/ui/app/components/app/alerts/unconnected-account-alert/index.js b/ui/components/app/alerts/unconnected-account-alert/index.js similarity index 100% rename from ui/app/components/app/alerts/unconnected-account-alert/index.js rename to ui/components/app/alerts/unconnected-account-alert/index.js diff --git a/ui/app/components/app/alerts/unconnected-account-alert/unconnected-account-alert.js b/ui/components/app/alerts/unconnected-account-alert/unconnected-account-alert.js similarity index 100% rename from ui/app/components/app/alerts/unconnected-account-alert/unconnected-account-alert.js rename to ui/components/app/alerts/unconnected-account-alert/unconnected-account-alert.js diff --git a/ui/app/components/app/alerts/unconnected-account-alert/unconnected-account-alert.scss b/ui/components/app/alerts/unconnected-account-alert/unconnected-account-alert.scss similarity index 100% rename from ui/app/components/app/alerts/unconnected-account-alert/unconnected-account-alert.scss rename to ui/components/app/alerts/unconnected-account-alert/unconnected-account-alert.scss diff --git a/ui/app/components/app/alerts/unconnected-account-alert/unconnected-account-alert.test.js b/ui/components/app/alerts/unconnected-account-alert/unconnected-account-alert.test.js similarity index 95% rename from ui/app/components/app/alerts/unconnected-account-alert/unconnected-account-alert.test.js rename to ui/components/app/alerts/unconnected-account-alert/unconnected-account-alert.test.js index dda361f4a..3aad2342b 100644 --- a/ui/app/components/app/alerts/unconnected-account-alert/unconnected-account-alert.test.js +++ b/ui/components/app/alerts/unconnected-account-alert/unconnected-account-alert.test.js @@ -6,11 +6,11 @@ import thunk from 'redux-thunk'; import { fireEvent } from '@testing-library/react'; import configureMockStore from 'redux-mock-store'; -import { tick } from '../../../../../../test/lib/tick'; -import { renderWithProvider } from '../../../../../../test/lib/render-helpers'; +import { tick } from '../../../../../test/lib/tick'; +import { renderWithProvider } from '../../../../../test/lib/render-helpers'; import * as actions from '../../../../store/actions'; -import { KOVAN_CHAIN_ID } from '../../../../../../shared/constants/network'; +import { KOVAN_CHAIN_ID } from '../../../../../shared/constants/network'; import UnconnectedAccountAlert from '.'; describe('Unconnected Account Alert', () => { diff --git a/ui/app/components/app/app-components.scss b/ui/components/app/app-components.scss similarity index 100% rename from ui/app/components/app/app-components.scss rename to ui/components/app/app-components.scss diff --git a/ui/app/components/app/app-header/app-header.component.js b/ui/components/app/app-header/app-header.component.js similarity index 100% rename from ui/app/components/app/app-header/app-header.component.js rename to ui/components/app/app-header/app-header.component.js diff --git a/ui/app/components/app/app-header/app-header.container.js b/ui/components/app/app-header/app-header.container.js similarity index 100% rename from ui/app/components/app/app-header/app-header.container.js rename to ui/components/app/app-header/app-header.container.js diff --git a/ui/app/components/app/app-header/app-header.test.js b/ui/components/app/app-header/app-header.test.js similarity index 100% rename from ui/app/components/app/app-header/app-header.test.js rename to ui/components/app/app-header/app-header.test.js diff --git a/ui/app/components/app/app-header/index.js b/ui/components/app/app-header/index.js similarity index 100% rename from ui/app/components/app/app-header/index.js rename to ui/components/app/app-header/index.js diff --git a/ui/app/components/app/app-header/index.scss b/ui/components/app/app-header/index.scss similarity index 100% rename from ui/app/components/app/app-header/index.scss rename to ui/components/app/app-header/index.scss diff --git a/ui/app/components/app/asset-list-item/asset-list-item.js b/ui/components/app/asset-list-item/asset-list-item.js similarity index 100% rename from ui/app/components/app/asset-list-item/asset-list-item.js rename to ui/components/app/asset-list-item/asset-list-item.js diff --git a/ui/app/components/app/asset-list-item/asset-list-item.scss b/ui/components/app/asset-list-item/asset-list-item.scss similarity index 100% rename from ui/app/components/app/asset-list-item/asset-list-item.scss rename to ui/components/app/asset-list-item/asset-list-item.scss diff --git a/ui/app/components/app/asset-list-item/index.js b/ui/components/app/asset-list-item/index.js similarity index 100% rename from ui/app/components/app/asset-list-item/index.js rename to ui/components/app/asset-list-item/index.js diff --git a/ui/app/components/app/asset-list/asset-list.js b/ui/components/app/asset-list/asset-list.js similarity index 100% rename from ui/app/components/app/asset-list/asset-list.js rename to ui/components/app/asset-list/asset-list.js diff --git a/ui/app/components/app/asset-list/index.js b/ui/components/app/asset-list/index.js similarity index 100% rename from ui/app/components/app/asset-list/index.js rename to ui/components/app/asset-list/index.js diff --git a/ui/app/components/app/confirm-page-container/confirm-detail-row/confirm-detail-row.component.js b/ui/components/app/confirm-page-container/confirm-detail-row/confirm-detail-row.component.js similarity index 100% rename from ui/app/components/app/confirm-page-container/confirm-detail-row/confirm-detail-row.component.js rename to ui/components/app/confirm-page-container/confirm-detail-row/confirm-detail-row.component.js diff --git a/ui/app/components/app/confirm-page-container/confirm-detail-row/confirm-detail-row.component.test.js b/ui/components/app/confirm-page-container/confirm-detail-row/confirm-detail-row.component.test.js similarity index 100% rename from ui/app/components/app/confirm-page-container/confirm-detail-row/confirm-detail-row.component.test.js rename to ui/components/app/confirm-page-container/confirm-detail-row/confirm-detail-row.component.test.js diff --git a/ui/app/components/app/confirm-page-container/confirm-detail-row/index.js b/ui/components/app/confirm-page-container/confirm-detail-row/index.js similarity index 100% rename from ui/app/components/app/confirm-page-container/confirm-detail-row/index.js rename to ui/components/app/confirm-page-container/confirm-detail-row/index.js diff --git a/ui/app/components/app/confirm-page-container/confirm-detail-row/index.scss b/ui/components/app/confirm-page-container/confirm-detail-row/index.scss similarity index 100% rename from ui/app/components/app/confirm-page-container/confirm-detail-row/index.scss rename to ui/components/app/confirm-page-container/confirm-detail-row/index.scss diff --git a/ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js b/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js similarity index 100% rename from ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js rename to ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js diff --git a/ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/confirm-page-container-summary.component.js b/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/confirm-page-container-summary.component.js similarity index 100% rename from ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/confirm-page-container-summary.component.js rename to ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/confirm-page-container-summary.component.js diff --git a/ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/index.js b/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/index.js similarity index 100% rename from ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/index.js rename to ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/index.js diff --git a/ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/index.scss b/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/index.scss similarity index 100% rename from ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/index.scss rename to ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/index.scss diff --git a/ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/confirm-page-container-warning.component.js b/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/confirm-page-container-warning.component.js similarity index 100% rename from ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/confirm-page-container-warning.component.js rename to ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/confirm-page-container-warning.component.js diff --git a/ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.js b/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.js similarity index 100% rename from ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.js rename to ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.js diff --git a/ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.scss b/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.scss similarity index 100% rename from ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.scss rename to ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.scss diff --git a/ui/app/components/app/confirm-page-container/confirm-page-container-content/index.js b/ui/components/app/confirm-page-container/confirm-page-container-content/index.js similarity index 100% rename from ui/app/components/app/confirm-page-container/confirm-page-container-content/index.js rename to ui/components/app/confirm-page-container/confirm-page-container-content/index.js diff --git a/ui/app/components/app/confirm-page-container/confirm-page-container-content/index.scss b/ui/components/app/confirm-page-container/confirm-page-container-content/index.scss similarity index 100% rename from ui/app/components/app/confirm-page-container/confirm-page-container-content/index.scss rename to ui/components/app/confirm-page-container/confirm-page-container-content/index.scss diff --git a/ui/app/components/app/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.js b/ui/components/app/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.js similarity index 94% rename from ui/app/components/app/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.js rename to ui/components/app/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.js index 2054f7daa..05d40a8b1 100644 --- a/ui/app/components/app/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.js +++ b/ui/components/app/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.js @@ -3,8 +3,8 @@ import PropTypes from 'prop-types'; import { ENVIRONMENT_TYPE_POPUP, ENVIRONMENT_TYPE_NOTIFICATION, -} from '../../../../../../shared/constants/app'; -import { getEnvironmentType } from '../../../../../../app/scripts/lib/util'; +} from '../../../../../shared/constants/app'; +import { getEnvironmentType } from '../../../../../app/scripts/lib/util'; import NetworkDisplay from '../../network-display'; import Identicon from '../../../ui/identicon'; import { shortenAddress } from '../../../../helpers/utils/util'; diff --git a/ui/app/components/app/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.test.js b/ui/components/app/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.test.js similarity index 93% rename from ui/app/components/app/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.test.js rename to ui/components/app/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.test.js index b94d3d15d..864979f8d 100644 --- a/ui/app/components/app/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.test.js +++ b/ui/components/app/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.test.js @@ -3,10 +3,10 @@ import { shallow } from 'enzyme'; import sinon from 'sinon'; import { Provider } from 'react-redux'; import configureStore from '../../../../store/store'; -import testData from '../../../../../../.storybook/test-data'; +import testData from '../../../../../.storybook/test-data'; import ConfirmPageContainerHeader from './confirm-page-container-header.component'; -const util = require('../../../../../../app/scripts/lib/util'); +const util = require('../../../../../app/scripts/lib/util'); describe('Confirm Detail Row Component', () => { describe('render', () => { diff --git a/ui/app/components/app/confirm-page-container/confirm-page-container-header/index.js b/ui/components/app/confirm-page-container/confirm-page-container-header/index.js similarity index 100% rename from ui/app/components/app/confirm-page-container/confirm-page-container-header/index.js rename to ui/components/app/confirm-page-container/confirm-page-container-header/index.js diff --git a/ui/app/components/app/confirm-page-container/confirm-page-container-header/index.scss b/ui/components/app/confirm-page-container/confirm-page-container-header/index.scss similarity index 100% rename from ui/app/components/app/confirm-page-container/confirm-page-container-header/index.scss rename to ui/components/app/confirm-page-container/confirm-page-container-header/index.scss diff --git a/ui/app/components/app/confirm-page-container/confirm-page-container-navigation/confirm-page-container-navigation.component.js b/ui/components/app/confirm-page-container/confirm-page-container-navigation/confirm-page-container-navigation.component.js similarity index 100% rename from ui/app/components/app/confirm-page-container/confirm-page-container-navigation/confirm-page-container-navigation.component.js rename to ui/components/app/confirm-page-container/confirm-page-container-navigation/confirm-page-container-navigation.component.js diff --git a/ui/app/components/app/confirm-page-container/confirm-page-container-navigation/index.js b/ui/components/app/confirm-page-container/confirm-page-container-navigation/index.js similarity index 100% rename from ui/app/components/app/confirm-page-container/confirm-page-container-navigation/index.js rename to ui/components/app/confirm-page-container/confirm-page-container-navigation/index.js diff --git a/ui/app/components/app/confirm-page-container/confirm-page-container-navigation/index.scss b/ui/components/app/confirm-page-container/confirm-page-container-navigation/index.scss similarity index 100% rename from ui/app/components/app/confirm-page-container/confirm-page-container-navigation/index.scss rename to ui/components/app/confirm-page-container/confirm-page-container-navigation/index.scss diff --git a/ui/app/components/app/confirm-page-container/confirm-page-container.component.js b/ui/components/app/confirm-page-container/confirm-page-container.component.js similarity index 100% rename from ui/app/components/app/confirm-page-container/confirm-page-container.component.js rename to ui/components/app/confirm-page-container/confirm-page-container.component.js diff --git a/ui/app/components/app/confirm-page-container/index.js b/ui/components/app/confirm-page-container/index.js similarity index 100% rename from ui/app/components/app/confirm-page-container/index.js rename to ui/components/app/confirm-page-container/index.js diff --git a/ui/app/components/app/confirm-page-container/index.scss b/ui/components/app/confirm-page-container/index.scss similarity index 100% rename from ui/app/components/app/confirm-page-container/index.scss rename to ui/components/app/confirm-page-container/index.scss diff --git a/ui/app/components/app/connected-accounts-list/connected-accounts-list-item/connected-accounts-list-item.component.js b/ui/components/app/connected-accounts-list/connected-accounts-list-item/connected-accounts-list-item.component.js similarity index 100% rename from ui/app/components/app/connected-accounts-list/connected-accounts-list-item/connected-accounts-list-item.component.js rename to ui/components/app/connected-accounts-list/connected-accounts-list-item/connected-accounts-list-item.component.js diff --git a/ui/app/components/app/connected-accounts-list/connected-accounts-list-item/index.js b/ui/components/app/connected-accounts-list/connected-accounts-list-item/index.js similarity index 100% rename from ui/app/components/app/connected-accounts-list/connected-accounts-list-item/index.js rename to ui/components/app/connected-accounts-list/connected-accounts-list-item/index.js diff --git a/ui/app/components/app/connected-accounts-list/connected-accounts-list-options/connected-accounts-list-options.component.js b/ui/components/app/connected-accounts-list/connected-accounts-list-options/connected-accounts-list-options.component.js similarity index 100% rename from ui/app/components/app/connected-accounts-list/connected-accounts-list-options/connected-accounts-list-options.component.js rename to ui/components/app/connected-accounts-list/connected-accounts-list-options/connected-accounts-list-options.component.js diff --git a/ui/app/components/app/connected-accounts-list/connected-accounts-list-options/index.js b/ui/components/app/connected-accounts-list/connected-accounts-list-options/index.js similarity index 100% rename from ui/app/components/app/connected-accounts-list/connected-accounts-list-options/index.js rename to ui/components/app/connected-accounts-list/connected-accounts-list-options/index.js diff --git a/ui/app/components/app/connected-accounts-list/connected-accounts-list.component.js b/ui/components/app/connected-accounts-list/connected-accounts-list.component.js similarity index 100% rename from ui/app/components/app/connected-accounts-list/connected-accounts-list.component.js rename to ui/components/app/connected-accounts-list/connected-accounts-list.component.js diff --git a/ui/app/components/app/connected-accounts-list/index.js b/ui/components/app/connected-accounts-list/index.js similarity index 100% rename from ui/app/components/app/connected-accounts-list/index.js rename to ui/components/app/connected-accounts-list/index.js diff --git a/ui/app/components/app/connected-accounts-list/index.scss b/ui/components/app/connected-accounts-list/index.scss similarity index 100% rename from ui/app/components/app/connected-accounts-list/index.scss rename to ui/components/app/connected-accounts-list/index.scss diff --git a/ui/app/components/app/connected-accounts-permissions/connected-accounts-permissions.component.js b/ui/components/app/connected-accounts-permissions/connected-accounts-permissions.component.js similarity index 100% rename from ui/app/components/app/connected-accounts-permissions/connected-accounts-permissions.component.js rename to ui/components/app/connected-accounts-permissions/connected-accounts-permissions.component.js diff --git a/ui/app/components/app/connected-accounts-permissions/index.js b/ui/components/app/connected-accounts-permissions/index.js similarity index 100% rename from ui/app/components/app/connected-accounts-permissions/index.js rename to ui/components/app/connected-accounts-permissions/index.js diff --git a/ui/app/components/app/connected-accounts-permissions/index.scss b/ui/components/app/connected-accounts-permissions/index.scss similarity index 100% rename from ui/app/components/app/connected-accounts-permissions/index.scss rename to ui/components/app/connected-accounts-permissions/index.scss diff --git a/ui/app/components/app/connected-sites-list/connected-sites-list.component.js b/ui/components/app/connected-sites-list/connected-sites-list.component.js similarity index 100% rename from ui/app/components/app/connected-sites-list/connected-sites-list.component.js rename to ui/components/app/connected-sites-list/connected-sites-list.component.js diff --git a/ui/app/components/app/connected-sites-list/index.js b/ui/components/app/connected-sites-list/index.js similarity index 100% rename from ui/app/components/app/connected-sites-list/index.js rename to ui/components/app/connected-sites-list/index.js diff --git a/ui/app/components/app/connected-sites-list/index.scss b/ui/components/app/connected-sites-list/index.scss similarity index 100% rename from ui/app/components/app/connected-sites-list/index.scss rename to ui/components/app/connected-sites-list/index.scss diff --git a/ui/app/components/app/connected-status-indicator/connected-status-indicator.js b/ui/components/app/connected-status-indicator/connected-status-indicator.js similarity index 100% rename from ui/app/components/app/connected-status-indicator/connected-status-indicator.js rename to ui/components/app/connected-status-indicator/connected-status-indicator.js diff --git a/ui/app/components/app/connected-status-indicator/index.js b/ui/components/app/connected-status-indicator/index.js similarity index 100% rename from ui/app/components/app/connected-status-indicator/index.js rename to ui/components/app/connected-status-indicator/index.js diff --git a/ui/app/components/app/connected-status-indicator/index.scss b/ui/components/app/connected-status-indicator/index.scss similarity index 100% rename from ui/app/components/app/connected-status-indicator/index.scss rename to ui/components/app/connected-status-indicator/index.scss diff --git a/ui/app/components/app/contact-list/contact-list.component.js b/ui/components/app/contact-list/contact-list.component.js similarity index 100% rename from ui/app/components/app/contact-list/contact-list.component.js rename to ui/components/app/contact-list/contact-list.component.js diff --git a/ui/app/components/app/contact-list/index.js b/ui/components/app/contact-list/index.js similarity index 100% rename from ui/app/components/app/contact-list/index.js rename to ui/components/app/contact-list/index.js diff --git a/ui/app/components/app/contact-list/recipient-group/index.js b/ui/components/app/contact-list/recipient-group/index.js similarity index 100% rename from ui/app/components/app/contact-list/recipient-group/index.js rename to ui/components/app/contact-list/recipient-group/index.js diff --git a/ui/app/components/app/contact-list/recipient-group/recipient-group.component.js b/ui/components/app/contact-list/recipient-group/recipient-group.component.js similarity index 100% rename from ui/app/components/app/contact-list/recipient-group/recipient-group.component.js rename to ui/components/app/contact-list/recipient-group/recipient-group.component.js diff --git a/ui/app/components/app/dropdowns/dropdown.js b/ui/components/app/dropdowns/dropdown.js similarity index 100% rename from ui/app/components/app/dropdowns/dropdown.js rename to ui/components/app/dropdowns/dropdown.js diff --git a/ui/app/components/app/dropdowns/dropdown.test.js b/ui/components/app/dropdowns/dropdown.test.js similarity index 100% rename from ui/app/components/app/dropdowns/dropdown.test.js rename to ui/components/app/dropdowns/dropdown.test.js diff --git a/ui/app/components/app/dropdowns/network-dropdown.js b/ui/components/app/dropdowns/network-dropdown.js similarity index 96% rename from ui/app/components/app/dropdowns/network-dropdown.js rename to ui/components/app/dropdowns/network-dropdown.js index e0742722d..66e44bd49 100644 --- a/ui/app/components/app/dropdowns/network-dropdown.js +++ b/ui/components/app/dropdowns/network-dropdown.js @@ -9,10 +9,10 @@ import { NETWORKS_ROUTE, NETWORKS_FORM_ROUTE, } from '../../../helpers/constants/routes'; -import { ENVIRONMENT_TYPE_FULLSCREEN } from '../../../../../shared/constants/app'; -import { NETWORK_TYPE_RPC } from '../../../../../shared/constants/network'; -import { isPrefixedFormattedHexString } from '../../../../../shared/modules/network.utils'; -import { getEnvironmentType } from '../../../../../app/scripts/lib/util'; +import { ENVIRONMENT_TYPE_FULLSCREEN } from '../../../../shared/constants/app'; +import { NETWORK_TYPE_RPC } from '../../../../shared/constants/network'; +import { isPrefixedFormattedHexString } from '../../../../shared/modules/network.utils'; +import { getEnvironmentType } from '../../../../app/scripts/lib/util'; import ColorIndicator from '../../ui/color-indicator'; import { COLORS, SIZES } from '../../../helpers/constants/design-system'; diff --git a/ui/app/components/app/dropdowns/network-dropdown.test.js b/ui/components/app/dropdowns/network-dropdown.test.js similarity index 98% rename from ui/app/components/app/dropdowns/network-dropdown.test.js rename to ui/components/app/dropdowns/network-dropdown.test.js index 3452e8fef..f68fddd93 100644 --- a/ui/app/components/app/dropdowns/network-dropdown.test.js +++ b/ui/components/app/dropdowns/network-dropdown.test.js @@ -1,7 +1,7 @@ import React from 'react'; import configureMockStore from 'redux-mock-store'; import thunk from 'redux-thunk'; -import { mountWithRouter } from '../../../../../test/lib/render-helpers'; +import { mountWithRouter } from '../../../../test/lib/render-helpers'; import ColorIndicator from '../../ui/color-indicator'; import NetworkDropdown from './network-dropdown'; import { DropdownMenuItem } from './dropdown'; diff --git a/ui/app/components/app/gas-customization/advanced-gas-inputs/advanced-gas-input-component.test.js b/ui/components/app/gas-customization/advanced-gas-inputs/advanced-gas-input-component.test.js similarity index 100% rename from ui/app/components/app/gas-customization/advanced-gas-inputs/advanced-gas-input-component.test.js rename to ui/components/app/gas-customization/advanced-gas-inputs/advanced-gas-input-component.test.js diff --git a/ui/app/components/app/gas-customization/advanced-gas-inputs/advanced-gas-inputs.component.js b/ui/components/app/gas-customization/advanced-gas-inputs/advanced-gas-inputs.component.js similarity index 100% rename from ui/app/components/app/gas-customization/advanced-gas-inputs/advanced-gas-inputs.component.js rename to ui/components/app/gas-customization/advanced-gas-inputs/advanced-gas-inputs.component.js diff --git a/ui/app/components/app/gas-customization/advanced-gas-inputs/advanced-gas-inputs.container.js b/ui/components/app/gas-customization/advanced-gas-inputs/advanced-gas-inputs.container.js similarity index 100% rename from ui/app/components/app/gas-customization/advanced-gas-inputs/advanced-gas-inputs.container.js rename to ui/components/app/gas-customization/advanced-gas-inputs/advanced-gas-inputs.container.js diff --git a/ui/app/components/app/gas-customization/advanced-gas-inputs/index.js b/ui/components/app/gas-customization/advanced-gas-inputs/index.js similarity index 100% rename from ui/app/components/app/gas-customization/advanced-gas-inputs/index.js rename to ui/components/app/gas-customization/advanced-gas-inputs/index.js diff --git a/ui/app/components/app/gas-customization/advanced-gas-inputs/index.scss b/ui/components/app/gas-customization/advanced-gas-inputs/index.scss similarity index 100% rename from ui/app/components/app/gas-customization/advanced-gas-inputs/index.scss rename to ui/components/app/gas-customization/advanced-gas-inputs/index.scss diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content-component.test.js b/ui/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content-component.test.js similarity index 94% rename from ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content-component.test.js rename to ui/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content-component.test.js index 0a91fbc69..de8ec3b80 100644 --- a/ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content-component.test.js +++ b/ui/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content-component.test.js @@ -1,6 +1,6 @@ import React from 'react'; import sinon from 'sinon'; -import shallow from '../../../../../../lib/shallow-with-context'; +import { shallowWithContext } from '../../../../../../test/lib/render-helpers'; import AdvancedTabContent from './advanced-tab-content.component'; describe('AdvancedTabContent Component', () => { @@ -13,7 +13,7 @@ describe('AdvancedTabContent Component', () => { }; sinon.spy(AdvancedTabContent.prototype, 'renderDataSummary'); - wrapper = shallow( + wrapper = shallowWithContext( { let dataSummary; beforeEach(() => { - dataSummary = shallow( + dataSummary = shallowWithContext( wrapper.instance().renderDataSummary('mockTotalFee'), ); }); diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content.component.js b/ui/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content.component.js similarity index 100% rename from ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content.component.js rename to ui/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content.component.js diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/index.js b/ui/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/index.js similarity index 100% rename from ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/index.js rename to ui/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/index.js diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/index.scss b/ui/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/index.scss similarity index 100% rename from ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/index.scss rename to ui/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/index.scss diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/basic-tab-content/basic-tab-content-component.test.js b/ui/components/app/gas-customization/gas-modal-page-container/basic-tab-content/basic-tab-content-component.test.js similarity index 96% rename from ui/app/components/app/gas-customization/gas-modal-page-container/basic-tab-content/basic-tab-content-component.test.js rename to ui/components/app/gas-customization/gas-modal-page-container/basic-tab-content/basic-tab-content-component.test.js index facda50a5..12114edcf 100644 --- a/ui/app/components/app/gas-customization/gas-modal-page-container/basic-tab-content/basic-tab-content-component.test.js +++ b/ui/components/app/gas-customization/gas-modal-page-container/basic-tab-content/basic-tab-content-component.test.js @@ -1,8 +1,8 @@ import React from 'react'; -import shallow from '../../../../../../lib/shallow-with-context'; import GasPriceButtonGroup from '../../gas-price-button-group'; import Loading from '../../../../ui/loading-screen'; import { GAS_ESTIMATE_TYPES } from '../../../../../helpers/constants/common'; +import { shallowWithContext } from '../../../../../../test/lib/render-helpers'; import BasicTabContent from './basic-tab-content.component'; const mockGasPriceButtonGroupProps = { @@ -42,7 +42,7 @@ describe('BasicTabContent Component', () => { let wrapper; beforeEach(() => { - wrapper = shallow( + wrapper = shallowWithContext( , diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/basic-tab-content/basic-tab-content.component.js b/ui/components/app/gas-customization/gas-modal-page-container/basic-tab-content/basic-tab-content.component.js similarity index 100% rename from ui/app/components/app/gas-customization/gas-modal-page-container/basic-tab-content/basic-tab-content.component.js rename to ui/components/app/gas-customization/gas-modal-page-container/basic-tab-content/basic-tab-content.component.js diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/basic-tab-content/index.js b/ui/components/app/gas-customization/gas-modal-page-container/basic-tab-content/index.js similarity index 100% rename from ui/app/components/app/gas-customization/gas-modal-page-container/basic-tab-content/index.js rename to ui/components/app/gas-customization/gas-modal-page-container/basic-tab-content/index.js diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/basic-tab-content/index.scss b/ui/components/app/gas-customization/gas-modal-page-container/basic-tab-content/index.scss similarity index 100% rename from ui/app/components/app/gas-customization/gas-modal-page-container/basic-tab-content/index.scss rename to ui/components/app/gas-customization/gas-modal-page-container/basic-tab-content/index.scss diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container-component.test.js b/ui/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container-component.test.js similarity index 95% rename from ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container-component.test.js rename to ui/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container-component.test.js index dd5f23e39..2094d4b54 100644 --- a/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container-component.test.js +++ b/ui/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container-component.test.js @@ -1,6 +1,6 @@ import React from 'react'; import sinon from 'sinon'; -import shallow from '../../../../../lib/shallow-with-context'; +import { shallowWithContext } from '../../../../../test/lib/render-helpers'; import PageContainer from '../../../ui/page-container'; @@ -63,7 +63,7 @@ describe('GasModalPageContainer Component', () => { let wrapper; beforeEach(() => { - wrapper = shallow( + wrapper = shallowWithContext( { it('should pass the correct renderTabs property to PageContainer', () => { sinon.stub(GP, 'renderTabs').returns('mockTabs'); - const renderTabsWrapperTester = shallow( + const renderTabsWrapperTester = shallowWithContext( { it('should render a Tabs component with "Basic" and "Advanced" tabs', () => { const renderTabsResult = wrapper.instance().renderTabs(); - const renderedTabs = shallow(renderTabsResult); + const renderedTabs = shallowWithContext(renderTabsResult); expect(renderedTabs.props().className).toStrictEqual('tabs'); const tabs = renderedTabs.find(Tab); @@ -189,7 +189,7 @@ describe('GasModalPageContainer Component', () => { }); it('should not render the basic tab if hideBasic is true', () => { - wrapper = shallow( + wrapper = shallowWithContext( { ); const renderTabsResult = wrapper.instance().renderTabs(); - const renderedTabs = shallow(renderTabsResult); + const renderedTabs = shallowWithContext(renderTabsResult); const tabs = renderedTabs.find(Tab); expect(tabs).toHaveLength(1); expect(tabs.at(0).props().name).toStrictEqual('advanced'); @@ -229,7 +229,7 @@ describe('GasModalPageContainer Component', () => { describe('renderInfoRows', () => { it('should render the info rows with the passed data', () => { const baseClassName = 'gas-modal-content__info-row'; - const renderedInfoRowsContainer = shallow( + const renderedInfoRowsContainer = shallowWithContext( wrapper .instance() .renderInfoRows( diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container-container.test.js b/ui/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container-container.test.js similarity index 97% rename from ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container-container.test.js rename to ui/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container-container.test.js index ef5e62895..bcbbaa9d1 100644 --- a/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container-container.test.js +++ b/ui/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container-container.test.js @@ -21,7 +21,7 @@ jest.mock('react-redux', () => ({ }, })); -jest.mock('../../../../../app/selectors', () => ({ +jest.mock('../../../../selectors', () => ({ getBasicGasEstimateLoadingStatus: (s) => `mockBasicGasEstimateLoadingStatus:${Object.keys(s).length}`, getRenderableBasicEstimateData: (s) => @@ -42,20 +42,20 @@ jest.mock('../../../../../app/selectors', () => ({ isCustomPriceSafe: jest.fn().mockReturnValue(true), })); -jest.mock('../../../../../app/store/actions', () => ({ +jest.mock('../../../../store/actions', () => ({ hideModal: jest.fn(), setGasLimit: jest.fn(), setGasPrice: jest.fn(), updateTransaction: jest.fn(), })); -jest.mock('../../../../../app/ducks/gas/gas.duck', () => ({ +jest.mock('../../../../ducks/gas/gas.duck', () => ({ setCustomGasPrice: jest.fn(), setCustomGasLimit: jest.fn(), resetCustomData: jest.fn(), })); -jest.mock('../../../../../app/ducks/send/send.duck', () => ({ +jest.mock('../../../../ducks/send/send.duck', () => ({ hideGasButtonGroup: jest.fn(), })); diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.component.js b/ui/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.component.js similarity index 100% rename from ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.component.js rename to ui/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.component.js diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js b/ui/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js similarity index 98% rename from ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js rename to ui/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js index 4d57502b2..d85d07c72 100644 --- a/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js +++ b/ui/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js @@ -1,5 +1,5 @@ import { connect } from 'react-redux'; -import { addHexPrefix } from '../../../../../../app/scripts/lib/util'; +import { addHexPrefix } from '../../../../../app/scripts/lib/util'; import { hideModal, setGasLimit, @@ -54,7 +54,7 @@ import { } from '../../../../pages/send/send.utils'; import { MIN_GAS_LIMIT_DEC } from '../../../../pages/send/send.constants'; import { calcMaxAmount } from '../../../../pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils'; -import { TRANSACTION_STATUSES } from '../../../../../../shared/constants/transaction'; +import { TRANSACTION_STATUSES } from '../../../../../shared/constants/transaction'; import GasModalPageContainer from './gas-modal-page-container.component'; const mapStateToProps = (state, ownProps) => { diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/index.js b/ui/components/app/gas-customization/gas-modal-page-container/index.js similarity index 100% rename from ui/app/components/app/gas-customization/gas-modal-page-container/index.js rename to ui/components/app/gas-customization/gas-modal-page-container/index.js diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/index.scss b/ui/components/app/gas-customization/gas-modal-page-container/index.scss similarity index 100% rename from ui/app/components/app/gas-customization/gas-modal-page-container/index.scss rename to ui/components/app/gas-customization/gas-modal-page-container/index.scss diff --git a/ui/app/components/app/gas-customization/gas-price-button-group/gas-price-button-group-component.test.js b/ui/components/app/gas-customization/gas-price-button-group/gas-price-button-group-component.test.js similarity index 93% rename from ui/app/components/app/gas-customization/gas-price-button-group/gas-price-button-group-component.test.js rename to ui/components/app/gas-customization/gas-price-button-group/gas-price-button-group-component.test.js index 2cb5cb428..2391c23a6 100644 --- a/ui/app/components/app/gas-customization/gas-price-button-group/gas-price-button-group-component.test.js +++ b/ui/components/app/gas-customization/gas-price-button-group/gas-price-button-group-component.test.js @@ -1,6 +1,6 @@ import React from 'react'; import sinon from 'sinon'; -import shallow from '../../../../../lib/shallow-with-context'; +import { shallowWithContext } from '../../../../../test/lib/render-helpers'; import { GAS_ESTIMATE_TYPES } from '../../../../helpers/constants/common'; import ButtonGroup from '../../../ui/button-group'; @@ -54,7 +54,7 @@ describe('GasPriceButtonGroup Component', () => { sinon.spy(GasPriceButtonGroup.prototype, 'renderButton'); sinon.spy(GasPriceButtonGroup.prototype, 'renderButtonContent'); - wrapper = shallow( + wrapper = shallowWithContext( , ); }); @@ -119,7 +119,7 @@ describe('GasPriceButtonGroup Component', () => { { ...mockGasPriceButtonGroupProps.gasButtonInfo[0] }, mockButtonPropsAndFlags, ); - wrappedRenderButtonResult = shallow(renderButtonResult); + wrappedRenderButtonResult = shallowWithContext(renderButtonResult); }); it('should render a button', () => { @@ -183,7 +183,7 @@ describe('GasPriceButtonGroup Component', () => { className: 'someClass', }, ); - const wrappedRenderButtonContentResult = shallow( + const wrappedRenderButtonContentResult = shallowWithContext( renderButtonContentResult, ); expect( @@ -203,7 +203,7 @@ describe('GasPriceButtonGroup Component', () => { className: 'someClass', }, ); - const wrappedRenderButtonContentResult = shallow( + const wrappedRenderButtonContentResult = shallowWithContext( renderButtonContentResult, ); expect( @@ -225,7 +225,7 @@ describe('GasPriceButtonGroup Component', () => { className: 'someClass', }, ); - const wrappedRenderButtonContentResult = shallow( + const wrappedRenderButtonContentResult = shallowWithContext( renderButtonContentResult, ); expect( @@ -247,7 +247,7 @@ describe('GasPriceButtonGroup Component', () => { className: 'someClass', }, ); - const wrappedRenderButtonContentResult = shallow( + const wrappedRenderButtonContentResult = shallowWithContext( renderButtonContentResult, ); expect( @@ -268,7 +268,7 @@ describe('GasPriceButtonGroup Component', () => { showCheck: true, }, ); - const wrappedRenderButtonContentResult = shallow( + const wrappedRenderButtonContentResult = shallowWithContext( renderButtonContentResult, ); expect(wrappedRenderButtonContentResult.find('.fa-check')).toHaveLength( @@ -289,7 +289,7 @@ describe('GasPriceButtonGroup Component', () => { showCheck: true, }, ); - const wrappedRenderButtonContentResult = shallow( + const wrappedRenderButtonContentResult = shallowWithContext( renderButtonContentResult, ); expect(wrappedRenderButtonContentResult.children()).toHaveLength(5); @@ -300,7 +300,7 @@ describe('GasPriceButtonGroup Component', () => { {}, {}, ); - const wrappedRenderButtonContentResult = shallow( + const wrappedRenderButtonContentResult = shallowWithContext( renderButtonContentResult, ); expect(wrappedRenderButtonContentResult.children()).toHaveLength(0); diff --git a/ui/app/components/app/gas-customization/gas-price-button-group/gas-price-button-group.component.js b/ui/components/app/gas-customization/gas-price-button-group/gas-price-button-group.component.js similarity index 100% rename from ui/app/components/app/gas-customization/gas-price-button-group/gas-price-button-group.component.js rename to ui/components/app/gas-customization/gas-price-button-group/gas-price-button-group.component.js diff --git a/ui/app/components/app/gas-customization/gas-price-button-group/index.js b/ui/components/app/gas-customization/gas-price-button-group/index.js similarity index 100% rename from ui/app/components/app/gas-customization/gas-price-button-group/index.js rename to ui/components/app/gas-customization/gas-price-button-group/index.js diff --git a/ui/app/components/app/gas-customization/gas-price-button-group/index.scss b/ui/components/app/gas-customization/gas-price-button-group/index.scss similarity index 100% rename from ui/app/components/app/gas-customization/gas-price-button-group/index.scss rename to ui/components/app/gas-customization/gas-price-button-group/index.scss diff --git a/ui/app/components/app/gas-customization/gas-slider/gas-slider.component.js b/ui/components/app/gas-customization/gas-slider/gas-slider.component.js similarity index 100% rename from ui/app/components/app/gas-customization/gas-slider/gas-slider.component.js rename to ui/components/app/gas-customization/gas-slider/gas-slider.component.js diff --git a/ui/app/components/app/gas-customization/gas-slider/index.js b/ui/components/app/gas-customization/gas-slider/index.js similarity index 100% rename from ui/app/components/app/gas-customization/gas-slider/index.js rename to ui/components/app/gas-customization/gas-slider/index.js diff --git a/ui/app/components/app/gas-customization/gas-slider/index.scss b/ui/components/app/gas-customization/gas-slider/index.scss similarity index 100% rename from ui/app/components/app/gas-customization/gas-slider/index.scss rename to ui/components/app/gas-customization/gas-slider/index.scss diff --git a/ui/app/components/app/gas-customization/index.scss b/ui/components/app/gas-customization/index.scss similarity index 100% rename from ui/app/components/app/gas-customization/index.scss rename to ui/components/app/gas-customization/index.scss diff --git a/ui/app/components/app/home-notification/home-notification.component.js b/ui/components/app/home-notification/home-notification.component.js similarity index 100% rename from ui/app/components/app/home-notification/home-notification.component.js rename to ui/components/app/home-notification/home-notification.component.js diff --git a/ui/app/components/app/home-notification/index.js b/ui/components/app/home-notification/index.js similarity index 100% rename from ui/app/components/app/home-notification/index.js rename to ui/components/app/home-notification/index.js diff --git a/ui/app/components/app/home-notification/index.scss b/ui/components/app/home-notification/index.scss similarity index 100% rename from ui/app/components/app/home-notification/index.scss rename to ui/components/app/home-notification/index.scss diff --git a/ui/app/components/app/info-box/index.js b/ui/components/app/info-box/index.js similarity index 100% rename from ui/app/components/app/info-box/index.js rename to ui/components/app/info-box/index.js diff --git a/ui/app/components/app/info-box/index.scss b/ui/components/app/info-box/index.scss similarity index 100% rename from ui/app/components/app/info-box/index.scss rename to ui/components/app/info-box/index.scss diff --git a/ui/app/components/app/info-box/info-box.component.js b/ui/components/app/info-box/info-box.component.js similarity index 100% rename from ui/app/components/app/info-box/info-box.component.js rename to ui/components/app/info-box/info-box.component.js diff --git a/ui/app/components/app/info-box/info-box.test.js b/ui/components/app/info-box/info-box.test.js similarity index 100% rename from ui/app/components/app/info-box/info-box.test.js rename to ui/components/app/info-box/info-box.test.js diff --git a/ui/app/components/app/loading-network-screen/index.js b/ui/components/app/loading-network-screen/index.js similarity index 100% rename from ui/app/components/app/loading-network-screen/index.js rename to ui/components/app/loading-network-screen/index.js diff --git a/ui/app/components/app/loading-network-screen/loading-network-screen.component.js b/ui/components/app/loading-network-screen/loading-network-screen.component.js similarity index 100% rename from ui/app/components/app/loading-network-screen/loading-network-screen.component.js rename to ui/components/app/loading-network-screen/loading-network-screen.component.js diff --git a/ui/app/components/app/loading-network-screen/loading-network-screen.container.js b/ui/components/app/loading-network-screen/loading-network-screen.container.js similarity index 93% rename from ui/app/components/app/loading-network-screen/loading-network-screen.container.js rename to ui/components/app/loading-network-screen/loading-network-screen.container.js index bfce78fbe..2f1e711ce 100644 --- a/ui/app/components/app/loading-network-screen/loading-network-screen.container.js +++ b/ui/components/app/loading-network-screen/loading-network-screen.container.js @@ -1,5 +1,5 @@ import { connect } from 'react-redux'; -import { NETWORK_TYPE_RPC } from '../../../../../shared/constants/network'; +import { NETWORK_TYPE_RPC } from '../../../../shared/constants/network'; import * as actions from '../../../store/actions'; import { getNetworkIdentifier, isNetworkLoading } from '../../../selectors'; import LoadingNetworkScreen from './loading-network-screen.component'; diff --git a/ui/app/components/app/menu-bar/account-options-menu.js b/ui/components/app/menu-bar/account-options-menu.js similarity index 95% rename from ui/app/components/app/menu-bar/account-options-menu.js rename to ui/components/app/menu-bar/account-options-menu.js index b8ea6d1d4..f71908aae 100644 --- a/ui/app/components/app/menu-bar/account-options-menu.js +++ b/ui/components/app/menu-bar/account-options-menu.js @@ -6,7 +6,7 @@ import { useDispatch, useSelector } from 'react-redux'; import { showModal } from '../../../store/actions'; import { CONNECTED_ROUTE } from '../../../helpers/constants/routes'; import { Menu, MenuItem } from '../../ui/menu'; -import getAccountLink from '../../../../lib/account-link'; +import getAccountLink from '../../../helpers/utils/account-link'; import { getCurrentChainId, getCurrentKeyring, @@ -15,8 +15,8 @@ import { } from '../../../selectors'; import { useI18nContext } from '../../../hooks/useI18nContext'; import { useMetricEvent } from '../../../hooks/useMetricEvent'; -import { getEnvironmentType } from '../../../../../app/scripts/lib/util'; -import { ENVIRONMENT_TYPE_FULLSCREEN } from '../../../../../shared/constants/app'; +import { getEnvironmentType } from '../../../../app/scripts/lib/util'; +import { ENVIRONMENT_TYPE_FULLSCREEN } from '../../../../shared/constants/app'; export default function AccountOptionsMenu({ anchorElement, onClose }) { const t = useI18nContext(); diff --git a/ui/app/components/app/menu-bar/index.js b/ui/components/app/menu-bar/index.js similarity index 100% rename from ui/app/components/app/menu-bar/index.js rename to ui/components/app/menu-bar/index.js diff --git a/ui/app/components/app/menu-bar/index.scss b/ui/components/app/menu-bar/index.scss similarity index 100% rename from ui/app/components/app/menu-bar/index.scss rename to ui/components/app/menu-bar/index.scss diff --git a/ui/app/components/app/menu-bar/menu-bar.js b/ui/components/app/menu-bar/menu-bar.js similarity index 92% rename from ui/app/components/app/menu-bar/menu-bar.js rename to ui/components/app/menu-bar/menu-bar.js index 7b623c2c6..b5e3fdb7c 100644 --- a/ui/app/components/app/menu-bar/menu-bar.js +++ b/ui/components/app/menu-bar/menu-bar.js @@ -4,8 +4,8 @@ import { useHistory } from 'react-router-dom'; import { useSelector } from 'react-redux'; import SelectedAccount from '../selected-account'; import ConnectedStatusIndicator from '../connected-status-indicator'; -import { getEnvironmentType } from '../../../../../app/scripts/lib/util'; -import { ENVIRONMENT_TYPE_POPUP } from '../../../../../shared/constants/app'; +import { getEnvironmentType } from '../../../../app/scripts/lib/util'; +import { ENVIRONMENT_TYPE_POPUP } from '../../../../shared/constants/app'; import { CONNECTED_ACCOUNTS_ROUTE } from '../../../helpers/constants/routes'; import { useI18nContext } from '../../../hooks/useI18nContext'; import { useMetricEvent } from '../../../hooks/useMetricEvent'; diff --git a/ui/app/components/app/menu-bar/menu-bar.test.js b/ui/components/app/menu-bar/menu-bar.test.js similarity index 92% rename from ui/app/components/app/menu-bar/menu-bar.test.js rename to ui/components/app/menu-bar/menu-bar.test.js index 5db320352..4a625f717 100644 --- a/ui/app/components/app/menu-bar/menu-bar.test.js +++ b/ui/components/app/menu-bar/menu-bar.test.js @@ -1,8 +1,8 @@ import React from 'react'; import { Provider } from 'react-redux'; import configureStore from 'redux-mock-store'; -import { mountWithRouter } from '../../../../../test/lib/render-helpers'; -import { ROPSTEN_CHAIN_ID } from '../../../../../shared/constants/network'; +import { mountWithRouter } from '../../../../test/lib/render-helpers'; +import { ROPSTEN_CHAIN_ID } from '../../../../shared/constants/network'; import MenuBar from './menu-bar'; const initState = { diff --git a/ui/app/components/app/menu-droppo.js b/ui/components/app/menu-droppo.js similarity index 100% rename from ui/app/components/app/menu-droppo.js rename to ui/components/app/menu-droppo.js diff --git a/ui/app/components/app/metamask-template-renderer/index.js b/ui/components/app/metamask-template-renderer/index.js similarity index 100% rename from ui/app/components/app/metamask-template-renderer/index.js rename to ui/components/app/metamask-template-renderer/index.js diff --git a/ui/app/components/app/metamask-template-renderer/metamask-template-renderer.js b/ui/components/app/metamask-template-renderer/metamask-template-renderer.js similarity index 100% rename from ui/app/components/app/metamask-template-renderer/metamask-template-renderer.js rename to ui/components/app/metamask-template-renderer/metamask-template-renderer.js diff --git a/ui/app/components/app/metamask-template-renderer/metamask-template-renderer.stories.js b/ui/components/app/metamask-template-renderer/metamask-template-renderer.stories.js similarity index 100% rename from ui/app/components/app/metamask-template-renderer/metamask-template-renderer.stories.js rename to ui/components/app/metamask-template-renderer/metamask-template-renderer.stories.js diff --git a/ui/app/components/app/metamask-template-renderer/safe-component-list.js b/ui/components/app/metamask-template-renderer/safe-component-list.js similarity index 100% rename from ui/app/components/app/metamask-template-renderer/safe-component-list.js rename to ui/components/app/metamask-template-renderer/safe-component-list.js diff --git a/ui/app/components/app/metamask-translation/index.js b/ui/components/app/metamask-translation/index.js similarity index 100% rename from ui/app/components/app/metamask-translation/index.js rename to ui/components/app/metamask-translation/index.js diff --git a/ui/app/components/app/metamask-translation/metamask-translation.js b/ui/components/app/metamask-translation/metamask-translation.js similarity index 100% rename from ui/app/components/app/metamask-translation/metamask-translation.js rename to ui/components/app/metamask-translation/metamask-translation.js diff --git a/ui/app/components/app/metamask-translation/metamask-translation.stories.js b/ui/components/app/metamask-translation/metamask-translation.stories.js similarity index 95% rename from ui/app/components/app/metamask-translation/metamask-translation.stories.js rename to ui/components/app/metamask-translation/metamask-translation.stories.js index 21d321ccc..429037810 100644 --- a/ui/app/components/app/metamask-translation/metamask-translation.stories.js +++ b/ui/components/app/metamask-translation/metamask-translation.stories.js @@ -1,7 +1,7 @@ import React from 'react'; import { select, object } from '@storybook/addon-knobs'; import { groupBy } from 'lodash'; -import en from '../../../../../app/_locales/en/messages.json'; +import en from '../../../../app/_locales/en/messages.json'; import MetaMaskTranslation from './metamask-translation'; export default { diff --git a/ui/app/components/app/modal/index.js b/ui/components/app/modal/index.js similarity index 100% rename from ui/app/components/app/modal/index.js rename to ui/components/app/modal/index.js diff --git a/ui/app/components/app/modal/index.scss b/ui/components/app/modal/index.scss similarity index 100% rename from ui/app/components/app/modal/index.scss rename to ui/components/app/modal/index.scss diff --git a/ui/app/components/app/modal/modal-content/index.js b/ui/components/app/modal/modal-content/index.js similarity index 100% rename from ui/app/components/app/modal/modal-content/index.js rename to ui/components/app/modal/modal-content/index.js diff --git a/ui/app/components/app/modal/modal-content/index.scss b/ui/components/app/modal/modal-content/index.scss similarity index 100% rename from ui/app/components/app/modal/modal-content/index.scss rename to ui/components/app/modal/modal-content/index.scss diff --git a/ui/app/components/app/modal/modal-content/modal-content.component.js b/ui/components/app/modal/modal-content/modal-content.component.js similarity index 100% rename from ui/app/components/app/modal/modal-content/modal-content.component.js rename to ui/components/app/modal/modal-content/modal-content.component.js diff --git a/ui/app/components/app/modal/modal-content/modal-content.component.test.js b/ui/components/app/modal/modal-content/modal-content.component.test.js similarity index 100% rename from ui/app/components/app/modal/modal-content/modal-content.component.test.js rename to ui/components/app/modal/modal-content/modal-content.component.test.js diff --git a/ui/app/components/app/modal/modal.component.js b/ui/components/app/modal/modal.component.js similarity index 100% rename from ui/app/components/app/modal/modal.component.js rename to ui/components/app/modal/modal.component.js diff --git a/ui/app/components/app/modal/modal.component.test.js b/ui/components/app/modal/modal.component.test.js similarity index 100% rename from ui/app/components/app/modal/modal.component.test.js rename to ui/components/app/modal/modal.component.test.js diff --git a/ui/app/components/app/modals/account-details-modal/account-details-modal.component.js b/ui/components/app/modals/account-details-modal/account-details-modal.component.js similarity index 97% rename from ui/app/components/app/modals/account-details-modal/account-details-modal.component.js rename to ui/components/app/modals/account-details-modal/account-details-modal.component.js index 7e36e0a6c..c314d6979 100644 --- a/ui/app/components/app/modals/account-details-modal/account-details-modal.component.js +++ b/ui/components/app/modals/account-details-modal/account-details-modal.component.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import AccountModalContainer from '../account-modal-container'; -import getAccountLink from '../../../../../lib/account-link'; +import getAccountLink from '../../../../helpers/utils/account-link'; import QrView from '../../../ui/qr-code'; import EditableLabel from '../../../ui/editable-label'; import Button from '../../../ui/button'; diff --git a/ui/app/components/app/modals/account-details-modal/account-details-modal.container.js b/ui/components/app/modals/account-details-modal/account-details-modal.container.js similarity index 100% rename from ui/app/components/app/modals/account-details-modal/account-details-modal.container.js rename to ui/components/app/modals/account-details-modal/account-details-modal.container.js diff --git a/ui/app/components/app/modals/account-details-modal/account-details-modal.test.js b/ui/components/app/modals/account-details-modal/account-details-modal.test.js similarity index 100% rename from ui/app/components/app/modals/account-details-modal/account-details-modal.test.js rename to ui/components/app/modals/account-details-modal/account-details-modal.test.js diff --git a/ui/app/components/app/modals/account-details-modal/index.js b/ui/components/app/modals/account-details-modal/index.js similarity index 100% rename from ui/app/components/app/modals/account-details-modal/index.js rename to ui/components/app/modals/account-details-modal/index.js diff --git a/ui/app/components/app/modals/account-details-modal/index.scss b/ui/components/app/modals/account-details-modal/index.scss similarity index 100% rename from ui/app/components/app/modals/account-details-modal/index.scss rename to ui/components/app/modals/account-details-modal/index.scss diff --git a/ui/app/components/app/modals/account-modal-container/account-modal-container.component.js b/ui/components/app/modals/account-modal-container/account-modal-container.component.js similarity index 100% rename from ui/app/components/app/modals/account-modal-container/account-modal-container.component.js rename to ui/components/app/modals/account-modal-container/account-modal-container.component.js diff --git a/ui/app/components/app/modals/account-modal-container/account-modal-container.container.js b/ui/components/app/modals/account-modal-container/account-modal-container.container.js similarity index 100% rename from ui/app/components/app/modals/account-modal-container/account-modal-container.container.js rename to ui/components/app/modals/account-modal-container/account-modal-container.container.js diff --git a/ui/app/components/app/modals/account-modal-container/index.js b/ui/components/app/modals/account-modal-container/index.js similarity index 100% rename from ui/app/components/app/modals/account-modal-container/index.js rename to ui/components/app/modals/account-modal-container/index.js diff --git a/ui/app/components/app/modals/account-modal-container/index.scss b/ui/components/app/modals/account-modal-container/index.scss similarity index 100% rename from ui/app/components/app/modals/account-modal-container/index.scss rename to ui/components/app/modals/account-modal-container/index.scss diff --git a/ui/app/components/app/modals/add-to-addressbook-modal/add-to-addressbook-modal.component.js b/ui/components/app/modals/add-to-addressbook-modal/add-to-addressbook-modal.component.js similarity index 100% rename from ui/app/components/app/modals/add-to-addressbook-modal/add-to-addressbook-modal.component.js rename to ui/components/app/modals/add-to-addressbook-modal/add-to-addressbook-modal.component.js diff --git a/ui/app/components/app/modals/add-to-addressbook-modal/add-to-addressbook-modal.container.js b/ui/components/app/modals/add-to-addressbook-modal/add-to-addressbook-modal.container.js similarity index 100% rename from ui/app/components/app/modals/add-to-addressbook-modal/add-to-addressbook-modal.container.js rename to ui/components/app/modals/add-to-addressbook-modal/add-to-addressbook-modal.container.js diff --git a/ui/app/components/app/modals/add-to-addressbook-modal/index.js b/ui/components/app/modals/add-to-addressbook-modal/index.js similarity index 100% rename from ui/app/components/app/modals/add-to-addressbook-modal/index.js rename to ui/components/app/modals/add-to-addressbook-modal/index.js diff --git a/ui/app/components/app/modals/add-to-addressbook-modal/index.scss b/ui/components/app/modals/add-to-addressbook-modal/index.scss similarity index 100% rename from ui/app/components/app/modals/add-to-addressbook-modal/index.scss rename to ui/components/app/modals/add-to-addressbook-modal/index.scss diff --git a/ui/app/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/cancel-transaction-gas-fee.component.js b/ui/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/cancel-transaction-gas-fee.component.js similarity index 100% rename from ui/app/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/cancel-transaction-gas-fee.component.js rename to ui/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/cancel-transaction-gas-fee.component.js diff --git a/ui/app/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/cancel-transaction-gas-fee.component.test.js b/ui/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/cancel-transaction-gas-fee.component.test.js similarity index 100% rename from ui/app/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/cancel-transaction-gas-fee.component.test.js rename to ui/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/cancel-transaction-gas-fee.component.test.js diff --git a/ui/app/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/index.js b/ui/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/index.js similarity index 100% rename from ui/app/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/index.js rename to ui/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/index.js diff --git a/ui/app/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/index.scss b/ui/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/index.scss similarity index 100% rename from ui/app/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/index.scss rename to ui/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/index.scss diff --git a/ui/app/components/app/modals/cancel-transaction/cancel-transaction.component.js b/ui/components/app/modals/cancel-transaction/cancel-transaction.component.js similarity index 95% rename from ui/app/components/app/modals/cancel-transaction/cancel-transaction.component.js rename to ui/components/app/modals/cancel-transaction/cancel-transaction.component.js index d45ba6198..9b436f7d9 100644 --- a/ui/app/components/app/modals/cancel-transaction/cancel-transaction.component.js +++ b/ui/components/app/modals/cancel-transaction/cancel-transaction.component.js @@ -1,7 +1,7 @@ import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import Modal from '../../modal'; -import { TRANSACTION_STATUSES } from '../../../../../../shared/constants/transaction'; +import { TRANSACTION_STATUSES } from '../../../../../shared/constants/transaction'; import CancelTransactionGasFee from './cancel-transaction-gas-fee'; export default class CancelTransaction extends PureComponent { diff --git a/ui/app/components/app/modals/cancel-transaction/cancel-transaction.component.test.js b/ui/components/app/modals/cancel-transaction/cancel-transaction.component.test.js similarity index 100% rename from ui/app/components/app/modals/cancel-transaction/cancel-transaction.component.test.js rename to ui/components/app/modals/cancel-transaction/cancel-transaction.component.test.js diff --git a/ui/app/components/app/modals/cancel-transaction/cancel-transaction.container.js b/ui/components/app/modals/cancel-transaction/cancel-transaction.container.js similarity index 100% rename from ui/app/components/app/modals/cancel-transaction/cancel-transaction.container.js rename to ui/components/app/modals/cancel-transaction/cancel-transaction.container.js diff --git a/ui/app/components/app/modals/cancel-transaction/index.js b/ui/components/app/modals/cancel-transaction/index.js similarity index 100% rename from ui/app/components/app/modals/cancel-transaction/index.js rename to ui/components/app/modals/cancel-transaction/index.js diff --git a/ui/app/components/app/modals/cancel-transaction/index.scss b/ui/components/app/modals/cancel-transaction/index.scss similarity index 100% rename from ui/app/components/app/modals/cancel-transaction/index.scss rename to ui/components/app/modals/cancel-transaction/index.scss diff --git a/ui/app/components/app/modals/confirm-delete-network/confirm-delete-network.component.js b/ui/components/app/modals/confirm-delete-network/confirm-delete-network.component.js similarity index 100% rename from ui/app/components/app/modals/confirm-delete-network/confirm-delete-network.component.js rename to ui/components/app/modals/confirm-delete-network/confirm-delete-network.component.js diff --git a/ui/app/components/app/modals/confirm-delete-network/confirm-delete-network.container.js b/ui/components/app/modals/confirm-delete-network/confirm-delete-network.container.js similarity index 100% rename from ui/app/components/app/modals/confirm-delete-network/confirm-delete-network.container.js rename to ui/components/app/modals/confirm-delete-network/confirm-delete-network.container.js diff --git a/ui/app/components/app/modals/confirm-delete-network/confirm-delete-network.test.js b/ui/components/app/modals/confirm-delete-network/confirm-delete-network.test.js similarity index 100% rename from ui/app/components/app/modals/confirm-delete-network/confirm-delete-network.test.js rename to ui/components/app/modals/confirm-delete-network/confirm-delete-network.test.js diff --git a/ui/app/components/app/modals/confirm-delete-network/index.js b/ui/components/app/modals/confirm-delete-network/index.js similarity index 100% rename from ui/app/components/app/modals/confirm-delete-network/index.js rename to ui/components/app/modals/confirm-delete-network/index.js diff --git a/ui/app/components/app/modals/confirm-remove-account/confirm-remove-account.component.js b/ui/components/app/modals/confirm-remove-account/confirm-remove-account.component.js similarity index 97% rename from ui/app/components/app/modals/confirm-remove-account/confirm-remove-account.component.js rename to ui/components/app/modals/confirm-remove-account/confirm-remove-account.component.js index 8c2831c2c..decdc329f 100644 --- a/ui/app/components/app/modals/confirm-remove-account/confirm-remove-account.component.js +++ b/ui/components/app/modals/confirm-remove-account/confirm-remove-account.component.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import Modal from '../../modal'; import { addressSummary } from '../../../../helpers/utils/util'; import Identicon from '../../../ui/identicon'; -import getAccountLink from '../../../../../lib/account-link'; +import getAccountLink from '../../../../helpers/utils/account-link'; export default class ConfirmRemoveAccount extends Component { static propTypes = { diff --git a/ui/app/components/app/modals/confirm-remove-account/confirm-remove-account.container.js b/ui/components/app/modals/confirm-remove-account/confirm-remove-account.container.js similarity index 100% rename from ui/app/components/app/modals/confirm-remove-account/confirm-remove-account.container.js rename to ui/components/app/modals/confirm-remove-account/confirm-remove-account.container.js diff --git a/ui/app/components/app/modals/confirm-remove-account/confirm-remove-account.test.js b/ui/components/app/modals/confirm-remove-account/confirm-remove-account.test.js similarity index 100% rename from ui/app/components/app/modals/confirm-remove-account/confirm-remove-account.test.js rename to ui/components/app/modals/confirm-remove-account/confirm-remove-account.test.js diff --git a/ui/app/components/app/modals/confirm-remove-account/index.js b/ui/components/app/modals/confirm-remove-account/index.js similarity index 100% rename from ui/app/components/app/modals/confirm-remove-account/index.js rename to ui/components/app/modals/confirm-remove-account/index.js diff --git a/ui/app/components/app/modals/confirm-remove-account/index.scss b/ui/components/app/modals/confirm-remove-account/index.scss similarity index 100% rename from ui/app/components/app/modals/confirm-remove-account/index.scss rename to ui/components/app/modals/confirm-remove-account/index.scss diff --git a/ui/app/components/app/modals/confirm-reset-account/confirm-reset-account.component.js b/ui/components/app/modals/confirm-reset-account/confirm-reset-account.component.js similarity index 100% rename from ui/app/components/app/modals/confirm-reset-account/confirm-reset-account.component.js rename to ui/components/app/modals/confirm-reset-account/confirm-reset-account.component.js diff --git a/ui/app/components/app/modals/confirm-reset-account/confirm-reset-account.container.js b/ui/components/app/modals/confirm-reset-account/confirm-reset-account.container.js similarity index 100% rename from ui/app/components/app/modals/confirm-reset-account/confirm-reset-account.container.js rename to ui/components/app/modals/confirm-reset-account/confirm-reset-account.container.js diff --git a/ui/app/components/app/modals/confirm-reset-account/confirm-reset-account.test.js b/ui/components/app/modals/confirm-reset-account/confirm-reset-account.test.js similarity index 100% rename from ui/app/components/app/modals/confirm-reset-account/confirm-reset-account.test.js rename to ui/components/app/modals/confirm-reset-account/confirm-reset-account.test.js diff --git a/ui/app/components/app/modals/confirm-reset-account/index.js b/ui/components/app/modals/confirm-reset-account/index.js similarity index 100% rename from ui/app/components/app/modals/confirm-reset-account/index.js rename to ui/components/app/modals/confirm-reset-account/index.js diff --git a/ui/app/components/app/modals/customize-nonce/customize-nonce.component.js b/ui/components/app/modals/customize-nonce/customize-nonce.component.js similarity index 100% rename from ui/app/components/app/modals/customize-nonce/customize-nonce.component.js rename to ui/components/app/modals/customize-nonce/customize-nonce.component.js diff --git a/ui/app/components/app/modals/customize-nonce/index.js b/ui/components/app/modals/customize-nonce/index.js similarity index 100% rename from ui/app/components/app/modals/customize-nonce/index.js rename to ui/components/app/modals/customize-nonce/index.js diff --git a/ui/app/components/app/modals/customize-nonce/index.scss b/ui/components/app/modals/customize-nonce/index.scss similarity index 100% rename from ui/app/components/app/modals/customize-nonce/index.scss rename to ui/components/app/modals/customize-nonce/index.scss diff --git a/ui/app/components/app/modals/deposit-ether-modal/deposit-ether-modal.component.js b/ui/components/app/modals/deposit-ether-modal/deposit-ether-modal.component.js similarity index 98% rename from ui/app/components/app/modals/deposit-ether-modal/deposit-ether-modal.component.js rename to ui/components/app/modals/deposit-ether-modal/deposit-ether-modal.component.js index 553f25973..3f1775a47 100644 --- a/ui/app/components/app/modals/deposit-ether-modal/deposit-ether-modal.component.js +++ b/ui/components/app/modals/deposit-ether-modal/deposit-ether-modal.component.js @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; -import { NETWORK_TO_NAME_MAP } from '../../../../../../shared/constants/network'; +import { NETWORK_TO_NAME_MAP } from '../../../../../shared/constants/network'; import Button from '../../../ui/button'; export default class DepositEtherModal extends Component { diff --git a/ui/app/components/app/modals/deposit-ether-modal/deposit-ether-modal.container.js b/ui/components/app/modals/deposit-ether-modal/deposit-ether-modal.container.js similarity index 100% rename from ui/app/components/app/modals/deposit-ether-modal/deposit-ether-modal.container.js rename to ui/components/app/modals/deposit-ether-modal/deposit-ether-modal.container.js diff --git a/ui/app/components/app/modals/deposit-ether-modal/index.js b/ui/components/app/modals/deposit-ether-modal/index.js similarity index 100% rename from ui/app/components/app/modals/deposit-ether-modal/index.js rename to ui/components/app/modals/deposit-ether-modal/index.js diff --git a/ui/app/components/app/modals/deposit-ether-modal/index.scss b/ui/components/app/modals/deposit-ether-modal/index.scss similarity index 100% rename from ui/app/components/app/modals/deposit-ether-modal/index.scss rename to ui/components/app/modals/deposit-ether-modal/index.scss diff --git a/ui/app/components/app/modals/edit-approval-permission/edit-approval-permission.component.js b/ui/components/app/modals/edit-approval-permission/edit-approval-permission.component.js similarity index 100% rename from ui/app/components/app/modals/edit-approval-permission/edit-approval-permission.component.js rename to ui/components/app/modals/edit-approval-permission/edit-approval-permission.component.js diff --git a/ui/app/components/app/modals/edit-approval-permission/edit-approval-permission.container.js b/ui/components/app/modals/edit-approval-permission/edit-approval-permission.container.js similarity index 100% rename from ui/app/components/app/modals/edit-approval-permission/edit-approval-permission.container.js rename to ui/components/app/modals/edit-approval-permission/edit-approval-permission.container.js diff --git a/ui/app/components/app/modals/edit-approval-permission/index.js b/ui/components/app/modals/edit-approval-permission/index.js similarity index 100% rename from ui/app/components/app/modals/edit-approval-permission/index.js rename to ui/components/app/modals/edit-approval-permission/index.js diff --git a/ui/app/components/app/modals/edit-approval-permission/index.scss b/ui/components/app/modals/edit-approval-permission/index.scss similarity index 100% rename from ui/app/components/app/modals/edit-approval-permission/index.scss rename to ui/components/app/modals/edit-approval-permission/index.scss diff --git a/ui/app/components/app/modals/export-private-key-modal/export-private-key-modal.component.js b/ui/components/app/modals/export-private-key-modal/export-private-key-modal.component.js similarity index 98% rename from ui/app/components/app/modals/export-private-key-modal/export-private-key-modal.component.js rename to ui/components/app/modals/export-private-key-modal/export-private-key-modal.component.js index 4db92c4f5..ba6e4ca8b 100644 --- a/ui/app/components/app/modals/export-private-key-modal/export-private-key-modal.component.js +++ b/ui/components/app/modals/export-private-key-modal/export-private-key-modal.component.js @@ -7,7 +7,7 @@ import copyToClipboard from 'copy-to-clipboard'; import ReadOnlyInput from '../../../ui/readonly-input'; import Button from '../../../ui/button'; import AccountModalContainer from '../account-modal-container'; -import { toChecksumHexAddress } from '../../../../../../shared/modules/hexstring-utils'; +import { toChecksumHexAddress } from '../../../../../shared/modules/hexstring-utils'; export default class ExportPrivateKeyModal extends Component { static contextTypes = { diff --git a/ui/app/components/app/modals/export-private-key-modal/export-private-key-modal.container.js b/ui/components/app/modals/export-private-key-modal/export-private-key-modal.container.js similarity index 100% rename from ui/app/components/app/modals/export-private-key-modal/export-private-key-modal.container.js rename to ui/components/app/modals/export-private-key-modal/export-private-key-modal.container.js diff --git a/ui/app/components/app/modals/export-private-key-modal/index.js b/ui/components/app/modals/export-private-key-modal/index.js similarity index 100% rename from ui/app/components/app/modals/export-private-key-modal/index.js rename to ui/components/app/modals/export-private-key-modal/index.js diff --git a/ui/app/components/app/modals/export-private-key-modal/index.scss b/ui/components/app/modals/export-private-key-modal/index.scss similarity index 100% rename from ui/app/components/app/modals/export-private-key-modal/index.scss rename to ui/components/app/modals/export-private-key-modal/index.scss diff --git a/ui/app/components/app/modals/fade-modal.js b/ui/components/app/modals/fade-modal.js similarity index 100% rename from ui/app/components/app/modals/fade-modal.js rename to ui/components/app/modals/fade-modal.js diff --git a/ui/app/components/app/modals/hide-token-confirmation-modal/hide-token-confirmation-modal.js b/ui/components/app/modals/hide-token-confirmation-modal/hide-token-confirmation-modal.js similarity index 100% rename from ui/app/components/app/modals/hide-token-confirmation-modal/hide-token-confirmation-modal.js rename to ui/components/app/modals/hide-token-confirmation-modal/hide-token-confirmation-modal.js diff --git a/ui/app/components/app/modals/hide-token-confirmation-modal/index.js b/ui/components/app/modals/hide-token-confirmation-modal/index.js similarity index 100% rename from ui/app/components/app/modals/hide-token-confirmation-modal/index.js rename to ui/components/app/modals/hide-token-confirmation-modal/index.js diff --git a/ui/app/components/app/modals/hide-token-confirmation-modal/index.scss b/ui/components/app/modals/hide-token-confirmation-modal/index.scss similarity index 100% rename from ui/app/components/app/modals/hide-token-confirmation-modal/index.scss rename to ui/components/app/modals/hide-token-confirmation-modal/index.scss diff --git a/ui/app/components/app/modals/index.js b/ui/components/app/modals/index.js similarity index 100% rename from ui/app/components/app/modals/index.js rename to ui/components/app/modals/index.js diff --git a/ui/app/components/app/modals/index.scss b/ui/components/app/modals/index.scss similarity index 100% rename from ui/app/components/app/modals/index.scss rename to ui/components/app/modals/index.scss diff --git a/ui/app/components/app/modals/loading-network-error/index.js b/ui/components/app/modals/loading-network-error/index.js similarity index 100% rename from ui/app/components/app/modals/loading-network-error/index.js rename to ui/components/app/modals/loading-network-error/index.js diff --git a/ui/app/components/app/modals/loading-network-error/loading-network-error.component.js b/ui/components/app/modals/loading-network-error/loading-network-error.component.js similarity index 100% rename from ui/app/components/app/modals/loading-network-error/loading-network-error.component.js rename to ui/components/app/modals/loading-network-error/loading-network-error.component.js diff --git a/ui/app/components/app/modals/loading-network-error/loading-network-error.container.js b/ui/components/app/modals/loading-network-error/loading-network-error.container.js similarity index 100% rename from ui/app/components/app/modals/loading-network-error/loading-network-error.container.js rename to ui/components/app/modals/loading-network-error/loading-network-error.container.js diff --git a/ui/app/components/app/modals/metametrics-opt-in-modal/index.js b/ui/components/app/modals/metametrics-opt-in-modal/index.js similarity index 100% rename from ui/app/components/app/modals/metametrics-opt-in-modal/index.js rename to ui/components/app/modals/metametrics-opt-in-modal/index.js diff --git a/ui/app/components/app/modals/metametrics-opt-in-modal/index.scss b/ui/components/app/modals/metametrics-opt-in-modal/index.scss similarity index 100% rename from ui/app/components/app/modals/metametrics-opt-in-modal/index.scss rename to ui/components/app/modals/metametrics-opt-in-modal/index.scss diff --git a/ui/app/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.component.js b/ui/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.component.js similarity index 100% rename from ui/app/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.component.js rename to ui/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.component.js diff --git a/ui/app/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.container.js b/ui/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.container.js similarity index 100% rename from ui/app/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.container.js rename to ui/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.container.js diff --git a/ui/app/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.test.js b/ui/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.test.js similarity index 95% rename from ui/app/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.test.js rename to ui/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.test.js index fc45751b5..7b90b24ff 100644 --- a/ui/app/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.test.js +++ b/ui/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.test.js @@ -1,7 +1,7 @@ import React from 'react'; import sinon from 'sinon'; import { mount } from 'enzyme'; -import messages from '../../../../../../app/_locales/en/messages.json'; +import messages from '../../../../../app/_locales/en/messages.json'; import MetaMetricsOptIn from './metametrics-opt-in-modal.container'; describe('MetaMetrics Opt In', () => { diff --git a/ui/app/components/app/modals/modal.js b/ui/components/app/modals/modal.js similarity index 98% rename from ui/app/components/app/modals/modal.js rename to ui/components/app/modals/modal.js index 74373354c..ce4282df3 100644 --- a/ui/app/components/app/modals/modal.js +++ b/ui/components/app/modals/modal.js @@ -4,9 +4,9 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import * as actions from '../../../store/actions'; import { resetCustomData as resetCustomGasData } from '../../../ducks/gas/gas.duck'; -import isMobileView from '../../../../lib/is-mobile-view'; -import { getEnvironmentType } from '../../../../../app/scripts/lib/util'; -import { ENVIRONMENT_TYPE_POPUP } from '../../../../../shared/constants/app'; +import isMobileView from '../../../helpers/utils/is-mobile-view'; +import { getEnvironmentType } from '../../../../app/scripts/lib/util'; +import { ENVIRONMENT_TYPE_POPUP } from '../../../../shared/constants/app'; // Modal Components import ConfirmCustomizeGasModal from '../gas-customization/gas-modal-page-container'; diff --git a/ui/app/components/app/modals/new-account-modal/index.js b/ui/components/app/modals/new-account-modal/index.js similarity index 100% rename from ui/app/components/app/modals/new-account-modal/index.js rename to ui/components/app/modals/new-account-modal/index.js diff --git a/ui/app/components/app/modals/new-account-modal/index.scss b/ui/components/app/modals/new-account-modal/index.scss similarity index 100% rename from ui/app/components/app/modals/new-account-modal/index.scss rename to ui/components/app/modals/new-account-modal/index.scss diff --git a/ui/app/components/app/modals/new-account-modal/new-account-modal.component.js b/ui/components/app/modals/new-account-modal/new-account-modal.component.js similarity index 100% rename from ui/app/components/app/modals/new-account-modal/new-account-modal.component.js rename to ui/components/app/modals/new-account-modal/new-account-modal.component.js diff --git a/ui/app/components/app/modals/new-account-modal/new-account-modal.container.js b/ui/components/app/modals/new-account-modal/new-account-modal.container.js similarity index 100% rename from ui/app/components/app/modals/new-account-modal/new-account-modal.container.js rename to ui/components/app/modals/new-account-modal/new-account-modal.container.js diff --git a/ui/app/components/app/modals/qr-scanner/index.js b/ui/components/app/modals/qr-scanner/index.js similarity index 100% rename from ui/app/components/app/modals/qr-scanner/index.js rename to ui/components/app/modals/qr-scanner/index.js diff --git a/ui/app/components/app/modals/qr-scanner/index.scss b/ui/components/app/modals/qr-scanner/index.scss similarity index 100% rename from ui/app/components/app/modals/qr-scanner/index.scss rename to ui/components/app/modals/qr-scanner/index.scss diff --git a/ui/app/components/app/modals/qr-scanner/qr-scanner.component.js b/ui/components/app/modals/qr-scanner/qr-scanner.component.js similarity index 97% rename from ui/app/components/app/modals/qr-scanner/qr-scanner.component.js rename to ui/components/app/modals/qr-scanner/qr-scanner.component.js index 7ca6a5089..6cad31f6e 100644 --- a/ui/app/components/app/modals/qr-scanner/qr-scanner.component.js +++ b/ui/components/app/modals/qr-scanner/qr-scanner.component.js @@ -2,10 +2,10 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import log from 'loglevel'; import { BrowserQRCodeReader } from '@zxing/library'; -import { getEnvironmentType } from '../../../../../../app/scripts/lib/util'; -import { ENVIRONMENT_TYPE_FULLSCREEN } from '../../../../../../shared/constants/app'; +import { getEnvironmentType } from '../../../../../app/scripts/lib/util'; +import { ENVIRONMENT_TYPE_FULLSCREEN } from '../../../../../shared/constants/app'; import Spinner from '../../../ui/spinner'; -import WebcamUtils from '../../../../../lib/webcam-utils'; +import WebcamUtils from '../../../../helpers/utils/webcam-utils'; import PageContainerFooter from '../../../ui/page-container/page-container-footer/page-container-footer.component'; const READY_STATE = { diff --git a/ui/app/components/app/modals/qr-scanner/qr-scanner.container.js b/ui/components/app/modals/qr-scanner/qr-scanner.container.js similarity index 100% rename from ui/app/components/app/modals/qr-scanner/qr-scanner.container.js rename to ui/components/app/modals/qr-scanner/qr-scanner.container.js diff --git a/ui/app/components/app/modals/reject-transactions/index.js b/ui/components/app/modals/reject-transactions/index.js similarity index 100% rename from ui/app/components/app/modals/reject-transactions/index.js rename to ui/components/app/modals/reject-transactions/index.js diff --git a/ui/app/components/app/modals/reject-transactions/index.scss b/ui/components/app/modals/reject-transactions/index.scss similarity index 100% rename from ui/app/components/app/modals/reject-transactions/index.scss rename to ui/components/app/modals/reject-transactions/index.scss diff --git a/ui/app/components/app/modals/reject-transactions/reject-transactions.component.js b/ui/components/app/modals/reject-transactions/reject-transactions.component.js similarity index 100% rename from ui/app/components/app/modals/reject-transactions/reject-transactions.component.js rename to ui/components/app/modals/reject-transactions/reject-transactions.component.js diff --git a/ui/app/components/app/modals/reject-transactions/reject-transactions.container.js b/ui/components/app/modals/reject-transactions/reject-transactions.container.js similarity index 100% rename from ui/app/components/app/modals/reject-transactions/reject-transactions.container.js rename to ui/components/app/modals/reject-transactions/reject-transactions.container.js diff --git a/ui/app/components/app/modals/reject-transactions/reject-transactions.test.js b/ui/components/app/modals/reject-transactions/reject-transactions.test.js similarity index 100% rename from ui/app/components/app/modals/reject-transactions/reject-transactions.test.js rename to ui/components/app/modals/reject-transactions/reject-transactions.test.js diff --git a/ui/app/components/app/modals/transaction-confirmed/index.js b/ui/components/app/modals/transaction-confirmed/index.js similarity index 100% rename from ui/app/components/app/modals/transaction-confirmed/index.js rename to ui/components/app/modals/transaction-confirmed/index.js diff --git a/ui/app/components/app/modals/transaction-confirmed/index.scss b/ui/components/app/modals/transaction-confirmed/index.scss similarity index 100% rename from ui/app/components/app/modals/transaction-confirmed/index.scss rename to ui/components/app/modals/transaction-confirmed/index.scss diff --git a/ui/app/components/app/modals/transaction-confirmed/transaction-confirmed.component.js b/ui/components/app/modals/transaction-confirmed/transaction-confirmed.component.js similarity index 100% rename from ui/app/components/app/modals/transaction-confirmed/transaction-confirmed.component.js rename to ui/components/app/modals/transaction-confirmed/transaction-confirmed.component.js diff --git a/ui/app/components/app/modals/transaction-confirmed/transaction-confirmed.container.js b/ui/components/app/modals/transaction-confirmed/transaction-confirmed.container.js similarity index 100% rename from ui/app/components/app/modals/transaction-confirmed/transaction-confirmed.container.js rename to ui/components/app/modals/transaction-confirmed/transaction-confirmed.container.js diff --git a/ui/app/components/app/modals/transaction-confirmed/transaction-confirmed.test.js b/ui/components/app/modals/transaction-confirmed/transaction-confirmed.test.js similarity index 100% rename from ui/app/components/app/modals/transaction-confirmed/transaction-confirmed.test.js rename to ui/components/app/modals/transaction-confirmed/transaction-confirmed.test.js diff --git a/ui/app/components/app/multiple-notifications/index.js b/ui/components/app/multiple-notifications/index.js similarity index 100% rename from ui/app/components/app/multiple-notifications/index.js rename to ui/components/app/multiple-notifications/index.js diff --git a/ui/app/components/app/multiple-notifications/index.scss b/ui/components/app/multiple-notifications/index.scss similarity index 100% rename from ui/app/components/app/multiple-notifications/index.scss rename to ui/components/app/multiple-notifications/index.scss diff --git a/ui/app/components/app/multiple-notifications/multiple-notifications.component.js b/ui/components/app/multiple-notifications/multiple-notifications.component.js similarity index 100% rename from ui/app/components/app/multiple-notifications/multiple-notifications.component.js rename to ui/components/app/multiple-notifications/multiple-notifications.component.js diff --git a/ui/app/components/app/network-display/index.js b/ui/components/app/network-display/index.js similarity index 100% rename from ui/app/components/app/network-display/index.js rename to ui/components/app/network-display/index.js diff --git a/ui/app/components/app/network-display/index.scss b/ui/components/app/network-display/index.scss similarity index 100% rename from ui/app/components/app/network-display/index.scss rename to ui/components/app/network-display/index.scss diff --git a/ui/app/components/app/network-display/network-display.js b/ui/components/app/network-display/network-display.js similarity index 98% rename from ui/app/components/app/network-display/network-display.js rename to ui/components/app/network-display/network-display.js index ba83bb5c9..87b851535 100644 --- a/ui/app/components/app/network-display/network-display.js +++ b/ui/components/app/network-display/network-display.js @@ -5,7 +5,7 @@ import { useSelector } from 'react-redux'; import { NETWORK_TYPE_RPC, NETWORK_TYPE_TO_ID_MAP, -} from '../../../../../shared/constants/network'; +} from '../../../../shared/constants/network'; import LoadingIndicator from '../../ui/loading-indicator'; import ColorIndicator from '../../ui/color-indicator'; diff --git a/ui/app/components/app/permission-page-container/index.js b/ui/components/app/permission-page-container/index.js similarity index 100% rename from ui/app/components/app/permission-page-container/index.js rename to ui/components/app/permission-page-container/index.js diff --git a/ui/app/components/app/permission-page-container/index.scss b/ui/components/app/permission-page-container/index.scss similarity index 100% rename from ui/app/components/app/permission-page-container/index.scss rename to ui/components/app/permission-page-container/index.scss diff --git a/ui/app/components/app/permission-page-container/permission-page-container-content/index.js b/ui/components/app/permission-page-container/permission-page-container-content/index.js similarity index 100% rename from ui/app/components/app/permission-page-container/permission-page-container-content/index.js rename to ui/components/app/permission-page-container/permission-page-container-content/index.js diff --git a/ui/app/components/app/permission-page-container/permission-page-container-content/permission-page-container-content.component.js b/ui/components/app/permission-page-container/permission-page-container-content/permission-page-container-content.component.js similarity index 100% rename from ui/app/components/app/permission-page-container/permission-page-container-content/permission-page-container-content.component.js rename to ui/components/app/permission-page-container/permission-page-container-content/permission-page-container-content.component.js diff --git a/ui/app/components/app/permission-page-container/permission-page-container.component.js b/ui/components/app/permission-page-container/permission-page-container.component.js similarity index 100% rename from ui/app/components/app/permission-page-container/permission-page-container.component.js rename to ui/components/app/permission-page-container/permission-page-container.component.js diff --git a/ui/app/components/app/permission-page-container/permission-page-container.container.js b/ui/components/app/permission-page-container/permission-page-container.container.js similarity index 100% rename from ui/app/components/app/permission-page-container/permission-page-container.container.js rename to ui/components/app/permission-page-container/permission-page-container.container.js diff --git a/ui/app/components/app/permissions-connect-footer/index.js b/ui/components/app/permissions-connect-footer/index.js similarity index 100% rename from ui/app/components/app/permissions-connect-footer/index.js rename to ui/components/app/permissions-connect-footer/index.js diff --git a/ui/app/components/app/permissions-connect-footer/index.scss b/ui/components/app/permissions-connect-footer/index.scss similarity index 100% rename from ui/app/components/app/permissions-connect-footer/index.scss rename to ui/components/app/permissions-connect-footer/index.scss diff --git a/ui/app/components/app/permissions-connect-footer/permissions-connect-footer.component.js b/ui/components/app/permissions-connect-footer/permissions-connect-footer.component.js similarity index 100% rename from ui/app/components/app/permissions-connect-footer/permissions-connect-footer.component.js rename to ui/components/app/permissions-connect-footer/permissions-connect-footer.component.js diff --git a/ui/app/components/app/permissions-connect-header/index.js b/ui/components/app/permissions-connect-header/index.js similarity index 100% rename from ui/app/components/app/permissions-connect-header/index.js rename to ui/components/app/permissions-connect-header/index.js diff --git a/ui/app/components/app/permissions-connect-header/index.scss b/ui/components/app/permissions-connect-header/index.scss similarity index 100% rename from ui/app/components/app/permissions-connect-header/index.scss rename to ui/components/app/permissions-connect-header/index.scss diff --git a/ui/app/components/app/permissions-connect-header/permissions-connect-header.component.js b/ui/components/app/permissions-connect-header/permissions-connect-header.component.js similarity index 100% rename from ui/app/components/app/permissions-connect-header/permissions-connect-header.component.js rename to ui/components/app/permissions-connect-header/permissions-connect-header.component.js diff --git a/ui/app/components/app/selected-account/index.js b/ui/components/app/selected-account/index.js similarity index 100% rename from ui/app/components/app/selected-account/index.js rename to ui/components/app/selected-account/index.js diff --git a/ui/app/components/app/selected-account/index.scss b/ui/components/app/selected-account/index.scss similarity index 100% rename from ui/app/components/app/selected-account/index.scss rename to ui/components/app/selected-account/index.scss diff --git a/ui/app/components/app/selected-account/selected-account-component.test.js b/ui/components/app/selected-account/selected-account-component.test.js similarity index 100% rename from ui/app/components/app/selected-account/selected-account-component.test.js rename to ui/components/app/selected-account/selected-account-component.test.js diff --git a/ui/app/components/app/selected-account/selected-account.component.js b/ui/components/app/selected-account/selected-account.component.js similarity index 95% rename from ui/app/components/app/selected-account/selected-account.component.js rename to ui/components/app/selected-account/selected-account.component.js index 40d8c2a4e..b52dd033f 100644 --- a/ui/app/components/app/selected-account/selected-account.component.js +++ b/ui/components/app/selected-account/selected-account.component.js @@ -4,7 +4,7 @@ import copyToClipboard from 'copy-to-clipboard'; import { shortenAddress } from '../../../helpers/utils/util'; import Tooltip from '../../ui/tooltip'; -import { toChecksumHexAddress } from '../../../../../shared/modules/hexstring-utils'; +import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils'; class SelectedAccount extends Component { state = { diff --git a/ui/app/components/app/selected-account/selected-account.container.js b/ui/components/app/selected-account/selected-account.container.js similarity index 100% rename from ui/app/components/app/selected-account/selected-account.container.js rename to ui/components/app/selected-account/selected-account.container.js diff --git a/ui/app/components/app/sidebars/index.js b/ui/components/app/sidebars/index.js similarity index 100% rename from ui/app/components/app/sidebars/index.js rename to ui/components/app/sidebars/index.js diff --git a/ui/app/components/app/sidebars/index.scss b/ui/components/app/sidebars/index.scss similarity index 100% rename from ui/app/components/app/sidebars/index.scss rename to ui/components/app/sidebars/index.scss diff --git a/ui/app/components/app/sidebars/sidebar-content.scss b/ui/components/app/sidebars/sidebar-content.scss similarity index 100% rename from ui/app/components/app/sidebars/sidebar-content.scss rename to ui/components/app/sidebars/sidebar-content.scss diff --git a/ui/app/components/app/sidebars/sidebar.component.js b/ui/components/app/sidebars/sidebar.component.js similarity index 100% rename from ui/app/components/app/sidebars/sidebar.component.js rename to ui/components/app/sidebars/sidebar.component.js diff --git a/ui/app/components/app/sidebars/sidebar.component.test.js b/ui/components/app/sidebars/sidebar.component.test.js similarity index 100% rename from ui/app/components/app/sidebars/sidebar.component.test.js rename to ui/components/app/sidebars/sidebar.component.test.js diff --git a/ui/app/components/app/signature-request-original/index.js b/ui/components/app/signature-request-original/index.js similarity index 100% rename from ui/app/components/app/signature-request-original/index.js rename to ui/components/app/signature-request-original/index.js diff --git a/ui/app/components/app/signature-request-original/index.scss b/ui/components/app/signature-request-original/index.scss similarity index 100% rename from ui/app/components/app/signature-request-original/index.scss rename to ui/components/app/signature-request-original/index.scss diff --git a/ui/app/components/app/signature-request-original/signature-request-original.component.js b/ui/components/app/signature-request-original/signature-request-original.component.js similarity index 98% rename from ui/app/components/app/signature-request-original/signature-request-original.component.js rename to ui/components/app/signature-request-original/signature-request-original.component.js index ae62fcad9..07ef225cc 100644 --- a/ui/app/components/app/signature-request-original/signature-request-original.component.js +++ b/ui/components/app/signature-request-original/signature-request-original.component.js @@ -7,8 +7,8 @@ import { ObjectInspector } from 'react-inspector'; import { ENVIRONMENT_TYPE_NOTIFICATION, MESSAGE_TYPE, -} from '../../../../../shared/constants/app'; -import { getEnvironmentType } from '../../../../../app/scripts/lib/util'; +} from '../../../../shared/constants/app'; +import { getEnvironmentType } from '../../../../app/scripts/lib/util'; import Identicon from '../../ui/identicon'; import AccountListItem from '../account-list-item'; import { conversionUtil } from '../../../helpers/utils/conversion-util'; diff --git a/ui/app/components/app/signature-request-original/signature-request-original.container.js b/ui/components/app/signature-request-original/signature-request-original.container.js similarity index 96% rename from ui/app/components/app/signature-request-original/signature-request-original.container.js rename to ui/components/app/signature-request-original/signature-request-original.container.js index c32e30d66..f6181cc5b 100644 --- a/ui/app/components/app/signature-request-original/signature-request-original.container.js +++ b/ui/components/app/signature-request-original/signature-request-original.container.js @@ -2,7 +2,7 @@ import { connect } from 'react-redux'; import { compose } from 'redux'; import { withRouter } from 'react-router-dom'; -import { MESSAGE_TYPE } from '../../../../../shared/constants/app'; +import { MESSAGE_TYPE } from '../../../../shared/constants/app'; import { goHome } from '../../../store/actions'; import { accountsWithSendEtherInfoSelector, diff --git a/ui/app/components/app/signature-request/index.js b/ui/components/app/signature-request/index.js similarity index 100% rename from ui/app/components/app/signature-request/index.js rename to ui/components/app/signature-request/index.js diff --git a/ui/app/components/app/signature-request/index.scss b/ui/components/app/signature-request/index.scss similarity index 100% rename from ui/app/components/app/signature-request/index.scss rename to ui/components/app/signature-request/index.scss diff --git a/ui/app/components/app/signature-request/signature-request-footer/index.js b/ui/components/app/signature-request/signature-request-footer/index.js similarity index 100% rename from ui/app/components/app/signature-request/signature-request-footer/index.js rename to ui/components/app/signature-request/signature-request-footer/index.js diff --git a/ui/app/components/app/signature-request/signature-request-footer/index.scss b/ui/components/app/signature-request/signature-request-footer/index.scss similarity index 100% rename from ui/app/components/app/signature-request/signature-request-footer/index.scss rename to ui/components/app/signature-request/signature-request-footer/index.scss diff --git a/ui/app/components/app/signature-request/signature-request-footer/signature-request-footer.component.js b/ui/components/app/signature-request/signature-request-footer/signature-request-footer.component.js similarity index 100% rename from ui/app/components/app/signature-request/signature-request-footer/signature-request-footer.component.js rename to ui/components/app/signature-request/signature-request-footer/signature-request-footer.component.js diff --git a/ui/app/components/app/signature-request/signature-request-header/index.js b/ui/components/app/signature-request/signature-request-header/index.js similarity index 100% rename from ui/app/components/app/signature-request/signature-request-header/index.js rename to ui/components/app/signature-request/signature-request-header/index.js diff --git a/ui/app/components/app/signature-request/signature-request-header/index.scss b/ui/components/app/signature-request/signature-request-header/index.scss similarity index 100% rename from ui/app/components/app/signature-request/signature-request-header/index.scss rename to ui/components/app/signature-request/signature-request-header/index.scss diff --git a/ui/app/components/app/signature-request/signature-request-header/signature-request-header.component.js b/ui/components/app/signature-request/signature-request-header/signature-request-header.component.js similarity index 100% rename from ui/app/components/app/signature-request/signature-request-header/signature-request-header.component.js rename to ui/components/app/signature-request/signature-request-header/signature-request-header.component.js diff --git a/ui/app/components/app/signature-request/signature-request-message/index.js b/ui/components/app/signature-request/signature-request-message/index.js similarity index 100% rename from ui/app/components/app/signature-request/signature-request-message/index.js rename to ui/components/app/signature-request/signature-request-message/index.js diff --git a/ui/app/components/app/signature-request/signature-request-message/index.scss b/ui/components/app/signature-request/signature-request-message/index.scss similarity index 100% rename from ui/app/components/app/signature-request/signature-request-message/index.scss rename to ui/components/app/signature-request/signature-request-message/index.scss diff --git a/ui/app/components/app/signature-request/signature-request-message/signature-request-message.component.js b/ui/components/app/signature-request/signature-request-message/signature-request-message.component.js similarity index 100% rename from ui/app/components/app/signature-request/signature-request-message/signature-request-message.component.js rename to ui/components/app/signature-request/signature-request-message/signature-request-message.component.js diff --git a/ui/app/components/app/signature-request/signature-request.component.js b/ui/components/app/signature-request/signature-request.component.js similarity index 97% rename from ui/app/components/app/signature-request/signature-request.component.js rename to ui/components/app/signature-request/signature-request.component.js index 9515ac02a..f19d077ae 100644 --- a/ui/app/components/app/signature-request/signature-request.component.js +++ b/ui/components/app/signature-request/signature-request.component.js @@ -1,6 +1,6 @@ import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; -import { getEnvironmentType } from '../../../../../app/scripts/lib/util'; +import { getEnvironmentType } from '../../../../app/scripts/lib/util'; import Identicon from '../../ui/identicon'; import Header from './signature-request-header'; import Footer from './signature-request-footer'; diff --git a/ui/app/components/app/signature-request/signature-request.component.test.js b/ui/components/app/signature-request/signature-request.component.test.js similarity index 87% rename from ui/app/components/app/signature-request/signature-request.component.test.js rename to ui/components/app/signature-request/signature-request.component.test.js index 1afa1b98c..12da052ff 100644 --- a/ui/app/components/app/signature-request/signature-request.component.test.js +++ b/ui/components/app/signature-request/signature-request.component.test.js @@ -1,12 +1,12 @@ import React from 'react'; -import shallow from '../../../../lib/shallow-with-context'; +import { shallowWithContext } from '../../../../test/lib/render-helpers'; import SignatureRequest from './signature-request.component'; describe('Signature Request Component', () => { describe('render', () => { const fromAddress = '0x123456789abcdef'; it('should render a div with one child', () => { - const wrapper = shallow( + const wrapper = shallowWithContext( undefined} cancel={() => undefined} diff --git a/ui/components/app/signature-request/signature-request.constants.js b/ui/components/app/signature-request/signature-request.constants.js new file mode 100644 index 000000000..e17841a0c --- /dev/null +++ b/ui/components/app/signature-request/signature-request.constants.js @@ -0,0 +1,3 @@ +import { ENVIRONMENT_TYPE_NOTIFICATION } from '../../../../shared/constants/app'; + +export { ENVIRONMENT_TYPE_NOTIFICATION }; diff --git a/ui/app/components/app/signature-request/signature-request.container.js b/ui/components/app/signature-request/signature-request.container.js similarity index 95% rename from ui/app/components/app/signature-request/signature-request.container.js rename to ui/components/app/signature-request/signature-request.container.js index 4c45a256d..2d3546720 100644 --- a/ui/app/components/app/signature-request/signature-request.container.js +++ b/ui/components/app/signature-request/signature-request.container.js @@ -2,7 +2,7 @@ import { connect } from 'react-redux'; import { clearConfirmTransaction } from '../../../ducks/confirm-transaction/confirm-transaction.duck'; import { accountsWithSendEtherInfoSelector } from '../../../selectors'; import { getAccountByAddress } from '../../../helpers/utils/util'; -import { MESSAGE_TYPE } from '../../../../../shared/constants/app'; +import { MESSAGE_TYPE } from '../../../../shared/constants/app'; import SignatureRequest from './signature-request.component'; function mapStateToProps(state) { diff --git a/ui/app/components/app/signature-request/signature-request.container.test.js b/ui/components/app/signature-request/signature-request.container.test.js similarity index 97% rename from ui/app/components/app/signature-request/signature-request.container.test.js rename to ui/components/app/signature-request/signature-request.container.test.js index c4de25b1a..c0bc03540 100644 --- a/ui/app/components/app/signature-request/signature-request.container.test.js +++ b/ui/components/app/signature-request/signature-request.container.test.js @@ -2,7 +2,7 @@ import React from 'react'; import { Provider } from 'react-redux'; import sinon from 'sinon'; import configureMockStore from 'redux-mock-store'; -import { mountWithRouter } from '../../../../../test/lib/render-helpers'; +import { mountWithRouter } from '../../../../test/lib/render-helpers'; import SignatureRequest from './signature-request.container'; describe('Signature Request', () => { diff --git a/ui/app/components/app/signature-request/signature-request.stories.js b/ui/components/app/signature-request/signature-request.stories.js similarity index 93% rename from ui/app/components/app/signature-request/signature-request.stories.js rename to ui/components/app/signature-request/signature-request.stories.js index fd121cc86..1590f84e1 100644 --- a/ui/app/components/app/signature-request/signature-request.stories.js +++ b/ui/components/app/signature-request/signature-request.stories.js @@ -1,5 +1,5 @@ import React from 'react'; -import testData from '../../../../../.storybook/test-data'; +import testData from '../../../../.storybook/test-data'; import SignatureRequest from './signature-request.component'; const primaryIdentity = Object.values(testData.metamask.identities)[0]; diff --git a/ui/app/components/app/tab-bar/index.js b/ui/components/app/tab-bar/index.js similarity index 100% rename from ui/app/components/app/tab-bar/index.js rename to ui/components/app/tab-bar/index.js diff --git a/ui/app/components/app/tab-bar/index.scss b/ui/components/app/tab-bar/index.scss similarity index 100% rename from ui/app/components/app/tab-bar/index.scss rename to ui/components/app/tab-bar/index.scss diff --git a/ui/app/components/app/tab-bar/tab-bar.js b/ui/components/app/tab-bar/tab-bar.js similarity index 100% rename from ui/app/components/app/tab-bar/tab-bar.js rename to ui/components/app/tab-bar/tab-bar.js diff --git a/ui/app/components/app/token-cell/index.js b/ui/components/app/token-cell/index.js similarity index 100% rename from ui/app/components/app/token-cell/index.js rename to ui/components/app/token-cell/index.js diff --git a/ui/app/components/app/token-cell/token-cell.js b/ui/components/app/token-cell/token-cell.js similarity index 100% rename from ui/app/components/app/token-cell/token-cell.js rename to ui/components/app/token-cell/token-cell.js diff --git a/ui/app/components/app/token-cell/token-cell.scss b/ui/components/app/token-cell/token-cell.scss similarity index 100% rename from ui/app/components/app/token-cell/token-cell.scss rename to ui/components/app/token-cell/token-cell.scss diff --git a/ui/app/components/app/token-cell/token-cell.test.js b/ui/components/app/token-cell/token-cell.test.js similarity index 100% rename from ui/app/components/app/token-cell/token-cell.test.js rename to ui/components/app/token-cell/token-cell.test.js diff --git a/ui/app/components/app/token-list/index.js b/ui/components/app/token-list/index.js similarity index 100% rename from ui/app/components/app/token-list/index.js rename to ui/components/app/token-list/index.js diff --git a/ui/app/components/app/token-list/token-list.js b/ui/components/app/token-list/token-list.js similarity index 100% rename from ui/app/components/app/token-list/token-list.js rename to ui/components/app/token-list/token-list.js diff --git a/ui/app/components/app/transaction-activity-log/index.js b/ui/components/app/transaction-activity-log/index.js similarity index 100% rename from ui/app/components/app/transaction-activity-log/index.js rename to ui/components/app/transaction-activity-log/index.js diff --git a/ui/app/components/app/transaction-activity-log/index.scss b/ui/components/app/transaction-activity-log/index.scss similarity index 100% rename from ui/app/components/app/transaction-activity-log/index.scss rename to ui/components/app/transaction-activity-log/index.scss diff --git a/ui/app/components/app/transaction-activity-log/transaction-activity-log-icon/index.js b/ui/components/app/transaction-activity-log/transaction-activity-log-icon/index.js similarity index 100% rename from ui/app/components/app/transaction-activity-log/transaction-activity-log-icon/index.js rename to ui/components/app/transaction-activity-log/transaction-activity-log-icon/index.js diff --git a/ui/app/components/app/transaction-activity-log/transaction-activity-log-icon/transaction-activity-log-icon.component.js b/ui/components/app/transaction-activity-log/transaction-activity-log-icon/transaction-activity-log-icon.component.js similarity index 100% rename from ui/app/components/app/transaction-activity-log/transaction-activity-log-icon/transaction-activity-log-icon.component.js rename to ui/components/app/transaction-activity-log/transaction-activity-log-icon/transaction-activity-log-icon.component.js diff --git a/ui/app/components/app/transaction-activity-log/transaction-activity-log.component.js b/ui/components/app/transaction-activity-log/transaction-activity-log.component.js similarity index 97% rename from ui/app/components/app/transaction-activity-log/transaction-activity-log.component.js rename to ui/components/app/transaction-activity-log/transaction-activity-log.component.js index 215932e9f..91fb987f8 100644 --- a/ui/app/components/app/transaction-activity-log/transaction-activity-log.component.js +++ b/ui/components/app/transaction-activity-log/transaction-activity-log.component.js @@ -7,7 +7,7 @@ import { getValueFromWeiHex, } from '../../../helpers/utils/conversions.util'; import { formatDate } from '../../../helpers/utils/util'; -import { getBlockExplorerUrlForTx } from '../../../../../shared/modules/transaction.utils'; +import { getBlockExplorerUrlForTx } from '../../../../shared/modules/transaction.utils'; import TransactionActivityLogIcon from './transaction-activity-log-icon'; import { CONFIRMED_STATUS } from './transaction-activity-log.constants'; diff --git a/ui/app/components/app/transaction-activity-log/transaction-activity-log.component.test.js b/ui/components/app/transaction-activity-log/transaction-activity-log.component.test.js similarity index 100% rename from ui/app/components/app/transaction-activity-log/transaction-activity-log.component.test.js rename to ui/components/app/transaction-activity-log/transaction-activity-log.component.test.js diff --git a/ui/app/components/app/transaction-activity-log/transaction-activity-log.constants.js b/ui/components/app/transaction-activity-log/transaction-activity-log.constants.js similarity index 100% rename from ui/app/components/app/transaction-activity-log/transaction-activity-log.constants.js rename to ui/components/app/transaction-activity-log/transaction-activity-log.constants.js diff --git a/ui/app/components/app/transaction-activity-log/transaction-activity-log.container.js b/ui/components/app/transaction-activity-log/transaction-activity-log.container.js similarity index 100% rename from ui/app/components/app/transaction-activity-log/transaction-activity-log.container.js rename to ui/components/app/transaction-activity-log/transaction-activity-log.container.js diff --git a/ui/app/components/app/transaction-activity-log/transaction-activity-log.container.test.js b/ui/components/app/transaction-activity-log/transaction-activity-log.container.test.js similarity index 100% rename from ui/app/components/app/transaction-activity-log/transaction-activity-log.container.test.js rename to ui/components/app/transaction-activity-log/transaction-activity-log.container.test.js diff --git a/ui/app/components/app/transaction-activity-log/transaction-activity-log.util.js b/ui/components/app/transaction-activity-log/transaction-activity-log.util.js similarity index 99% rename from ui/app/components/app/transaction-activity-log/transaction-activity-log.util.js rename to ui/components/app/transaction-activity-log/transaction-activity-log.util.js index 624e1027d..ee3d7ee0a 100644 --- a/ui/app/components/app/transaction-activity-log/transaction-activity-log.util.js +++ b/ui/components/app/transaction-activity-log/transaction-activity-log.util.js @@ -1,4 +1,4 @@ -import { TRANSACTION_TYPES } from '../../../../../shared/constants/transaction'; +import { TRANSACTION_TYPES } from '../../../../shared/constants/transaction'; import { getHexGasTotal } from '../../../helpers/utils/confirm-tx.util'; import { diff --git a/ui/app/components/app/transaction-activity-log/transaction-activity-log.util.test.js b/ui/components/app/transaction-activity-log/transaction-activity-log.util.test.js similarity index 99% rename from ui/app/components/app/transaction-activity-log/transaction-activity-log.util.test.js rename to ui/components/app/transaction-activity-log/transaction-activity-log.util.test.js index 16211afd4..af7adee79 100644 --- a/ui/app/components/app/transaction-activity-log/transaction-activity-log.util.test.js +++ b/ui/components/app/transaction-activity-log/transaction-activity-log.util.test.js @@ -1,11 +1,11 @@ import { ROPSTEN_CHAIN_ID, ROPSTEN_NETWORK_ID, -} from '../../../../../shared/constants/network'; +} from '../../../../shared/constants/network'; import { TRANSACTION_STATUSES, TRANSACTION_TYPES, -} from '../../../../../shared/constants/transaction'; +} from '../../../../shared/constants/transaction'; import { combineTransactionHistories, getActivities, diff --git a/ui/app/components/app/transaction-breakdown/index.js b/ui/components/app/transaction-breakdown/index.js similarity index 100% rename from ui/app/components/app/transaction-breakdown/index.js rename to ui/components/app/transaction-breakdown/index.js diff --git a/ui/app/components/app/transaction-breakdown/index.scss b/ui/components/app/transaction-breakdown/index.scss similarity index 100% rename from ui/app/components/app/transaction-breakdown/index.scss rename to ui/components/app/transaction-breakdown/index.scss diff --git a/ui/app/components/app/transaction-breakdown/transaction-breakdown-row/index.js b/ui/components/app/transaction-breakdown/transaction-breakdown-row/index.js similarity index 100% rename from ui/app/components/app/transaction-breakdown/transaction-breakdown-row/index.js rename to ui/components/app/transaction-breakdown/transaction-breakdown-row/index.js diff --git a/ui/app/components/app/transaction-breakdown/transaction-breakdown-row/index.scss b/ui/components/app/transaction-breakdown/transaction-breakdown-row/index.scss similarity index 100% rename from ui/app/components/app/transaction-breakdown/transaction-breakdown-row/index.scss rename to ui/components/app/transaction-breakdown/transaction-breakdown-row/index.scss diff --git a/ui/app/components/app/transaction-breakdown/transaction-breakdown-row/transaction-breakdown-row.component.js b/ui/components/app/transaction-breakdown/transaction-breakdown-row/transaction-breakdown-row.component.js similarity index 100% rename from ui/app/components/app/transaction-breakdown/transaction-breakdown-row/transaction-breakdown-row.component.js rename to ui/components/app/transaction-breakdown/transaction-breakdown-row/transaction-breakdown-row.component.js diff --git a/ui/app/components/app/transaction-breakdown/transaction-breakdown-row/transaction-breakdown-row.component.test.js b/ui/components/app/transaction-breakdown/transaction-breakdown-row/transaction-breakdown-row.component.test.js similarity index 100% rename from ui/app/components/app/transaction-breakdown/transaction-breakdown-row/transaction-breakdown-row.component.test.js rename to ui/components/app/transaction-breakdown/transaction-breakdown-row/transaction-breakdown-row.component.test.js diff --git a/ui/app/components/app/transaction-breakdown/transaction-breakdown.component.js b/ui/components/app/transaction-breakdown/transaction-breakdown.component.js similarity index 100% rename from ui/app/components/app/transaction-breakdown/transaction-breakdown.component.js rename to ui/components/app/transaction-breakdown/transaction-breakdown.component.js diff --git a/ui/app/components/app/transaction-breakdown/transaction-breakdown.component.test.js b/ui/components/app/transaction-breakdown/transaction-breakdown.component.test.js similarity index 91% rename from ui/app/components/app/transaction-breakdown/transaction-breakdown.component.test.js rename to ui/components/app/transaction-breakdown/transaction-breakdown.component.test.js index 9b34276db..fb7916c46 100644 --- a/ui/app/components/app/transaction-breakdown/transaction-breakdown.component.test.js +++ b/ui/components/app/transaction-breakdown/transaction-breakdown.component.test.js @@ -1,6 +1,6 @@ import React from 'react'; import { shallow } from 'enzyme'; -import { TRANSACTION_STATUSES } from '../../../../../shared/constants/transaction'; +import { TRANSACTION_STATUSES } from '../../../../shared/constants/transaction'; import TransactionBreakdown from './transaction-breakdown.component'; describe('TransactionBreakdown Component', () => { diff --git a/ui/app/components/app/transaction-breakdown/transaction-breakdown.container.js b/ui/components/app/transaction-breakdown/transaction-breakdown.container.js similarity index 100% rename from ui/app/components/app/transaction-breakdown/transaction-breakdown.container.js rename to ui/components/app/transaction-breakdown/transaction-breakdown.container.js diff --git a/ui/app/components/app/transaction-icon/index.js b/ui/components/app/transaction-icon/index.js similarity index 100% rename from ui/app/components/app/transaction-icon/index.js rename to ui/components/app/transaction-icon/index.js diff --git a/ui/app/components/app/transaction-icon/transaction-icon.js b/ui/components/app/transaction-icon/transaction-icon.js similarity index 97% rename from ui/app/components/app/transaction-icon/transaction-icon.js rename to ui/components/app/transaction-icon/transaction-icon.js index 1876e0535..ec1b2a605 100644 --- a/ui/app/components/app/transaction-icon/transaction-icon.js +++ b/ui/components/app/transaction-icon/transaction-icon.js @@ -11,7 +11,7 @@ import { TRANSACTION_GROUP_CATEGORIES, TRANSACTION_GROUP_STATUSES, TRANSACTION_STATUSES, -} from '../../../../../shared/constants/transaction'; +} from '../../../../shared/constants/transaction'; const ICON_MAP = { [TRANSACTION_GROUP_CATEGORIES.APPROVAL]: Approve, diff --git a/ui/app/components/app/transaction-icon/transaction-icon.scss b/ui/components/app/transaction-icon/transaction-icon.scss similarity index 100% rename from ui/app/components/app/transaction-icon/transaction-icon.scss rename to ui/components/app/transaction-icon/transaction-icon.scss diff --git a/ui/app/components/app/transaction-list-item-details/index.js b/ui/components/app/transaction-list-item-details/index.js similarity index 100% rename from ui/app/components/app/transaction-list-item-details/index.js rename to ui/components/app/transaction-list-item-details/index.js diff --git a/ui/app/components/app/transaction-list-item-details/index.scss b/ui/components/app/transaction-list-item-details/index.scss similarity index 100% rename from ui/app/components/app/transaction-list-item-details/index.scss rename to ui/components/app/transaction-list-item-details/index.scss diff --git a/ui/app/components/app/transaction-list-item-details/transaction-list-item-details.component.js b/ui/components/app/transaction-list-item-details/transaction-list-item-details.component.js similarity index 98% rename from ui/app/components/app/transaction-list-item-details/transaction-list-item-details.component.js rename to ui/components/app/transaction-list-item-details/transaction-list-item-details.component.js index c1256d7cb..c5f03eeb4 100644 --- a/ui/app/components/app/transaction-list-item-details/transaction-list-item-details.component.js +++ b/ui/components/app/transaction-list-item-details/transaction-list-item-details.component.js @@ -9,8 +9,8 @@ import Button from '../../ui/button'; import Tooltip from '../../ui/tooltip'; import Copy from '../../ui/icon/copy-icon.component'; import Popover from '../../ui/popover'; -import { getBlockExplorerUrlForTx } from '../../../../../shared/modules/transaction.utils'; -import { TRANSACTION_TYPES } from '../../../../../shared/constants/transaction'; +import { getBlockExplorerUrlForTx } from '../../../../shared/modules/transaction.utils'; +import { TRANSACTION_TYPES } from '../../../../shared/constants/transaction'; export default class TransactionListItemDetails extends PureComponent { static contextTypes = { diff --git a/ui/app/components/app/transaction-list-item-details/transaction-list-item-details.component.test.js b/ui/components/app/transaction-list-item-details/transaction-list-item-details.component.test.js similarity index 98% rename from ui/app/components/app/transaction-list-item-details/transaction-list-item-details.component.test.js rename to ui/components/app/transaction-list-item-details/transaction-list-item-details.component.test.js index 42ac3c83b..409ca1092 100644 --- a/ui/app/components/app/transaction-list-item-details/transaction-list-item-details.component.test.js +++ b/ui/components/app/transaction-list-item-details/transaction-list-item-details.component.test.js @@ -4,7 +4,7 @@ import Button from '../../ui/button'; import SenderToRecipient from '../../ui/sender-to-recipient'; import TransactionBreakdown from '../transaction-breakdown'; import TransactionActivityLog from '../transaction-activity-log'; -import { TRANSACTION_STATUSES } from '../../../../../shared/constants/transaction'; +import { TRANSACTION_STATUSES } from '../../../../shared/constants/transaction'; import TransactionListItemDetails from './transaction-list-item-details.component'; describe('TransactionListItemDetails Component', () => { diff --git a/ui/app/components/app/transaction-list-item-details/transaction-list-item-details.container.js b/ui/components/app/transaction-list-item-details/transaction-list-item-details.container.js similarity index 94% rename from ui/app/components/app/transaction-list-item-details/transaction-list-item-details.container.js rename to ui/components/app/transaction-list-item-details/transaction-list-item-details.container.js index f1cbf6237..280cec020 100644 --- a/ui/app/components/app/transaction-list-item-details/transaction-list-item-details.container.js +++ b/ui/components/app/transaction-list-item-details/transaction-list-item-details.container.js @@ -4,7 +4,7 @@ import { getAddressBook, getRpcPrefsForCurrentProvider, } from '../../../selectors'; -import { toChecksumHexAddress } from '../../../../../shared/modules/hexstring-utils'; +import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils'; import TransactionListItemDetails from './transaction-list-item-details.component'; const mapStateToProps = (state, ownProps) => { diff --git a/ui/app/components/app/transaction-list-item/index.js b/ui/components/app/transaction-list-item/index.js similarity index 100% rename from ui/app/components/app/transaction-list-item/index.js rename to ui/components/app/transaction-list-item/index.js diff --git a/ui/app/components/app/transaction-list-item/index.scss b/ui/components/app/transaction-list-item/index.scss similarity index 100% rename from ui/app/components/app/transaction-list-item/index.scss rename to ui/components/app/transaction-list-item/index.scss diff --git a/ui/app/components/app/transaction-list-item/transaction-list-item.component.js b/ui/components/app/transaction-list-item/transaction-list-item.component.js similarity index 99% rename from ui/app/components/app/transaction-list-item/transaction-list-item.component.js rename to ui/components/app/transaction-list-item/transaction-list-item.component.js index d3f957904..98635cce4 100644 --- a/ui/app/components/app/transaction-list-item/transaction-list-item.component.js +++ b/ui/components/app/transaction-list-item/transaction-list-item.component.js @@ -17,7 +17,7 @@ import TransactionIcon from '../transaction-icon'; import { TRANSACTION_GROUP_CATEGORIES, TRANSACTION_STATUSES, -} from '../../../../../shared/constants/transaction'; +} from '../../../../shared/constants/transaction'; export default function TransactionListItem({ transactionGroup, diff --git a/ui/app/components/app/transaction-list/index.js b/ui/components/app/transaction-list/index.js similarity index 100% rename from ui/app/components/app/transaction-list/index.js rename to ui/components/app/transaction-list/index.js diff --git a/ui/app/components/app/transaction-list/index.scss b/ui/components/app/transaction-list/index.scss similarity index 100% rename from ui/app/components/app/transaction-list/index.scss rename to ui/components/app/transaction-list/index.scss diff --git a/ui/app/components/app/transaction-list/transaction-list.component.js b/ui/components/app/transaction-list/transaction-list.component.js similarity index 98% rename from ui/app/components/app/transaction-list/transaction-list.component.js rename to ui/components/app/transaction-list/transaction-list.component.js index 389a76025..6e05a40ea 100644 --- a/ui/app/components/app/transaction-list/transaction-list.component.js +++ b/ui/components/app/transaction-list/transaction-list.component.js @@ -10,8 +10,8 @@ import { useI18nContext } from '../../../hooks/useI18nContext'; import TransactionListItem from '../transaction-list-item'; import Button from '../../ui/button'; import { TOKEN_CATEGORY_HASH } from '../../../helpers/constants/transactions'; -import { SWAPS_CHAINID_CONTRACT_ADDRESS_MAP } from '../../../../../shared/constants/swaps'; -import { TRANSACTION_TYPES } from '../../../../../shared/constants/transaction'; +import { SWAPS_CHAINID_CONTRACT_ADDRESS_MAP } from '../../../../shared/constants/swaps'; +import { TRANSACTION_TYPES } from '../../../../shared/constants/transaction'; const PAGE_INCREMENT = 10; diff --git a/ui/app/components/app/transaction-status/index.js b/ui/components/app/transaction-status/index.js similarity index 100% rename from ui/app/components/app/transaction-status/index.js rename to ui/components/app/transaction-status/index.js diff --git a/ui/app/components/app/transaction-status/index.scss b/ui/components/app/transaction-status/index.scss similarity index 100% rename from ui/app/components/app/transaction-status/index.scss rename to ui/components/app/transaction-status/index.scss diff --git a/ui/app/components/app/transaction-status/transaction-status.component.js b/ui/components/app/transaction-status/transaction-status.component.js similarity index 97% rename from ui/app/components/app/transaction-status/transaction-status.component.js rename to ui/components/app/transaction-status/transaction-status.component.js index 6049a33a9..f8f5f8018 100644 --- a/ui/app/components/app/transaction-status/transaction-status.component.js +++ b/ui/components/app/transaction-status/transaction-status.component.js @@ -7,7 +7,7 @@ import { useI18nContext } from '../../../hooks/useI18nContext'; import { TRANSACTION_GROUP_STATUSES, TRANSACTION_STATUSES, -} from '../../../../../shared/constants/transaction'; +} from '../../../../shared/constants/transaction'; const QUEUED_PSEUDO_STATUS = 'queued'; diff --git a/ui/app/components/app/transaction-status/transaction-status.component.test.js b/ui/components/app/transaction-status/transaction-status.component.test.js similarity index 100% rename from ui/app/components/app/transaction-status/transaction-status.component.test.js rename to ui/components/app/transaction-status/transaction-status.component.test.js diff --git a/ui/app/components/app/user-preferenced-currency-display/index.js b/ui/components/app/user-preferenced-currency-display/index.js similarity index 100% rename from ui/app/components/app/user-preferenced-currency-display/index.js rename to ui/components/app/user-preferenced-currency-display/index.js diff --git a/ui/app/components/app/user-preferenced-currency-display/user-preferenced-currency-display.component.js b/ui/components/app/user-preferenced-currency-display/user-preferenced-currency-display.component.js similarity index 100% rename from ui/app/components/app/user-preferenced-currency-display/user-preferenced-currency-display.component.js rename to ui/components/app/user-preferenced-currency-display/user-preferenced-currency-display.component.js diff --git a/ui/app/components/app/user-preferenced-currency-display/user-preferenced-currency-display.component.test.js b/ui/components/app/user-preferenced-currency-display/user-preferenced-currency-display.component.test.js similarity index 100% rename from ui/app/components/app/user-preferenced-currency-display/user-preferenced-currency-display.component.test.js rename to ui/components/app/user-preferenced-currency-display/user-preferenced-currency-display.component.test.js diff --git a/ui/app/components/app/user-preferenced-currency-input/index.js b/ui/components/app/user-preferenced-currency-input/index.js similarity index 100% rename from ui/app/components/app/user-preferenced-currency-input/index.js rename to ui/components/app/user-preferenced-currency-input/index.js diff --git a/ui/app/components/app/user-preferenced-currency-input/user-preferenced-currency-input.component.js b/ui/components/app/user-preferenced-currency-input/user-preferenced-currency-input.component.js similarity index 100% rename from ui/app/components/app/user-preferenced-currency-input/user-preferenced-currency-input.component.js rename to ui/components/app/user-preferenced-currency-input/user-preferenced-currency-input.component.js diff --git a/ui/app/components/app/user-preferenced-currency-input/user-preferenced-currency-input.component.test.js b/ui/components/app/user-preferenced-currency-input/user-preferenced-currency-input.component.test.js similarity index 100% rename from ui/app/components/app/user-preferenced-currency-input/user-preferenced-currency-input.component.test.js rename to ui/components/app/user-preferenced-currency-input/user-preferenced-currency-input.component.test.js diff --git a/ui/app/components/app/user-preferenced-currency-input/user-preferenced-currency-input.container.js b/ui/components/app/user-preferenced-currency-input/user-preferenced-currency-input.container.js similarity index 100% rename from ui/app/components/app/user-preferenced-currency-input/user-preferenced-currency-input.container.js rename to ui/components/app/user-preferenced-currency-input/user-preferenced-currency-input.container.js diff --git a/ui/app/components/app/user-preferenced-currency-input/user-preferenced-currency-input.container.test.js b/ui/components/app/user-preferenced-currency-input/user-preferenced-currency-input.container.test.js similarity index 100% rename from ui/app/components/app/user-preferenced-currency-input/user-preferenced-currency-input.container.test.js rename to ui/components/app/user-preferenced-currency-input/user-preferenced-currency-input.container.test.js diff --git a/ui/app/components/app/user-preferenced-token-input/index.js b/ui/components/app/user-preferenced-token-input/index.js similarity index 100% rename from ui/app/components/app/user-preferenced-token-input/index.js rename to ui/components/app/user-preferenced-token-input/index.js diff --git a/ui/app/components/app/user-preferenced-token-input/user-preferenced-token-input.component.js b/ui/components/app/user-preferenced-token-input/user-preferenced-token-input.component.js similarity index 100% rename from ui/app/components/app/user-preferenced-token-input/user-preferenced-token-input.component.js rename to ui/components/app/user-preferenced-token-input/user-preferenced-token-input.component.js diff --git a/ui/app/components/app/user-preferenced-token-input/user-preferenced-token-input.component.test.js b/ui/components/app/user-preferenced-token-input/user-preferenced-token-input.component.test.js similarity index 100% rename from ui/app/components/app/user-preferenced-token-input/user-preferenced-token-input.component.test.js rename to ui/components/app/user-preferenced-token-input/user-preferenced-token-input.component.test.js diff --git a/ui/app/components/app/user-preferenced-token-input/user-preferenced-token-input.container.js b/ui/components/app/user-preferenced-token-input/user-preferenced-token-input.container.js similarity index 100% rename from ui/app/components/app/user-preferenced-token-input/user-preferenced-token-input.container.js rename to ui/components/app/user-preferenced-token-input/user-preferenced-token-input.container.js diff --git a/ui/app/components/app/user-preferenced-token-input/user-preferenced-token-input.container.test.js b/ui/components/app/user-preferenced-token-input/user-preferenced-token-input.container.test.js similarity index 100% rename from ui/app/components/app/user-preferenced-token-input/user-preferenced-token-input.container.test.js rename to ui/components/app/user-preferenced-token-input/user-preferenced-token-input.container.test.js diff --git a/ui/app/components/app/wallet-overview/eth-overview.js b/ui/components/app/wallet-overview/eth-overview.js similarity index 100% rename from ui/app/components/app/wallet-overview/eth-overview.js rename to ui/components/app/wallet-overview/eth-overview.js diff --git a/ui/app/components/app/wallet-overview/index.js b/ui/components/app/wallet-overview/index.js similarity index 100% rename from ui/app/components/app/wallet-overview/index.js rename to ui/components/app/wallet-overview/index.js diff --git a/ui/app/components/app/wallet-overview/index.scss b/ui/components/app/wallet-overview/index.scss similarity index 100% rename from ui/app/components/app/wallet-overview/index.scss rename to ui/components/app/wallet-overview/index.scss diff --git a/ui/app/components/app/wallet-overview/token-overview.js b/ui/components/app/wallet-overview/token-overview.js similarity index 100% rename from ui/app/components/app/wallet-overview/token-overview.js rename to ui/components/app/wallet-overview/token-overview.js diff --git a/ui/app/components/app/wallet-overview/wallet-overview.js b/ui/components/app/wallet-overview/wallet-overview.js similarity index 100% rename from ui/app/components/app/wallet-overview/wallet-overview.js rename to ui/components/app/wallet-overview/wallet-overview.js diff --git a/ui/app/components/app/whats-new-popup/index.js b/ui/components/app/whats-new-popup/index.js similarity index 100% rename from ui/app/components/app/whats-new-popup/index.js rename to ui/components/app/whats-new-popup/index.js diff --git a/ui/app/components/app/whats-new-popup/index.scss b/ui/components/app/whats-new-popup/index.scss similarity index 100% rename from ui/app/components/app/whats-new-popup/index.scss rename to ui/components/app/whats-new-popup/index.scss diff --git a/ui/app/components/app/whats-new-popup/whats-new-popup.js b/ui/components/app/whats-new-popup/whats-new-popup.js similarity index 98% rename from ui/app/components/app/whats-new-popup/whats-new-popup.js rename to ui/components/app/whats-new-popup/whats-new-popup.js index be9415d4b..65abee0c3 100644 --- a/ui/app/components/app/whats-new-popup/whats-new-popup.js +++ b/ui/components/app/whats-new-popup/whats-new-popup.js @@ -9,7 +9,7 @@ import Button from '../../ui/button'; import Popover from '../../ui/popover'; import Typography from '../../ui/typography'; import { updateViewedNotifications } from '../../../store/actions'; -import { getTranslatedUINoficiations } from '../../../../../shared/notifications'; +import { getTranslatedUINoficiations } from '../../../../shared/notifications'; import { getSortedNotificationsToShow } from '../../../selectors'; import { TYPOGRAPHY } from '../../../helpers/constants/design-system'; diff --git a/ui/app/components/ui/account-mismatch-warning/acccount-mismatch-warning.component.test.js b/ui/components/ui/account-mismatch-warning/acccount-mismatch-warning.component.test.js similarity index 100% rename from ui/app/components/ui/account-mismatch-warning/acccount-mismatch-warning.component.test.js rename to ui/components/ui/account-mismatch-warning/acccount-mismatch-warning.component.test.js diff --git a/ui/app/components/ui/account-mismatch-warning/account-mismatch-warning.component.js b/ui/components/ui/account-mismatch-warning/account-mismatch-warning.component.js similarity index 100% rename from ui/app/components/ui/account-mismatch-warning/account-mismatch-warning.component.js rename to ui/components/ui/account-mismatch-warning/account-mismatch-warning.component.js diff --git a/ui/app/components/ui/account-mismatch-warning/index.scss b/ui/components/ui/account-mismatch-warning/index.scss similarity index 100% rename from ui/app/components/ui/account-mismatch-warning/index.scss rename to ui/components/ui/account-mismatch-warning/index.scss diff --git a/ui/app/components/ui/alert-circle-icon/alert-circle-icon.component.js b/ui/components/ui/alert-circle-icon/alert-circle-icon.component.js similarity index 100% rename from ui/app/components/ui/alert-circle-icon/alert-circle-icon.component.js rename to ui/components/ui/alert-circle-icon/alert-circle-icon.component.js diff --git a/ui/app/components/ui/alert-circle-icon/alert-circle-icon.stories.js b/ui/components/ui/alert-circle-icon/alert-circle-icon.stories.js similarity index 100% rename from ui/app/components/ui/alert-circle-icon/alert-circle-icon.stories.js rename to ui/components/ui/alert-circle-icon/alert-circle-icon.stories.js diff --git a/ui/app/components/ui/alert-circle-icon/index.js b/ui/components/ui/alert-circle-icon/index.js similarity index 100% rename from ui/app/components/ui/alert-circle-icon/index.js rename to ui/components/ui/alert-circle-icon/index.js diff --git a/ui/app/components/ui/alert-circle-icon/index.scss b/ui/components/ui/alert-circle-icon/index.scss similarity index 100% rename from ui/app/components/ui/alert-circle-icon/index.scss rename to ui/components/ui/alert-circle-icon/index.scss diff --git a/ui/app/components/ui/alert/index.js b/ui/components/ui/alert/index.js similarity index 100% rename from ui/app/components/ui/alert/index.js rename to ui/components/ui/alert/index.js diff --git a/ui/app/components/ui/alert/index.scss b/ui/components/ui/alert/index.scss similarity index 100% rename from ui/app/components/ui/alert/index.scss rename to ui/components/ui/alert/index.scss diff --git a/ui/app/components/ui/alert/index.test.js b/ui/components/ui/alert/index.test.js similarity index 100% rename from ui/app/components/ui/alert/index.test.js rename to ui/components/ui/alert/index.test.js diff --git a/ui/app/components/ui/box/box.js b/ui/components/ui/box/box.js similarity index 100% rename from ui/app/components/ui/box/box.js rename to ui/components/ui/box/box.js diff --git a/ui/app/components/ui/box/box.scss b/ui/components/ui/box/box.scss similarity index 100% rename from ui/app/components/ui/box/box.scss rename to ui/components/ui/box/box.scss diff --git a/ui/app/components/ui/box/box.stories.js b/ui/components/ui/box/box.stories.js similarity index 100% rename from ui/app/components/ui/box/box.stories.js rename to ui/components/ui/box/box.stories.js diff --git a/ui/app/components/ui/box/index.js b/ui/components/ui/box/index.js similarity index 100% rename from ui/app/components/ui/box/index.js rename to ui/components/ui/box/index.js diff --git a/ui/app/components/ui/breadcrumbs/breadcrumbs.component.js b/ui/components/ui/breadcrumbs/breadcrumbs.component.js similarity index 100% rename from ui/app/components/ui/breadcrumbs/breadcrumbs.component.js rename to ui/components/ui/breadcrumbs/breadcrumbs.component.js diff --git a/ui/app/components/ui/breadcrumbs/breadcrumbs.component.test.js b/ui/components/ui/breadcrumbs/breadcrumbs.component.test.js similarity index 100% rename from ui/app/components/ui/breadcrumbs/breadcrumbs.component.test.js rename to ui/components/ui/breadcrumbs/breadcrumbs.component.test.js diff --git a/ui/app/components/ui/breadcrumbs/index.js b/ui/components/ui/breadcrumbs/index.js similarity index 100% rename from ui/app/components/ui/breadcrumbs/index.js rename to ui/components/ui/breadcrumbs/index.js diff --git a/ui/app/components/ui/breadcrumbs/index.scss b/ui/components/ui/breadcrumbs/index.scss similarity index 100% rename from ui/app/components/ui/breadcrumbs/index.scss rename to ui/components/ui/breadcrumbs/index.scss diff --git a/ui/app/components/ui/button-group/button-group-component.test.js b/ui/components/ui/button-group/button-group-component.test.js similarity index 100% rename from ui/app/components/ui/button-group/button-group-component.test.js rename to ui/components/ui/button-group/button-group-component.test.js diff --git a/ui/app/components/ui/button-group/button-group.component.js b/ui/components/ui/button-group/button-group.component.js similarity index 100% rename from ui/app/components/ui/button-group/button-group.component.js rename to ui/components/ui/button-group/button-group.component.js diff --git a/ui/app/components/ui/button-group/button-group.stories.js b/ui/components/ui/button-group/button-group.stories.js similarity index 100% rename from ui/app/components/ui/button-group/button-group.stories.js rename to ui/components/ui/button-group/button-group.stories.js diff --git a/ui/app/components/ui/button-group/index.js b/ui/components/ui/button-group/index.js similarity index 100% rename from ui/app/components/ui/button-group/index.js rename to ui/components/ui/button-group/index.js diff --git a/ui/app/components/ui/button-group/index.scss b/ui/components/ui/button-group/index.scss similarity index 100% rename from ui/app/components/ui/button-group/index.scss rename to ui/components/ui/button-group/index.scss diff --git a/ui/app/components/ui/button/button.component.js b/ui/components/ui/button/button.component.js similarity index 100% rename from ui/app/components/ui/button/button.component.js rename to ui/components/ui/button/button.component.js diff --git a/ui/app/components/ui/button/button.stories.js b/ui/components/ui/button/button.stories.js similarity index 100% rename from ui/app/components/ui/button/button.stories.js rename to ui/components/ui/button/button.stories.js diff --git a/ui/app/components/ui/button/buttons.scss b/ui/components/ui/button/buttons.scss similarity index 100% rename from ui/app/components/ui/button/buttons.scss rename to ui/components/ui/button/buttons.scss diff --git a/ui/app/components/ui/button/index.js b/ui/components/ui/button/index.js similarity index 100% rename from ui/app/components/ui/button/index.js rename to ui/components/ui/button/index.js diff --git a/ui/app/components/ui/callout/callout.js b/ui/components/ui/callout/callout.js similarity index 100% rename from ui/app/components/ui/callout/callout.js rename to ui/components/ui/callout/callout.js diff --git a/ui/app/components/ui/callout/callout.scss b/ui/components/ui/callout/callout.scss similarity index 100% rename from ui/app/components/ui/callout/callout.scss rename to ui/components/ui/callout/callout.scss diff --git a/ui/app/components/ui/callout/callout.stories.js b/ui/components/ui/callout/callout.stories.js similarity index 100% rename from ui/app/components/ui/callout/callout.stories.js rename to ui/components/ui/callout/callout.stories.js diff --git a/ui/app/components/ui/callout/index.js b/ui/components/ui/callout/index.js similarity index 100% rename from ui/app/components/ui/callout/index.js rename to ui/components/ui/callout/index.js diff --git a/ui/app/components/ui/card/card.component.js b/ui/components/ui/card/card.component.js similarity index 100% rename from ui/app/components/ui/card/card.component.js rename to ui/components/ui/card/card.component.js diff --git a/ui/app/components/ui/card/card.component.test.js b/ui/components/ui/card/card.component.test.js similarity index 100% rename from ui/app/components/ui/card/card.component.test.js rename to ui/components/ui/card/card.component.test.js diff --git a/ui/app/components/ui/card/index.js b/ui/components/ui/card/index.js similarity index 100% rename from ui/app/components/ui/card/index.js rename to ui/components/ui/card/index.js diff --git a/ui/app/components/ui/card/index.scss b/ui/components/ui/card/index.scss similarity index 100% rename from ui/app/components/ui/card/index.scss rename to ui/components/ui/card/index.scss diff --git a/ui/app/components/ui/check-box/check-box.component.js b/ui/components/ui/check-box/check-box.component.js similarity index 100% rename from ui/app/components/ui/check-box/check-box.component.js rename to ui/components/ui/check-box/check-box.component.js diff --git a/ui/app/components/ui/check-box/check-box.stories.js b/ui/components/ui/check-box/check-box.stories.js similarity index 100% rename from ui/app/components/ui/check-box/check-box.stories.js rename to ui/components/ui/check-box/check-box.stories.js diff --git a/ui/app/components/ui/check-box/index.js b/ui/components/ui/check-box/index.js similarity index 100% rename from ui/app/components/ui/check-box/index.js rename to ui/components/ui/check-box/index.js diff --git a/ui/app/components/ui/check-box/index.scss b/ui/components/ui/check-box/index.scss similarity index 100% rename from ui/app/components/ui/check-box/index.scss rename to ui/components/ui/check-box/index.scss diff --git a/ui/app/components/ui/chip/chip.js b/ui/components/ui/chip/chip.js similarity index 100% rename from ui/app/components/ui/chip/chip.js rename to ui/components/ui/chip/chip.js diff --git a/ui/app/components/ui/chip/chip.scss b/ui/components/ui/chip/chip.scss similarity index 100% rename from ui/app/components/ui/chip/chip.scss rename to ui/components/ui/chip/chip.scss diff --git a/ui/app/components/ui/chip/chip.stories.js b/ui/components/ui/chip/chip.stories.js similarity index 100% rename from ui/app/components/ui/chip/chip.stories.js rename to ui/components/ui/chip/chip.stories.js diff --git a/ui/app/components/ui/chip/index.js b/ui/components/ui/chip/index.js similarity index 100% rename from ui/app/components/ui/chip/index.js rename to ui/components/ui/chip/index.js diff --git a/ui/app/components/ui/circle-icon/circle-icon.component.js b/ui/components/ui/circle-icon/circle-icon.component.js similarity index 100% rename from ui/app/components/ui/circle-icon/circle-icon.component.js rename to ui/components/ui/circle-icon/circle-icon.component.js diff --git a/ui/app/components/ui/circle-icon/circle-icon.stories.js b/ui/components/ui/circle-icon/circle-icon.stories.js similarity index 100% rename from ui/app/components/ui/circle-icon/circle-icon.stories.js rename to ui/components/ui/circle-icon/circle-icon.stories.js diff --git a/ui/app/components/ui/circle-icon/index.js b/ui/components/ui/circle-icon/index.js similarity index 100% rename from ui/app/components/ui/circle-icon/index.js rename to ui/components/ui/circle-icon/index.js diff --git a/ui/app/components/ui/circle-icon/index.scss b/ui/components/ui/circle-icon/index.scss similarity index 100% rename from ui/app/components/ui/circle-icon/index.scss rename to ui/components/ui/circle-icon/index.scss diff --git a/ui/app/components/ui/color-indicator/color-indicator.js b/ui/components/ui/color-indicator/color-indicator.js similarity index 100% rename from ui/app/components/ui/color-indicator/color-indicator.js rename to ui/components/ui/color-indicator/color-indicator.js diff --git a/ui/app/components/ui/color-indicator/color-indicator.scss b/ui/components/ui/color-indicator/color-indicator.scss similarity index 100% rename from ui/app/components/ui/color-indicator/color-indicator.scss rename to ui/components/ui/color-indicator/color-indicator.scss diff --git a/ui/app/components/ui/color-indicator/color-indicator.stories.js b/ui/components/ui/color-indicator/color-indicator.stories.js similarity index 100% rename from ui/app/components/ui/color-indicator/color-indicator.stories.js rename to ui/components/ui/color-indicator/color-indicator.stories.js diff --git a/ui/app/components/ui/color-indicator/index.js b/ui/components/ui/color-indicator/index.js similarity index 100% rename from ui/app/components/ui/color-indicator/index.js rename to ui/components/ui/color-indicator/index.js diff --git a/ui/app/components/ui/confusable/confusable.component.js b/ui/components/ui/confusable/confusable.component.js similarity index 100% rename from ui/app/components/ui/confusable/confusable.component.js rename to ui/components/ui/confusable/confusable.component.js diff --git a/ui/app/components/ui/confusable/confusable.component.test.js b/ui/components/ui/confusable/confusable.component.test.js similarity index 100% rename from ui/app/components/ui/confusable/confusable.component.test.js rename to ui/components/ui/confusable/confusable.component.test.js diff --git a/ui/app/components/ui/confusable/index.js b/ui/components/ui/confusable/index.js similarity index 100% rename from ui/app/components/ui/confusable/index.js rename to ui/components/ui/confusable/index.js diff --git a/ui/app/components/ui/confusable/index.scss b/ui/components/ui/confusable/index.scss similarity index 100% rename from ui/app/components/ui/confusable/index.scss rename to ui/components/ui/confusable/index.scss diff --git a/ui/app/components/ui/currency-display/currency-display.component.js b/ui/components/ui/currency-display/currency-display.component.js similarity index 100% rename from ui/app/components/ui/currency-display/currency-display.component.js rename to ui/components/ui/currency-display/currency-display.component.js diff --git a/ui/app/components/ui/currency-display/currency-display.component.test.js b/ui/components/ui/currency-display/currency-display.component.test.js similarity index 100% rename from ui/app/components/ui/currency-display/currency-display.component.test.js rename to ui/components/ui/currency-display/currency-display.component.test.js diff --git a/ui/app/components/ui/currency-display/index.js b/ui/components/ui/currency-display/index.js similarity index 100% rename from ui/app/components/ui/currency-display/index.js rename to ui/components/ui/currency-display/index.js diff --git a/ui/app/components/ui/currency-display/index.scss b/ui/components/ui/currency-display/index.scss similarity index 100% rename from ui/app/components/ui/currency-display/index.scss rename to ui/components/ui/currency-display/index.scss diff --git a/ui/app/components/ui/currency-input/currency-input.component.js b/ui/components/ui/currency-input/currency-input.component.js similarity index 100% rename from ui/app/components/ui/currency-input/currency-input.component.js rename to ui/components/ui/currency-input/currency-input.component.js diff --git a/ui/app/components/ui/currency-input/currency-input.component.test.js b/ui/components/ui/currency-input/currency-input.component.test.js similarity index 100% rename from ui/app/components/ui/currency-input/currency-input.component.test.js rename to ui/components/ui/currency-input/currency-input.component.test.js diff --git a/ui/app/components/ui/currency-input/currency-input.container.js b/ui/components/ui/currency-input/currency-input.container.js similarity index 100% rename from ui/app/components/ui/currency-input/currency-input.container.js rename to ui/components/ui/currency-input/currency-input.container.js diff --git a/ui/app/components/ui/currency-input/currency-input.container.test.js b/ui/components/ui/currency-input/currency-input.container.test.js similarity index 100% rename from ui/app/components/ui/currency-input/currency-input.container.test.js rename to ui/components/ui/currency-input/currency-input.container.test.js diff --git a/ui/app/components/ui/currency-input/index.js b/ui/components/ui/currency-input/index.js similarity index 100% rename from ui/app/components/ui/currency-input/index.js rename to ui/components/ui/currency-input/index.js diff --git a/ui/app/components/ui/currency-input/index.scss b/ui/components/ui/currency-input/index.scss similarity index 100% rename from ui/app/components/ui/currency-input/index.scss rename to ui/components/ui/currency-input/index.scss diff --git a/ui/app/components/ui/definition-list/definition-list.js b/ui/components/ui/definition-list/definition-list.js similarity index 100% rename from ui/app/components/ui/definition-list/definition-list.js rename to ui/components/ui/definition-list/definition-list.js diff --git a/ui/app/components/ui/definition-list/definition-list.scss b/ui/components/ui/definition-list/definition-list.scss similarity index 100% rename from ui/app/components/ui/definition-list/definition-list.scss rename to ui/components/ui/definition-list/definition-list.scss diff --git a/ui/app/components/ui/definition-list/definition-list.stories.js b/ui/components/ui/definition-list/definition-list.stories.js similarity index 100% rename from ui/app/components/ui/definition-list/definition-list.stories.js rename to ui/components/ui/definition-list/definition-list.stories.js diff --git a/ui/app/components/ui/definition-list/index.js b/ui/components/ui/definition-list/index.js similarity index 100% rename from ui/app/components/ui/definition-list/index.js rename to ui/components/ui/definition-list/index.js diff --git a/ui/app/components/ui/dialog/dialog.scss b/ui/components/ui/dialog/dialog.scss similarity index 100% rename from ui/app/components/ui/dialog/dialog.scss rename to ui/components/ui/dialog/dialog.scss diff --git a/ui/app/components/ui/dialog/index.js b/ui/components/ui/dialog/index.js similarity index 100% rename from ui/app/components/ui/dialog/index.js rename to ui/components/ui/dialog/index.js diff --git a/ui/app/components/ui/dropdown/dropdown.js b/ui/components/ui/dropdown/dropdown.js similarity index 100% rename from ui/app/components/ui/dropdown/dropdown.js rename to ui/components/ui/dropdown/dropdown.js diff --git a/ui/app/components/ui/dropdown/dropdown.scss b/ui/components/ui/dropdown/dropdown.scss similarity index 100% rename from ui/app/components/ui/dropdown/dropdown.scss rename to ui/components/ui/dropdown/dropdown.scss diff --git a/ui/app/components/ui/dropdown/dropdown.stories.js b/ui/components/ui/dropdown/dropdown.stories.js similarity index 100% rename from ui/app/components/ui/dropdown/dropdown.stories.js rename to ui/components/ui/dropdown/dropdown.stories.js diff --git a/ui/app/components/ui/dropdown/index.js b/ui/components/ui/dropdown/index.js similarity index 100% rename from ui/app/components/ui/dropdown/index.js rename to ui/components/ui/dropdown/index.js diff --git a/ui/app/components/ui/editable-label/editable-label.js b/ui/components/ui/editable-label/editable-label.js similarity index 100% rename from ui/app/components/ui/editable-label/editable-label.js rename to ui/components/ui/editable-label/editable-label.js diff --git a/ui/app/components/ui/editable-label/index.js b/ui/components/ui/editable-label/index.js similarity index 100% rename from ui/app/components/ui/editable-label/index.js rename to ui/components/ui/editable-label/index.js diff --git a/ui/app/components/ui/editable-label/index.scss b/ui/components/ui/editable-label/index.scss similarity index 100% rename from ui/app/components/ui/editable-label/index.scss rename to ui/components/ui/editable-label/index.scss diff --git a/ui/app/components/ui/error-message/error-message.component.js b/ui/components/ui/error-message/error-message.component.js similarity index 100% rename from ui/app/components/ui/error-message/error-message.component.js rename to ui/components/ui/error-message/error-message.component.js diff --git a/ui/app/components/ui/error-message/error-message.component.test.js b/ui/components/ui/error-message/error-message.component.test.js similarity index 100% rename from ui/app/components/ui/error-message/error-message.component.test.js rename to ui/components/ui/error-message/error-message.component.test.js diff --git a/ui/app/components/ui/error-message/index.js b/ui/components/ui/error-message/index.js similarity index 100% rename from ui/app/components/ui/error-message/index.js rename to ui/components/ui/error-message/index.js diff --git a/ui/app/components/ui/error-message/index.scss b/ui/components/ui/error-message/index.scss similarity index 100% rename from ui/app/components/ui/error-message/index.scss rename to ui/components/ui/error-message/index.scss diff --git a/ui/app/components/ui/export-text-container/export-text-container.component.js b/ui/components/ui/export-text-container/export-text-container.component.js similarity index 100% rename from ui/app/components/ui/export-text-container/export-text-container.component.js rename to ui/components/ui/export-text-container/export-text-container.component.js diff --git a/ui/app/components/ui/export-text-container/index.js b/ui/components/ui/export-text-container/index.js similarity index 100% rename from ui/app/components/ui/export-text-container/index.js rename to ui/components/ui/export-text-container/index.js diff --git a/ui/app/components/ui/export-text-container/index.scss b/ui/components/ui/export-text-container/index.scss similarity index 100% rename from ui/app/components/ui/export-text-container/index.scss rename to ui/components/ui/export-text-container/index.scss diff --git a/ui/app/components/ui/hex-to-decimal/hex-to-decimal.component.js b/ui/components/ui/hex-to-decimal/hex-to-decimal.component.js similarity index 100% rename from ui/app/components/ui/hex-to-decimal/hex-to-decimal.component.js rename to ui/components/ui/hex-to-decimal/hex-to-decimal.component.js diff --git a/ui/app/components/ui/hex-to-decimal/hex-to-decimal.component.test.js b/ui/components/ui/hex-to-decimal/hex-to-decimal.component.test.js similarity index 100% rename from ui/app/components/ui/hex-to-decimal/hex-to-decimal.component.test.js rename to ui/components/ui/hex-to-decimal/hex-to-decimal.component.test.js diff --git a/ui/app/components/ui/hex-to-decimal/index.js b/ui/components/ui/hex-to-decimal/index.js similarity index 100% rename from ui/app/components/ui/hex-to-decimal/index.js rename to ui/components/ui/hex-to-decimal/index.js diff --git a/ui/app/components/ui/icon-border/icon-border.js b/ui/components/ui/icon-border/icon-border.js similarity index 100% rename from ui/app/components/ui/icon-border/icon-border.js rename to ui/components/ui/icon-border/icon-border.js diff --git a/ui/app/components/ui/icon-border/icon-border.scss b/ui/components/ui/icon-border/icon-border.scss similarity index 100% rename from ui/app/components/ui/icon-border/icon-border.scss rename to ui/components/ui/icon-border/icon-border.scss diff --git a/ui/app/components/ui/icon-border/index.js b/ui/components/ui/icon-border/index.js similarity index 100% rename from ui/app/components/ui/icon-border/index.js rename to ui/components/ui/icon-border/index.js diff --git a/ui/app/components/ui/icon-button/icon-button.js b/ui/components/ui/icon-button/icon-button.js similarity index 100% rename from ui/app/components/ui/icon-button/icon-button.js rename to ui/components/ui/icon-button/icon-button.js diff --git a/ui/app/components/ui/icon-button/icon-button.scss b/ui/components/ui/icon-button/icon-button.scss similarity index 100% rename from ui/app/components/ui/icon-button/icon-button.scss rename to ui/components/ui/icon-button/icon-button.scss diff --git a/ui/app/components/ui/icon-button/index.js b/ui/components/ui/icon-button/index.js similarity index 100% rename from ui/app/components/ui/icon-button/index.js rename to ui/components/ui/icon-button/index.js diff --git a/ui/app/components/ui/icon-with-fallback/icon-with-fallback.component.js b/ui/components/ui/icon-with-fallback/icon-with-fallback.component.js similarity index 100% rename from ui/app/components/ui/icon-with-fallback/icon-with-fallback.component.js rename to ui/components/ui/icon-with-fallback/icon-with-fallback.component.js diff --git a/ui/app/components/ui/icon-with-fallback/icon-with-fallback.scss b/ui/components/ui/icon-with-fallback/icon-with-fallback.scss similarity index 100% rename from ui/app/components/ui/icon-with-fallback/icon-with-fallback.scss rename to ui/components/ui/icon-with-fallback/icon-with-fallback.scss diff --git a/ui/app/components/ui/icon-with-fallback/index.js b/ui/components/ui/icon-with-fallback/index.js similarity index 100% rename from ui/app/components/ui/icon-with-fallback/index.js rename to ui/components/ui/icon-with-fallback/index.js diff --git a/ui/app/components/ui/icon-with-label/icon-with-label.js b/ui/components/ui/icon-with-label/icon-with-label.js similarity index 100% rename from ui/app/components/ui/icon-with-label/icon-with-label.js rename to ui/components/ui/icon-with-label/icon-with-label.js diff --git a/ui/app/components/ui/icon-with-label/index.js b/ui/components/ui/icon-with-label/index.js similarity index 100% rename from ui/app/components/ui/icon-with-label/index.js rename to ui/components/ui/icon-with-label/index.js diff --git a/ui/app/components/ui/icon-with-label/index.scss b/ui/components/ui/icon-with-label/index.scss similarity index 100% rename from ui/app/components/ui/icon-with-label/index.scss rename to ui/components/ui/icon-with-label/index.scss diff --git a/ui/app/components/ui/icon/approve-icon.component.js b/ui/components/ui/icon/approve-icon.component.js similarity index 100% rename from ui/app/components/ui/icon/approve-icon.component.js rename to ui/components/ui/icon/approve-icon.component.js diff --git a/ui/app/components/ui/icon/copy-icon.component.js b/ui/components/ui/icon/copy-icon.component.js similarity index 100% rename from ui/app/components/ui/icon/copy-icon.component.js rename to ui/components/ui/icon/copy-icon.component.js diff --git a/ui/app/components/ui/icon/icon.stories.js b/ui/components/ui/icon/icon.stories.js similarity index 100% rename from ui/app/components/ui/icon/icon.stories.js rename to ui/components/ui/icon/icon.stories.js diff --git a/ui/app/components/ui/icon/index.scss b/ui/components/ui/icon/index.scss similarity index 100% rename from ui/app/components/ui/icon/index.scss rename to ui/components/ui/icon/index.scss diff --git a/ui/app/components/ui/icon/info-icon-inverted.component.js b/ui/components/ui/icon/info-icon-inverted.component.js similarity index 100% rename from ui/app/components/ui/icon/info-icon-inverted.component.js rename to ui/components/ui/icon/info-icon-inverted.component.js diff --git a/ui/app/components/ui/icon/info-icon.component.js b/ui/components/ui/icon/info-icon.component.js similarity index 100% rename from ui/app/components/ui/icon/info-icon.component.js rename to ui/components/ui/icon/info-icon.component.js diff --git a/ui/app/components/ui/icon/interaction-icon.component.js b/ui/components/ui/icon/interaction-icon.component.js similarity index 100% rename from ui/app/components/ui/icon/interaction-icon.component.js rename to ui/components/ui/icon/interaction-icon.component.js diff --git a/ui/app/components/ui/icon/overview-buy-icon.component.js b/ui/components/ui/icon/overview-buy-icon.component.js similarity index 100% rename from ui/app/components/ui/icon/overview-buy-icon.component.js rename to ui/components/ui/icon/overview-buy-icon.component.js diff --git a/ui/app/components/ui/icon/overview-send-icon.component.js b/ui/components/ui/icon/overview-send-icon.component.js similarity index 100% rename from ui/app/components/ui/icon/overview-send-icon.component.js rename to ui/components/ui/icon/overview-send-icon.component.js diff --git a/ui/app/components/ui/icon/paper-airplane-icon.js b/ui/components/ui/icon/paper-airplane-icon.js similarity index 100% rename from ui/app/components/ui/icon/paper-airplane-icon.js rename to ui/components/ui/icon/paper-airplane-icon.js diff --git a/ui/app/components/ui/icon/preloader/index.js b/ui/components/ui/icon/preloader/index.js similarity index 100% rename from ui/app/components/ui/icon/preloader/index.js rename to ui/components/ui/icon/preloader/index.js diff --git a/ui/app/components/ui/icon/preloader/index.scss b/ui/components/ui/icon/preloader/index.scss similarity index 100% rename from ui/app/components/ui/icon/preloader/index.scss rename to ui/components/ui/icon/preloader/index.scss diff --git a/ui/app/components/ui/icon/preloader/preloader-icon.component.js b/ui/components/ui/icon/preloader/preloader-icon.component.js similarity index 100% rename from ui/app/components/ui/icon/preloader/preloader-icon.component.js rename to ui/components/ui/icon/preloader/preloader-icon.component.js diff --git a/ui/app/components/ui/icon/receive-icon.component.js b/ui/components/ui/icon/receive-icon.component.js similarity index 100% rename from ui/app/components/ui/icon/receive-icon.component.js rename to ui/components/ui/icon/receive-icon.component.js diff --git a/ui/app/components/ui/icon/send-icon.component.js b/ui/components/ui/icon/send-icon.component.js similarity index 100% rename from ui/app/components/ui/icon/send-icon.component.js rename to ui/components/ui/icon/send-icon.component.js diff --git a/ui/app/components/ui/icon/sign-icon.component.js b/ui/components/ui/icon/sign-icon.component.js similarity index 100% rename from ui/app/components/ui/icon/sign-icon.component.js rename to ui/components/ui/icon/sign-icon.component.js diff --git a/ui/app/components/ui/icon/sun-check-icon.component.js b/ui/components/ui/icon/sun-check-icon.component.js similarity index 100% rename from ui/app/components/ui/icon/sun-check-icon.component.js rename to ui/components/ui/icon/sun-check-icon.component.js diff --git a/ui/app/components/ui/icon/swap-icon-for-list.component.js b/ui/components/ui/icon/swap-icon-for-list.component.js similarity index 100% rename from ui/app/components/ui/icon/swap-icon-for-list.component.js rename to ui/components/ui/icon/swap-icon-for-list.component.js diff --git a/ui/app/components/ui/icon/swap-icon.component.js b/ui/components/ui/icon/swap-icon.component.js similarity index 100% rename from ui/app/components/ui/icon/swap-icon.component.js rename to ui/components/ui/icon/swap-icon.component.js diff --git a/ui/app/components/ui/identicon/blockieIdenticon/blockieIdenticon.component.js b/ui/components/ui/identicon/blockieIdenticon/blockieIdenticon.component.js similarity index 100% rename from ui/app/components/ui/identicon/blockieIdenticon/blockieIdenticon.component.js rename to ui/components/ui/identicon/blockieIdenticon/blockieIdenticon.component.js diff --git a/ui/app/components/ui/identicon/blockieIdenticon/index.js b/ui/components/ui/identicon/blockieIdenticon/index.js similarity index 100% rename from ui/app/components/ui/identicon/blockieIdenticon/index.js rename to ui/components/ui/identicon/blockieIdenticon/index.js diff --git a/ui/app/components/ui/identicon/identicon.component.js b/ui/components/ui/identicon/identicon.component.js similarity index 96% rename from ui/app/components/ui/identicon/identicon.component.js rename to ui/components/ui/identicon/identicon.component.js index 64a03ea01..dd6eb5beb 100644 --- a/ui/app/components/ui/identicon/identicon.component.js +++ b/ui/components/ui/identicon/identicon.component.js @@ -2,7 +2,7 @@ import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import contractMap from '@metamask/contract-metadata'; -import { toChecksumHexAddress } from '../../../../../shared/modules/hexstring-utils'; +import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils'; import Jazzicon from '../jazzicon'; import BlockieIdenticon from './blockieIdenticon'; diff --git a/ui/app/components/ui/identicon/identicon.component.test.js b/ui/components/ui/identicon/identicon.component.test.js similarity index 100% rename from ui/app/components/ui/identicon/identicon.component.test.js rename to ui/components/ui/identicon/identicon.component.test.js diff --git a/ui/app/components/ui/identicon/identicon.container.js b/ui/components/ui/identicon/identicon.container.js similarity index 100% rename from ui/app/components/ui/identicon/identicon.container.js rename to ui/components/ui/identicon/identicon.container.js diff --git a/ui/app/components/ui/identicon/identicon.stories.js b/ui/components/ui/identicon/identicon.stories.js similarity index 100% rename from ui/app/components/ui/identicon/identicon.stories.js rename to ui/components/ui/identicon/identicon.stories.js diff --git a/ui/app/components/ui/identicon/index.js b/ui/components/ui/identicon/index.js similarity index 100% rename from ui/app/components/ui/identicon/index.js rename to ui/components/ui/identicon/index.js diff --git a/ui/app/components/ui/identicon/index.scss b/ui/components/ui/identicon/index.scss similarity index 100% rename from ui/app/components/ui/identicon/index.scss rename to ui/components/ui/identicon/index.scss diff --git a/ui/app/components/ui/info-tooltip/index.js b/ui/components/ui/info-tooltip/index.js similarity index 100% rename from ui/app/components/ui/info-tooltip/index.js rename to ui/components/ui/info-tooltip/index.js diff --git a/ui/app/components/ui/info-tooltip/index.scss b/ui/components/ui/info-tooltip/index.scss similarity index 100% rename from ui/app/components/ui/info-tooltip/index.scss rename to ui/components/ui/info-tooltip/index.scss diff --git a/ui/app/components/ui/info-tooltip/info-tooltip.js b/ui/components/ui/info-tooltip/info-tooltip.js similarity index 100% rename from ui/app/components/ui/info-tooltip/info-tooltip.js rename to ui/components/ui/info-tooltip/info-tooltip.js diff --git a/ui/app/components/ui/info-tooltip/info-tooltip.stories.js b/ui/components/ui/info-tooltip/info-tooltip.stories.js similarity index 100% rename from ui/app/components/ui/info-tooltip/info-tooltip.stories.js rename to ui/components/ui/info-tooltip/info-tooltip.stories.js diff --git a/ui/app/components/ui/jazzicon/index.js b/ui/components/ui/jazzicon/index.js similarity index 100% rename from ui/app/components/ui/jazzicon/index.js rename to ui/components/ui/jazzicon/index.js diff --git a/ui/app/components/ui/jazzicon/jazzicon.component.js b/ui/components/ui/jazzicon/jazzicon.component.js similarity index 95% rename from ui/app/components/ui/jazzicon/jazzicon.component.js rename to ui/components/ui/jazzicon/jazzicon.component.js index 5d1953009..b0a35cb6f 100644 --- a/ui/app/components/ui/jazzicon/jazzicon.component.js +++ b/ui/components/ui/jazzicon/jazzicon.component.js @@ -1,7 +1,7 @@ import React, { createRef, PureComponent } from 'react'; import PropTypes from 'prop-types'; import jazzicon from '@metamask/jazzicon'; -import iconFactoryGenerator from '../../../../lib/icon-factory'; +import iconFactoryGenerator from '../../../helpers/utils/icon-factory'; const iconFactory = iconFactoryGenerator(jazzicon); diff --git a/ui/app/components/ui/list-item/index.js b/ui/components/ui/list-item/index.js similarity index 100% rename from ui/app/components/ui/list-item/index.js rename to ui/components/ui/list-item/index.js diff --git a/ui/app/components/ui/list-item/index.scss b/ui/components/ui/list-item/index.scss similarity index 100% rename from ui/app/components/ui/list-item/index.scss rename to ui/components/ui/list-item/index.scss diff --git a/ui/app/components/ui/list-item/list-item.component.js b/ui/components/ui/list-item/list-item.component.js similarity index 100% rename from ui/app/components/ui/list-item/list-item.component.js rename to ui/components/ui/list-item/list-item.component.js diff --git a/ui/app/components/ui/list-item/list-item.component.test.js b/ui/components/ui/list-item/list-item.component.test.js similarity index 100% rename from ui/app/components/ui/list-item/list-item.component.test.js rename to ui/components/ui/list-item/list-item.component.test.js diff --git a/ui/app/components/ui/list-item/list-item.stories.js b/ui/components/ui/list-item/list-item.stories.js similarity index 100% rename from ui/app/components/ui/list-item/list-item.stories.js rename to ui/components/ui/list-item/list-item.stories.js diff --git a/ui/app/components/ui/loading-indicator/index.js b/ui/components/ui/loading-indicator/index.js similarity index 100% rename from ui/app/components/ui/loading-indicator/index.js rename to ui/components/ui/loading-indicator/index.js diff --git a/ui/app/components/ui/loading-indicator/loading-indicator.js b/ui/components/ui/loading-indicator/loading-indicator.js similarity index 100% rename from ui/app/components/ui/loading-indicator/loading-indicator.js rename to ui/components/ui/loading-indicator/loading-indicator.js diff --git a/ui/app/components/ui/loading-indicator/loading-indicator.scss b/ui/components/ui/loading-indicator/loading-indicator.scss similarity index 100% rename from ui/app/components/ui/loading-indicator/loading-indicator.scss rename to ui/components/ui/loading-indicator/loading-indicator.scss diff --git a/ui/app/components/ui/loading-screen/index.js b/ui/components/ui/loading-screen/index.js similarity index 100% rename from ui/app/components/ui/loading-screen/index.js rename to ui/components/ui/loading-screen/index.js diff --git a/ui/app/components/ui/loading-screen/index.scss b/ui/components/ui/loading-screen/index.scss similarity index 100% rename from ui/app/components/ui/loading-screen/index.scss rename to ui/components/ui/loading-screen/index.scss diff --git a/ui/app/components/ui/loading-screen/loading-screen.component.js b/ui/components/ui/loading-screen/loading-screen.component.js similarity index 100% rename from ui/app/components/ui/loading-screen/loading-screen.component.js rename to ui/components/ui/loading-screen/loading-screen.component.js diff --git a/ui/app/components/ui/lock-icon/index.js b/ui/components/ui/lock-icon/index.js similarity index 100% rename from ui/app/components/ui/lock-icon/index.js rename to ui/components/ui/lock-icon/index.js diff --git a/ui/app/components/ui/lock-icon/lock-icon.component.js b/ui/components/ui/lock-icon/lock-icon.component.js similarity index 100% rename from ui/app/components/ui/lock-icon/lock-icon.component.js rename to ui/components/ui/lock-icon/lock-icon.component.js diff --git a/ui/app/components/ui/mascot/index.js b/ui/components/ui/mascot/index.js similarity index 100% rename from ui/app/components/ui/mascot/index.js rename to ui/components/ui/mascot/index.js diff --git a/ui/app/components/ui/mascot/mascot.component.js b/ui/components/ui/mascot/mascot.component.js similarity index 100% rename from ui/app/components/ui/mascot/mascot.component.js rename to ui/components/ui/mascot/mascot.component.js diff --git a/ui/app/components/ui/mascot/mascot.stories.js b/ui/components/ui/mascot/mascot.stories.js similarity index 100% rename from ui/app/components/ui/mascot/mascot.stories.js rename to ui/components/ui/mascot/mascot.stories.js diff --git a/ui/app/components/ui/menu/index.js b/ui/components/ui/menu/index.js similarity index 100% rename from ui/app/components/ui/menu/index.js rename to ui/components/ui/menu/index.js diff --git a/ui/app/components/ui/menu/menu-item.js b/ui/components/ui/menu/menu-item.js similarity index 100% rename from ui/app/components/ui/menu/menu-item.js rename to ui/components/ui/menu/menu-item.js diff --git a/ui/app/components/ui/menu/menu.js b/ui/components/ui/menu/menu.js similarity index 100% rename from ui/app/components/ui/menu/menu.js rename to ui/components/ui/menu/menu.js diff --git a/ui/app/components/ui/menu/menu.scss b/ui/components/ui/menu/menu.scss similarity index 100% rename from ui/app/components/ui/menu/menu.scss rename to ui/components/ui/menu/menu.scss diff --git a/ui/app/components/ui/menu/menu.stories.js b/ui/components/ui/menu/menu.stories.js similarity index 100% rename from ui/app/components/ui/menu/menu.stories.js rename to ui/components/ui/menu/menu.stories.js diff --git a/ui/app/components/ui/metafox-logo/index.js b/ui/components/ui/metafox-logo/index.js similarity index 100% rename from ui/app/components/ui/metafox-logo/index.js rename to ui/components/ui/metafox-logo/index.js diff --git a/ui/app/components/ui/metafox-logo/metafox-logo.component.js b/ui/components/ui/metafox-logo/metafox-logo.component.js similarity index 100% rename from ui/app/components/ui/metafox-logo/metafox-logo.component.js rename to ui/components/ui/metafox-logo/metafox-logo.component.js diff --git a/ui/app/components/ui/metafox-logo/metafox-logo.component.test.js b/ui/components/ui/metafox-logo/metafox-logo.component.test.js similarity index 100% rename from ui/app/components/ui/metafox-logo/metafox-logo.component.test.js rename to ui/components/ui/metafox-logo/metafox-logo.component.test.js diff --git a/ui/app/components/ui/page-container/index.js b/ui/components/ui/page-container/index.js similarity index 100% rename from ui/app/components/ui/page-container/index.js rename to ui/components/ui/page-container/index.js diff --git a/ui/app/components/ui/page-container/index.scss b/ui/components/ui/page-container/index.scss similarity index 100% rename from ui/app/components/ui/page-container/index.scss rename to ui/components/ui/page-container/index.scss diff --git a/ui/app/components/ui/page-container/page-container-content.component.js b/ui/components/ui/page-container/page-container-content.component.js similarity index 100% rename from ui/app/components/ui/page-container/page-container-content.component.js rename to ui/components/ui/page-container/page-container-content.component.js diff --git a/ui/app/components/ui/page-container/page-container-footer/index.js b/ui/components/ui/page-container/page-container-footer/index.js similarity index 100% rename from ui/app/components/ui/page-container/page-container-footer/index.js rename to ui/components/ui/page-container/page-container-footer/index.js diff --git a/ui/app/components/ui/page-container/page-container-footer/page-container-footer.component.js b/ui/components/ui/page-container/page-container-footer/page-container-footer.component.js similarity index 100% rename from ui/app/components/ui/page-container/page-container-footer/page-container-footer.component.js rename to ui/components/ui/page-container/page-container-footer/page-container-footer.component.js diff --git a/ui/app/components/ui/page-container/page-container-footer/page-container-footer.component.test.js b/ui/components/ui/page-container/page-container-footer/page-container-footer.component.test.js similarity index 100% rename from ui/app/components/ui/page-container/page-container-footer/page-container-footer.component.test.js rename to ui/components/ui/page-container/page-container-footer/page-container-footer.component.test.js diff --git a/ui/app/components/ui/page-container/page-container-header/index.js b/ui/components/ui/page-container/page-container-header/index.js similarity index 100% rename from ui/app/components/ui/page-container/page-container-header/index.js rename to ui/components/ui/page-container/page-container-header/index.js diff --git a/ui/app/components/ui/page-container/page-container-header/page-container-header.component.js b/ui/components/ui/page-container/page-container-header/page-container-header.component.js similarity index 100% rename from ui/app/components/ui/page-container/page-container-header/page-container-header.component.js rename to ui/components/ui/page-container/page-container-header/page-container-header.component.js diff --git a/ui/app/components/ui/page-container/page-container-header/page-container-header.component.test.js b/ui/components/ui/page-container/page-container-header/page-container-header.component.test.js similarity index 100% rename from ui/app/components/ui/page-container/page-container-header/page-container-header.component.test.js rename to ui/components/ui/page-container/page-container-header/page-container-header.component.test.js diff --git a/ui/app/components/ui/page-container/page-container.component.js b/ui/components/ui/page-container/page-container.component.js similarity index 100% rename from ui/app/components/ui/page-container/page-container.component.js rename to ui/components/ui/page-container/page-container.component.js diff --git a/ui/app/components/ui/popover/index.js b/ui/components/ui/popover/index.js similarity index 100% rename from ui/app/components/ui/popover/index.js rename to ui/components/ui/popover/index.js diff --git a/ui/app/components/ui/popover/index.scss b/ui/components/ui/popover/index.scss similarity index 100% rename from ui/app/components/ui/popover/index.scss rename to ui/components/ui/popover/index.scss diff --git a/ui/app/components/ui/popover/popover.component.js b/ui/components/ui/popover/popover.component.js similarity index 100% rename from ui/app/components/ui/popover/popover.component.js rename to ui/components/ui/popover/popover.component.js diff --git a/ui/app/components/ui/popover/popover.stories.js b/ui/components/ui/popover/popover.stories.js similarity index 100% rename from ui/app/components/ui/popover/popover.stories.js rename to ui/components/ui/popover/popover.stories.js diff --git a/ui/app/components/ui/pulse-loader/index.js b/ui/components/ui/pulse-loader/index.js similarity index 100% rename from ui/app/components/ui/pulse-loader/index.js rename to ui/components/ui/pulse-loader/index.js diff --git a/ui/app/components/ui/pulse-loader/index.scss b/ui/components/ui/pulse-loader/index.scss similarity index 100% rename from ui/app/components/ui/pulse-loader/index.scss rename to ui/components/ui/pulse-loader/index.scss diff --git a/ui/app/components/ui/pulse-loader/pulse-loader.js b/ui/components/ui/pulse-loader/pulse-loader.js similarity index 100% rename from ui/app/components/ui/pulse-loader/pulse-loader.js rename to ui/components/ui/pulse-loader/pulse-loader.js diff --git a/ui/app/components/ui/pulse-loader/pulse-loader.stories.js b/ui/components/ui/pulse-loader/pulse-loader.stories.js similarity index 100% rename from ui/app/components/ui/pulse-loader/pulse-loader.stories.js rename to ui/components/ui/pulse-loader/pulse-loader.stories.js diff --git a/ui/app/components/ui/qr-code/index.js b/ui/components/ui/qr-code/index.js similarity index 100% rename from ui/app/components/ui/qr-code/index.js rename to ui/components/ui/qr-code/index.js diff --git a/ui/app/components/ui/qr-code/index.scss b/ui/components/ui/qr-code/index.scss similarity index 100% rename from ui/app/components/ui/qr-code/index.scss rename to ui/components/ui/qr-code/index.scss diff --git a/ui/app/components/ui/qr-code/qr-code.js b/ui/components/ui/qr-code/qr-code.js similarity index 95% rename from ui/app/components/ui/qr-code/qr-code.js rename to ui/components/ui/qr-code/qr-code.js index ae43dc49b..db0eeed2c 100644 --- a/ui/app/components/ui/qr-code/qr-code.js +++ b/ui/components/ui/qr-code/qr-code.js @@ -4,7 +4,7 @@ import qrCode from 'qrcode-generator'; import { connect } from 'react-redux'; import { isHexPrefixed } from 'ethereumjs-util'; import ReadOnlyInput from '../readonly-input/readonly-input'; -import { toChecksumHexAddress } from '../../../../../shared/modules/hexstring-utils'; +import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils'; export default connect(mapStateToProps)(QrCodeView); diff --git a/ui/app/components/ui/readonly-input/index.js b/ui/components/ui/readonly-input/index.js similarity index 100% rename from ui/app/components/ui/readonly-input/index.js rename to ui/components/ui/readonly-input/index.js diff --git a/ui/app/components/ui/readonly-input/index.scss b/ui/components/ui/readonly-input/index.scss similarity index 100% rename from ui/app/components/ui/readonly-input/index.scss rename to ui/components/ui/readonly-input/index.scss diff --git a/ui/app/components/ui/readonly-input/readonly-input.js b/ui/components/ui/readonly-input/readonly-input.js similarity index 100% rename from ui/app/components/ui/readonly-input/readonly-input.js rename to ui/components/ui/readonly-input/readonly-input.js diff --git a/ui/app/components/ui/search-icon/index.js b/ui/components/ui/search-icon/index.js similarity index 100% rename from ui/app/components/ui/search-icon/index.js rename to ui/components/ui/search-icon/index.js diff --git a/ui/app/components/ui/search-icon/search-icon.component.js b/ui/components/ui/search-icon/search-icon.component.js similarity index 100% rename from ui/app/components/ui/search-icon/search-icon.component.js rename to ui/components/ui/search-icon/search-icon.component.js diff --git a/ui/app/components/ui/sender-to-recipient/index.js b/ui/components/ui/sender-to-recipient/index.js similarity index 100% rename from ui/app/components/ui/sender-to-recipient/index.js rename to ui/components/ui/sender-to-recipient/index.js diff --git a/ui/app/components/ui/sender-to-recipient/index.scss b/ui/components/ui/sender-to-recipient/index.scss similarity index 100% rename from ui/app/components/ui/sender-to-recipient/index.scss rename to ui/components/ui/sender-to-recipient/index.scss diff --git a/ui/app/components/ui/sender-to-recipient/sender-to-recipient.component.js b/ui/components/ui/sender-to-recipient/sender-to-recipient.component.js similarity index 98% rename from ui/app/components/ui/sender-to-recipient/sender-to-recipient.component.js rename to ui/components/ui/sender-to-recipient/sender-to-recipient.component.js index 69db31e1d..30e42e46f 100644 --- a/ui/app/components/ui/sender-to-recipient/sender-to-recipient.component.js +++ b/ui/components/ui/sender-to-recipient/sender-to-recipient.component.js @@ -7,7 +7,7 @@ import Identicon from '../identicon'; import { shortenAddress } from '../../../helpers/utils/util'; import AccountMismatchWarning from '../account-mismatch-warning/account-mismatch-warning.component'; import { useI18nContext } from '../../../hooks/useI18nContext'; -import { toChecksumHexAddress } from '../../../../../shared/modules/hexstring-utils'; +import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils'; import { DEFAULT_VARIANT, CARDS_VARIANT, diff --git a/ui/app/components/ui/sender-to-recipient/sender-to-recipient.constants.js b/ui/components/ui/sender-to-recipient/sender-to-recipient.constants.js similarity index 100% rename from ui/app/components/ui/sender-to-recipient/sender-to-recipient.constants.js rename to ui/components/ui/sender-to-recipient/sender-to-recipient.constants.js diff --git a/ui/app/components/ui/site-icon/index.js b/ui/components/ui/site-icon/index.js similarity index 100% rename from ui/app/components/ui/site-icon/index.js rename to ui/components/ui/site-icon/index.js diff --git a/ui/app/components/ui/site-icon/site-icon.js b/ui/components/ui/site-icon/site-icon.js similarity index 100% rename from ui/app/components/ui/site-icon/site-icon.js rename to ui/components/ui/site-icon/site-icon.js diff --git a/ui/app/components/ui/snackbar/index.js b/ui/components/ui/snackbar/index.js similarity index 100% rename from ui/app/components/ui/snackbar/index.js rename to ui/components/ui/snackbar/index.js diff --git a/ui/app/components/ui/snackbar/index.scss b/ui/components/ui/snackbar/index.scss similarity index 100% rename from ui/app/components/ui/snackbar/index.scss rename to ui/components/ui/snackbar/index.scss diff --git a/ui/app/components/ui/snackbar/snackbar.component.js b/ui/components/ui/snackbar/snackbar.component.js similarity index 100% rename from ui/app/components/ui/snackbar/snackbar.component.js rename to ui/components/ui/snackbar/snackbar.component.js diff --git a/ui/app/components/ui/spinner/index.js b/ui/components/ui/spinner/index.js similarity index 100% rename from ui/app/components/ui/spinner/index.js rename to ui/components/ui/spinner/index.js diff --git a/ui/app/components/ui/spinner/spinner.component.js b/ui/components/ui/spinner/spinner.component.js similarity index 100% rename from ui/app/components/ui/spinner/spinner.component.js rename to ui/components/ui/spinner/spinner.component.js diff --git a/ui/app/components/ui/tabs/index.js b/ui/components/ui/tabs/index.js similarity index 100% rename from ui/app/components/ui/tabs/index.js rename to ui/components/ui/tabs/index.js diff --git a/ui/app/components/ui/tabs/index.scss b/ui/components/ui/tabs/index.scss similarity index 100% rename from ui/app/components/ui/tabs/index.scss rename to ui/components/ui/tabs/index.scss diff --git a/ui/app/components/ui/tabs/tab/index.js b/ui/components/ui/tabs/tab/index.js similarity index 100% rename from ui/app/components/ui/tabs/tab/index.js rename to ui/components/ui/tabs/tab/index.js diff --git a/ui/app/components/ui/tabs/tab/index.scss b/ui/components/ui/tabs/tab/index.scss similarity index 100% rename from ui/app/components/ui/tabs/tab/index.scss rename to ui/components/ui/tabs/tab/index.scss diff --git a/ui/app/components/ui/tabs/tab/tab.component.js b/ui/components/ui/tabs/tab/tab.component.js similarity index 100% rename from ui/app/components/ui/tabs/tab/tab.component.js rename to ui/components/ui/tabs/tab/tab.component.js diff --git a/ui/app/components/ui/tabs/tabs.component.js b/ui/components/ui/tabs/tabs.component.js similarity index 100% rename from ui/app/components/ui/tabs/tabs.component.js rename to ui/components/ui/tabs/tabs.component.js diff --git a/ui/app/components/ui/tabs/tabs.stories.js b/ui/components/ui/tabs/tabs.stories.js similarity index 100% rename from ui/app/components/ui/tabs/tabs.stories.js rename to ui/components/ui/tabs/tabs.stories.js diff --git a/ui/app/components/ui/text-field/index.js b/ui/components/ui/text-field/index.js similarity index 100% rename from ui/app/components/ui/text-field/index.js rename to ui/components/ui/text-field/index.js diff --git a/ui/app/components/ui/text-field/text-field.component.js b/ui/components/ui/text-field/text-field.component.js similarity index 100% rename from ui/app/components/ui/text-field/text-field.component.js rename to ui/components/ui/text-field/text-field.component.js diff --git a/ui/app/components/ui/text-field/text-field.stories.js b/ui/components/ui/text-field/text-field.stories.js similarity index 100% rename from ui/app/components/ui/text-field/text-field.stories.js rename to ui/components/ui/text-field/text-field.stories.js diff --git a/ui/app/components/ui/toggle-button/index.js b/ui/components/ui/toggle-button/index.js similarity index 100% rename from ui/app/components/ui/toggle-button/index.js rename to ui/components/ui/toggle-button/index.js diff --git a/ui/app/components/ui/toggle-button/index.scss b/ui/components/ui/toggle-button/index.scss similarity index 100% rename from ui/app/components/ui/toggle-button/index.scss rename to ui/components/ui/toggle-button/index.scss diff --git a/ui/app/components/ui/toggle-button/toggle-button.component.js b/ui/components/ui/toggle-button/toggle-button.component.js similarity index 100% rename from ui/app/components/ui/toggle-button/toggle-button.component.js rename to ui/components/ui/toggle-button/toggle-button.component.js diff --git a/ui/app/components/ui/token-balance/index.js b/ui/components/ui/token-balance/index.js similarity index 100% rename from ui/app/components/ui/token-balance/index.js rename to ui/components/ui/token-balance/index.js diff --git a/ui/app/components/ui/token-balance/index.scss b/ui/components/ui/token-balance/index.scss similarity index 100% rename from ui/app/components/ui/token-balance/index.scss rename to ui/components/ui/token-balance/index.scss diff --git a/ui/app/components/ui/token-balance/token-balance.js b/ui/components/ui/token-balance/token-balance.js similarity index 100% rename from ui/app/components/ui/token-balance/token-balance.js rename to ui/components/ui/token-balance/token-balance.js diff --git a/ui/app/components/ui/token-currency-display/index.js b/ui/components/ui/token-currency-display/index.js similarity index 100% rename from ui/app/components/ui/token-currency-display/index.js rename to ui/components/ui/token-currency-display/index.js diff --git a/ui/app/components/ui/token-currency-display/token-currency-display.component.js b/ui/components/ui/token-currency-display/token-currency-display.component.js similarity index 100% rename from ui/app/components/ui/token-currency-display/token-currency-display.component.js rename to ui/components/ui/token-currency-display/token-currency-display.component.js diff --git a/ui/app/components/ui/token-input/index.js b/ui/components/ui/token-input/index.js similarity index 100% rename from ui/app/components/ui/token-input/index.js rename to ui/components/ui/token-input/index.js diff --git a/ui/app/components/ui/token-input/token-input.component.js b/ui/components/ui/token-input/token-input.component.js similarity index 98% rename from ui/app/components/ui/token-input/token-input.component.js rename to ui/components/ui/token-input/token-input.component.js index fe7001d4f..af11d86b5 100644 --- a/ui/app/components/ui/token-input/token-input.component.js +++ b/ui/components/ui/token-input/token-input.component.js @@ -8,7 +8,7 @@ import { multiplyCurrencies, } from '../../../helpers/utils/conversion-util'; import { ETH } from '../../../helpers/constants/common'; -import { addHexPrefix } from '../../../../../app/scripts/lib/util'; +import { addHexPrefix } from '../../../../app/scripts/lib/util'; /** * Component that allows user to enter token values as a number, and props receive a converted diff --git a/ui/app/components/ui/token-input/token-input.component.test.js b/ui/components/ui/token-input/token-input.component.test.js similarity index 100% rename from ui/app/components/ui/token-input/token-input.component.test.js rename to ui/components/ui/token-input/token-input.component.test.js diff --git a/ui/app/components/ui/token-input/token-input.container.js b/ui/components/ui/token-input/token-input.container.js similarity index 100% rename from ui/app/components/ui/token-input/token-input.container.js rename to ui/components/ui/token-input/token-input.container.js diff --git a/ui/app/components/ui/tooltip/index.js b/ui/components/ui/tooltip/index.js similarity index 100% rename from ui/app/components/ui/tooltip/index.js rename to ui/components/ui/tooltip/index.js diff --git a/ui/app/components/ui/tooltip/index.scss b/ui/components/ui/tooltip/index.scss similarity index 100% rename from ui/app/components/ui/tooltip/index.scss rename to ui/components/ui/tooltip/index.scss diff --git a/ui/app/components/ui/tooltip/tooltip.js b/ui/components/ui/tooltip/tooltip.js similarity index 100% rename from ui/app/components/ui/tooltip/tooltip.js rename to ui/components/ui/tooltip/tooltip.js diff --git a/ui/app/components/ui/truncated-definition-list/index.js b/ui/components/ui/truncated-definition-list/index.js similarity index 100% rename from ui/app/components/ui/truncated-definition-list/index.js rename to ui/components/ui/truncated-definition-list/index.js diff --git a/ui/app/components/ui/truncated-definition-list/truncated-definition-list.js b/ui/components/ui/truncated-definition-list/truncated-definition-list.js similarity index 100% rename from ui/app/components/ui/truncated-definition-list/truncated-definition-list.js rename to ui/components/ui/truncated-definition-list/truncated-definition-list.js diff --git a/ui/app/components/ui/truncated-definition-list/truncated-definition-list.scss b/ui/components/ui/truncated-definition-list/truncated-definition-list.scss similarity index 100% rename from ui/app/components/ui/truncated-definition-list/truncated-definition-list.scss rename to ui/components/ui/truncated-definition-list/truncated-definition-list.scss diff --git a/ui/app/components/ui/truncated-definition-list/truncated-definition-list.stories.js b/ui/components/ui/truncated-definition-list/truncated-definition-list.stories.js similarity index 100% rename from ui/app/components/ui/truncated-definition-list/truncated-definition-list.stories.js rename to ui/components/ui/truncated-definition-list/truncated-definition-list.stories.js diff --git a/ui/app/components/ui/typography/index.js b/ui/components/ui/typography/index.js similarity index 100% rename from ui/app/components/ui/typography/index.js rename to ui/components/ui/typography/index.js diff --git a/ui/app/components/ui/typography/typography.js b/ui/components/ui/typography/typography.js similarity index 100% rename from ui/app/components/ui/typography/typography.js rename to ui/components/ui/typography/typography.js diff --git a/ui/app/components/ui/typography/typography.scss b/ui/components/ui/typography/typography.scss similarity index 100% rename from ui/app/components/ui/typography/typography.scss rename to ui/components/ui/typography/typography.scss diff --git a/ui/app/components/ui/typography/typography.stories.js b/ui/components/ui/typography/typography.stories.js similarity index 100% rename from ui/app/components/ui/typography/typography.stories.js rename to ui/components/ui/typography/typography.stories.js diff --git a/ui/app/components/ui/ui-components.scss b/ui/components/ui/ui-components.scss similarity index 100% rename from ui/app/components/ui/ui-components.scss rename to ui/components/ui/ui-components.scss diff --git a/ui/app/components/ui/unit-input/index.js b/ui/components/ui/unit-input/index.js similarity index 100% rename from ui/app/components/ui/unit-input/index.js rename to ui/components/ui/unit-input/index.js diff --git a/ui/app/components/ui/unit-input/index.scss b/ui/components/ui/unit-input/index.scss similarity index 100% rename from ui/app/components/ui/unit-input/index.scss rename to ui/components/ui/unit-input/index.scss diff --git a/ui/app/components/ui/unit-input/unit-input.component.js b/ui/components/ui/unit-input/unit-input.component.js similarity index 100% rename from ui/app/components/ui/unit-input/unit-input.component.js rename to ui/components/ui/unit-input/unit-input.component.js diff --git a/ui/app/components/ui/unit-input/unit-input.component.test.js b/ui/components/ui/unit-input/unit-input.component.test.js similarity index 100% rename from ui/app/components/ui/unit-input/unit-input.component.test.js rename to ui/components/ui/unit-input/unit-input.component.test.js diff --git a/ui/app/components/ui/url-icon/index.js b/ui/components/ui/url-icon/index.js similarity index 100% rename from ui/app/components/ui/url-icon/index.js rename to ui/components/ui/url-icon/index.js diff --git a/ui/app/components/ui/url-icon/index.scss b/ui/components/ui/url-icon/index.scss similarity index 100% rename from ui/app/components/ui/url-icon/index.scss rename to ui/components/ui/url-icon/index.scss diff --git a/ui/app/components/ui/url-icon/url-icon.js b/ui/components/ui/url-icon/url-icon.js similarity index 100% rename from ui/app/components/ui/url-icon/url-icon.js rename to ui/components/ui/url-icon/url-icon.js diff --git a/ui/app/contexts/i18n.js b/ui/contexts/i18n.js similarity index 100% rename from ui/app/contexts/i18n.js rename to ui/contexts/i18n.js diff --git a/ui/app/contexts/metametrics.js b/ui/contexts/metametrics.js similarity index 98% rename from ui/app/contexts/metametrics.js rename to ui/contexts/metametrics.js index 5940f1088..7a1cafd80 100644 --- a/ui/app/contexts/metametrics.js +++ b/ui/contexts/metametrics.js @@ -17,7 +17,7 @@ import { } from '../selectors/selectors'; import { getSendToken } from '../selectors/send'; import { txDataSelector } from '../selectors/confirm-transaction'; -import { getEnvironmentType } from '../../../app/scripts/lib/util'; +import { getEnvironmentType } from '../../app/scripts/lib/util'; import { trackMetaMetricsEvent } from '../store/actions'; export const MetaMetricsContext = createContext(() => { diff --git a/ui/app/contexts/metametrics.new.js b/ui/contexts/metametrics.new.js similarity index 91% rename from ui/app/contexts/metametrics.new.js rename to ui/contexts/metametrics.new.js index e46638c13..720fd6ed0 100644 --- a/ui/app/contexts/metametrics.new.js +++ b/ui/contexts/metametrics.new.js @@ -16,7 +16,7 @@ import { matchPath, useLocation, useRouteMatch } from 'react-router-dom'; import { captureException, captureMessage } from '@sentry/browser'; import { omit } from 'lodash'; -import { getEnvironmentType } from '../../../app/scripts/lib/util'; +import { getEnvironmentType } from '../../app/scripts/lib/util'; import { PATH_NAME_MAP } from '../helpers/constants/routes'; import { txDataSelector } from '../selectors'; @@ -24,10 +24,10 @@ import { trackMetaMetricsEvent, trackMetaMetricsPage } from '../store/actions'; // type imports /** - * @typedef {import('../../../shared/constants/metametrics').MetaMetricsEventPayload} MetaMetricsEventPayload - * @typedef {import('../../../shared/constants/metametrics').MetaMetricsEventOptions} MetaMetricsEventOptions - * @typedef {import('../../../shared/constants/metametrics').MetaMetricsPageObject} MetaMetricsPageObject - * @typedef {import('../../../shared/constants/metametrics').MetaMetricsReferrerObject} MetaMetricsReferrerObject + * @typedef {import('../../shared/constants/metametrics').MetaMetricsEventPayload} MetaMetricsEventPayload + * @typedef {import('../../shared/constants/metametrics').MetaMetricsEventOptions} MetaMetricsEventOptions + * @typedef {import('../../shared/constants/metametrics').MetaMetricsPageObject} MetaMetricsPageObject + * @typedef {import('../../shared/constants/metametrics').MetaMetricsReferrerObject} MetaMetricsReferrerObject */ // types diff --git a/ui/app/css/base-styles.scss b/ui/css/base-styles.scss similarity index 78% rename from ui/app/css/base-styles.scss rename to ui/css/base-styles.scss index 4c209ff55..14ffafefc 100644 --- a/ui/app/css/base-styles.scss +++ b/ui/css/base-styles.scss @@ -31,11 +31,11 @@ html { /* This error class is used in the following files still: - /ui/app/pages/create-account/connect-hardware/index.js - /ui/app/pages/create-account/import-account/json.js - /ui/app/pages/create-account/import-account/private-key.js - /ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js - /ui/app/pages/keychains/restore-vault.js + /ui/pages/create-account/connect-hardware/index.js + /ui/pages/create-account/import-account/json.js + /ui/pages/create-account/import-account/private-key.js + /ui/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js + /ui/pages/keychains/restore-vault.js */ .error { color: #f7861c; @@ -45,8 +45,8 @@ html { /* This warning class is used in the following files still: - /ui/app/pages/create-account/import-account/json.js - /ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js + /ui/pages/create-account/import-account/json.js + /ui/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js */ .warning { color: #ffae00; diff --git a/ui/app/css/design-system/attributes.scss b/ui/css/design-system/attributes.scss similarity index 100% rename from ui/app/css/design-system/attributes.scss rename to ui/css/design-system/attributes.scss diff --git a/ui/app/css/design-system/breakpoints.scss b/ui/css/design-system/breakpoints.scss similarity index 100% rename from ui/app/css/design-system/breakpoints.scss rename to ui/css/design-system/breakpoints.scss diff --git a/ui/app/css/design-system/colors.scss b/ui/css/design-system/colors.scss similarity index 100% rename from ui/app/css/design-system/colors.scss rename to ui/css/design-system/colors.scss diff --git a/ui/app/css/design-system/deprecated-colors.scss b/ui/css/design-system/deprecated-colors.scss similarity index 100% rename from ui/app/css/design-system/deprecated-colors.scss rename to ui/css/design-system/deprecated-colors.scss diff --git a/ui/app/css/design-system/index.scss b/ui/css/design-system/index.scss similarity index 100% rename from ui/app/css/design-system/index.scss rename to ui/css/design-system/index.scss diff --git a/ui/app/css/design-system/typography.scss b/ui/css/design-system/typography.scss similarity index 92% rename from ui/app/css/design-system/typography.scss rename to ui/css/design-system/typography.scss index 707170c24..12b7d37ea 100644 --- a/ui/app/css/design-system/typography.scss +++ b/ui/css/design-system/typography.scss @@ -1,8 +1,8 @@ $fa-font-path: '/fonts/fontawesome'; -@import '../../../../node_modules/@fortawesome/fontawesome-free/scss/fontawesome'; -@import '../../../../node_modules/@fortawesome/fontawesome-free/scss/solid'; -@import '../../../../node_modules/@fortawesome/fontawesome-free/scss/regular'; +@import '../../../node_modules/@fortawesome/fontawesome-free/scss/fontawesome'; +@import '../../../node_modules/@fortawesome/fontawesome-free/scss/solid'; +@import '../../../node_modules/@fortawesome/fontawesome-free/scss/regular'; @font-face { font-family: 'Roboto'; diff --git a/ui/app/css/design-system/z-index.scss b/ui/css/design-system/z-index.scss similarity index 100% rename from ui/app/css/design-system/z-index.scss rename to ui/css/design-system/z-index.scss diff --git a/ui/app/css/index.scss b/ui/css/index.scss similarity index 93% rename from ui/app/css/index.scss rename to ui/css/index.scss index aa2604242..fb0009d89 100644 --- a/ui/app/css/index.scss +++ b/ui/css/index.scss @@ -27,4 +27,4 @@ /* Third Party Library Styles */ -@import '../../../node_modules/react-tippy/dist/tippy'; +@import '../../node_modules/react-tippy/dist/tippy'; diff --git a/ui/app/css/itcss/README.md b/ui/css/itcss/README.md similarity index 100% rename from ui/app/css/itcss/README.md rename to ui/css/itcss/README.md diff --git a/ui/app/css/itcss/components/index.scss b/ui/css/itcss/components/index.scss similarity index 100% rename from ui/app/css/itcss/components/index.scss rename to ui/css/itcss/components/index.scss diff --git a/ui/app/css/itcss/components/network.scss b/ui/css/itcss/components/network.scss similarity index 100% rename from ui/app/css/itcss/components/network.scss rename to ui/css/itcss/components/network.scss diff --git a/ui/app/css/itcss/components/newui-sections.scss b/ui/css/itcss/components/newui-sections.scss similarity index 100% rename from ui/app/css/itcss/components/newui-sections.scss rename to ui/css/itcss/components/newui-sections.scss diff --git a/ui/app/css/itcss/components/send.scss b/ui/css/itcss/components/send.scss similarity index 100% rename from ui/app/css/itcss/components/send.scss rename to ui/css/itcss/components/send.scss diff --git a/ui/app/css/itcss/settings/index.scss b/ui/css/itcss/settings/index.scss similarity index 100% rename from ui/app/css/itcss/settings/index.scss rename to ui/css/itcss/settings/index.scss diff --git a/ui/app/css/itcss/settings/variables.scss b/ui/css/itcss/settings/variables.scss similarity index 100% rename from ui/app/css/itcss/settings/variables.scss rename to ui/css/itcss/settings/variables.scss diff --git a/ui/app/css/itcss/tools/index.scss b/ui/css/itcss/tools/index.scss similarity index 100% rename from ui/app/css/itcss/tools/index.scss rename to ui/css/itcss/tools/index.scss diff --git a/ui/app/css/itcss/tools/utilities.scss b/ui/css/itcss/tools/utilities.scss similarity index 100% rename from ui/app/css/itcss/tools/utilities.scss rename to ui/css/itcss/tools/utilities.scss diff --git a/ui/app/css/reset.scss b/ui/css/reset.scss similarity index 100% rename from ui/app/css/reset.scss rename to ui/css/reset.scss diff --git a/ui/app/css/utilities/_colors.scss b/ui/css/utilities/_colors.scss similarity index 100% rename from ui/app/css/utilities/_colors.scss rename to ui/css/utilities/_colors.scss diff --git a/ui/app/css/utilities/_spacing.scss b/ui/css/utilities/_spacing.scss similarity index 100% rename from ui/app/css/utilities/_spacing.scss rename to ui/css/utilities/_spacing.scss diff --git a/ui/app/css/utilities/index.scss b/ui/css/utilities/index.scss similarity index 100% rename from ui/app/css/utilities/index.scss rename to ui/css/utilities/index.scss diff --git a/ui/app/ducks/alerts/enums.js b/ui/ducks/alerts/enums.js similarity index 100% rename from ui/app/ducks/alerts/enums.js rename to ui/ducks/alerts/enums.js diff --git a/ui/app/ducks/alerts/index.js b/ui/ducks/alerts/index.js similarity index 100% rename from ui/app/ducks/alerts/index.js rename to ui/ducks/alerts/index.js diff --git a/ui/app/ducks/alerts/invalid-custom-network.js b/ui/ducks/alerts/invalid-custom-network.js similarity index 93% rename from ui/app/ducks/alerts/invalid-custom-network.js rename to ui/ducks/alerts/invalid-custom-network.js index ab033ed46..da3bd2e54 100644 --- a/ui/app/ducks/alerts/invalid-custom-network.js +++ b/ui/ducks/alerts/invalid-custom-network.js @@ -1,6 +1,6 @@ import { createSlice } from '@reduxjs/toolkit'; -import { ALERT_TYPES } from '../../../../shared/constants/alerts'; +import { ALERT_TYPES } from '../../../shared/constants/alerts'; import { ALERT_STATE } from './enums'; // Constants diff --git a/ui/app/ducks/alerts/unconnected-account.js b/ui/ducks/alerts/unconnected-account.js similarity index 98% rename from ui/app/ducks/alerts/unconnected-account.js rename to ui/ducks/alerts/unconnected-account.js index 2020def25..748389e18 100644 --- a/ui/app/ducks/alerts/unconnected-account.js +++ b/ui/ducks/alerts/unconnected-account.js @@ -1,7 +1,7 @@ import { createSlice } from '@reduxjs/toolkit'; import { captureException } from '@sentry/browser'; -import { ALERT_TYPES } from '../../../../shared/constants/alerts'; +import { ALERT_TYPES } from '../../../shared/constants/alerts'; import * as actionConstants from '../../store/actionConstants'; import { addPermittedAccount, diff --git a/ui/app/ducks/app/app.js b/ui/ducks/app/app.js similarity index 100% rename from ui/app/ducks/app/app.js rename to ui/ducks/app/app.js diff --git a/ui/app/ducks/app/app.test.js b/ui/ducks/app/app.test.js similarity index 100% rename from ui/app/ducks/app/app.test.js rename to ui/ducks/app/app.test.js diff --git a/ui/app/ducks/confirm-transaction/confirm-transaction.duck.js b/ui/ducks/confirm-transaction/confirm-transaction.duck.js similarity index 100% rename from ui/app/ducks/confirm-transaction/confirm-transaction.duck.js rename to ui/ducks/confirm-transaction/confirm-transaction.duck.js diff --git a/ui/app/ducks/confirm-transaction/confirm-transaction.duck.test.js b/ui/ducks/confirm-transaction/confirm-transaction.duck.test.js similarity index 98% rename from ui/app/ducks/confirm-transaction/confirm-transaction.duck.test.js rename to ui/ducks/confirm-transaction/confirm-transaction.duck.test.js index 75e580a60..8df65c35a 100644 --- a/ui/app/ducks/confirm-transaction/confirm-transaction.duck.test.js +++ b/ui/ducks/confirm-transaction/confirm-transaction.duck.test.js @@ -4,8 +4,8 @@ import sinon from 'sinon'; import { ROPSTEN_CHAIN_ID, ROPSTEN_NETWORK_ID, -} from '../../../../shared/constants/network'; -import { TRANSACTION_STATUSES } from '../../../../shared/constants/transaction'; +} from '../../../shared/constants/network'; +import { TRANSACTION_STATUSES } from '../../../shared/constants/transaction'; import ConfirmTransactionReducer, * as actions from './confirm-transaction.duck'; diff --git a/ui/app/ducks/gas/gas-duck.test.js b/ui/ducks/gas/gas-duck.test.js similarity index 99% rename from ui/app/ducks/gas/gas-duck.test.js rename to ui/ducks/gas/gas-duck.test.js index e4e51beab..d4301f9b3 100644 --- a/ui/app/ducks/gas/gas-duck.test.js +++ b/ui/ducks/gas/gas-duck.test.js @@ -10,7 +10,7 @@ import GasReducer, { fetchBasicGasEstimates, } from './gas.duck'; -jest.mock('../../../lib/storage-helpers.js', () => ({ +jest.mock('../../helpers/utils/storage-helpers.js', () => ({ getStorageItem: jest.fn(), setStorageItem: jest.fn(), })); diff --git a/ui/app/ducks/gas/gas.duck.js b/ui/ducks/gas/gas.duck.js similarity index 98% rename from ui/app/ducks/gas/gas.duck.js rename to ui/ducks/gas/gas.duck.js index 48d277443..863d726fa 100644 --- a/ui/app/ducks/gas/gas.duck.js +++ b/ui/ducks/gas/gas.duck.js @@ -1,6 +1,9 @@ import { cloneDeep } from 'lodash'; import BigNumber from 'bignumber.js'; -import { getStorageItem, setStorageItem } from '../../../lib/storage-helpers'; +import { + getStorageItem, + setStorageItem, +} from '../../helpers/utils/storage-helpers'; import { decGWEIToHexWEI, getValueFromWeiHex, diff --git a/ui/app/ducks/history/history.js b/ui/ducks/history/history.js similarity index 100% rename from ui/app/ducks/history/history.js rename to ui/ducks/history/history.js diff --git a/ui/app/ducks/index.js b/ui/ducks/index.js similarity index 93% rename from ui/app/ducks/index.js rename to ui/ducks/index.js index 4782acc48..bae560536 100644 --- a/ui/app/ducks/index.js +++ b/ui/ducks/index.js @@ -1,5 +1,5 @@ import { combineReducers } from 'redux'; -import { ALERT_TYPES } from '../../../shared/constants/alerts'; +import { ALERT_TYPES } from '../../shared/constants/alerts'; import metamaskReducer from './metamask/metamask'; import localeMessagesReducer from './locale/locale'; import sendReducer from './send/send.duck'; diff --git a/ui/app/ducks/locale/locale.js b/ui/ducks/locale/locale.js similarity index 100% rename from ui/app/ducks/locale/locale.js rename to ui/ducks/locale/locale.js diff --git a/ui/app/ducks/metamask/metamask.js b/ui/ducks/metamask/metamask.js similarity index 98% rename from ui/app/ducks/metamask/metamask.js rename to ui/ducks/metamask/metamask.js index 7569f0ccb..95edd2f60 100644 --- a/ui/app/ducks/metamask/metamask.js +++ b/ui/ducks/metamask/metamask.js @@ -1,6 +1,6 @@ import * as actionConstants from '../../store/actionConstants'; -import { ALERT_TYPES } from '../../../../shared/constants/alerts'; -import { NETWORK_TYPE_RPC } from '../../../../shared/constants/network'; +import { ALERT_TYPES } from '../../../shared/constants/alerts'; +import { NETWORK_TYPE_RPC } from '../../../shared/constants/network'; export default function reduceMetamask(state = {}, action) { const metamaskState = { diff --git a/ui/app/ducks/metamask/metamask.test.js b/ui/ducks/metamask/metamask.test.js similarity index 100% rename from ui/app/ducks/metamask/metamask.test.js rename to ui/ducks/metamask/metamask.test.js diff --git a/ui/app/ducks/send/send-duck.test.js b/ui/ducks/send/send-duck.test.js similarity index 100% rename from ui/app/ducks/send/send-duck.test.js rename to ui/ducks/send/send-duck.test.js diff --git a/ui/app/ducks/send/send.duck.js b/ui/ducks/send/send.duck.js similarity index 100% rename from ui/app/ducks/send/send.duck.js rename to ui/ducks/send/send.duck.js diff --git a/ui/app/ducks/swaps/swaps.js b/ui/ducks/swaps/swaps.js similarity index 99% rename from ui/app/ducks/swaps/swaps.js rename to ui/ducks/swaps/swaps.js index f33b06745..349e913c1 100644 --- a/ui/app/ducks/swaps/swaps.js +++ b/ui/ducks/swaps/swaps.js @@ -58,8 +58,8 @@ import { QUOTES_NOT_AVAILABLE_ERROR, SWAP_FAILED_ERROR, SWAPS_FETCH_ORDER_CONFLICT, -} from '../../../../shared/constants/swaps'; -import { TRANSACTION_TYPES } from '../../../../shared/constants/transaction'; +} from '../../../shared/constants/swaps'; +import { TRANSACTION_TYPES } from '../../../shared/constants/transaction'; const GAS_PRICES_LOADING_STATES = { INITIAL: 'INITIAL', diff --git a/ui/app/ducks/swaps/swaps.test.js b/ui/ducks/swaps/swaps.test.js similarity index 98% rename from ui/app/ducks/swaps/swaps.test.js rename to ui/ducks/swaps/swaps.test.js index 585571d0e..a94869267 100644 --- a/ui/app/ducks/swaps/swaps.test.js +++ b/ui/ducks/swaps/swaps.test.js @@ -1,7 +1,7 @@ import nock from 'nock'; import { setSwapsLiveness } from '../../store/actions'; -import { setStorageItem } from '../../../lib/storage-helpers'; +import { setStorageItem } from '../../helpers/utils/storage-helpers'; import * as swaps from './swaps'; jest.mock('../../store/actions.js', () => ({ diff --git a/ui/app/helpers/constants/available-conversions.json b/ui/helpers/constants/available-conversions.json similarity index 100% rename from ui/app/helpers/constants/available-conversions.json rename to ui/helpers/constants/available-conversions.json diff --git a/ui/app/helpers/constants/common.js b/ui/helpers/constants/common.js similarity index 100% rename from ui/app/helpers/constants/common.js rename to ui/helpers/constants/common.js diff --git a/ui/app/helpers/constants/connected-sites.js b/ui/helpers/constants/connected-sites.js similarity index 100% rename from ui/app/helpers/constants/connected-sites.js rename to ui/helpers/constants/connected-sites.js diff --git a/ui/app/helpers/constants/design-system.js b/ui/helpers/constants/design-system.js similarity index 100% rename from ui/app/helpers/constants/design-system.js rename to ui/helpers/constants/design-system.js diff --git a/ui/app/helpers/constants/error-keys.js b/ui/helpers/constants/error-keys.js similarity index 100% rename from ui/app/helpers/constants/error-keys.js rename to ui/helpers/constants/error-keys.js diff --git a/ui/app/helpers/constants/routes.js b/ui/helpers/constants/routes.js similarity index 100% rename from ui/app/helpers/constants/routes.js rename to ui/helpers/constants/routes.js diff --git a/ui/app/helpers/constants/transactions.js b/ui/helpers/constants/transactions.js similarity index 91% rename from ui/app/helpers/constants/transactions.js rename to ui/helpers/constants/transactions.js index 288d497e2..614f0329d 100644 --- a/ui/app/helpers/constants/transactions.js +++ b/ui/helpers/constants/transactions.js @@ -1,7 +1,7 @@ import { TRANSACTION_TYPES, TRANSACTION_STATUSES, -} from '../../../../shared/constants/transaction'; +} from '../../../shared/constants/transaction'; export const PENDING_STATUS_HASH = { [TRANSACTION_STATUSES.UNAPPROVED]: true, diff --git a/ui/app/helpers/higher-order-components/authenticated/authenticated.component.js b/ui/helpers/higher-order-components/authenticated/authenticated.component.js similarity index 100% rename from ui/app/helpers/higher-order-components/authenticated/authenticated.component.js rename to ui/helpers/higher-order-components/authenticated/authenticated.component.js diff --git a/ui/app/helpers/higher-order-components/authenticated/authenticated.container.js b/ui/helpers/higher-order-components/authenticated/authenticated.container.js similarity index 100% rename from ui/app/helpers/higher-order-components/authenticated/authenticated.container.js rename to ui/helpers/higher-order-components/authenticated/authenticated.container.js diff --git a/ui/app/helpers/higher-order-components/authenticated/index.js b/ui/helpers/higher-order-components/authenticated/index.js similarity index 100% rename from ui/app/helpers/higher-order-components/authenticated/index.js rename to ui/helpers/higher-order-components/authenticated/index.js diff --git a/ui/app/helpers/higher-order-components/feature-toggled-route.js b/ui/helpers/higher-order-components/feature-toggled-route.js similarity index 100% rename from ui/app/helpers/higher-order-components/feature-toggled-route.js rename to ui/helpers/higher-order-components/feature-toggled-route.js diff --git a/ui/app/helpers/higher-order-components/initialized/index.js b/ui/helpers/higher-order-components/initialized/index.js similarity index 100% rename from ui/app/helpers/higher-order-components/initialized/index.js rename to ui/helpers/higher-order-components/initialized/index.js diff --git a/ui/app/helpers/higher-order-components/initialized/initialized.component.js b/ui/helpers/higher-order-components/initialized/initialized.component.js similarity index 100% rename from ui/app/helpers/higher-order-components/initialized/initialized.component.js rename to ui/helpers/higher-order-components/initialized/initialized.component.js diff --git a/ui/app/helpers/higher-order-components/initialized/initialized.container.js b/ui/helpers/higher-order-components/initialized/initialized.container.js similarity index 100% rename from ui/app/helpers/higher-order-components/initialized/initialized.container.js rename to ui/helpers/higher-order-components/initialized/initialized.container.js diff --git a/ui/app/helpers/higher-order-components/with-modal-props/index.js b/ui/helpers/higher-order-components/with-modal-props/index.js similarity index 100% rename from ui/app/helpers/higher-order-components/with-modal-props/index.js rename to ui/helpers/higher-order-components/with-modal-props/index.js diff --git a/ui/app/helpers/higher-order-components/with-modal-props/with-modal-props.js b/ui/helpers/higher-order-components/with-modal-props/with-modal-props.js similarity index 100% rename from ui/app/helpers/higher-order-components/with-modal-props/with-modal-props.js rename to ui/helpers/higher-order-components/with-modal-props/with-modal-props.js diff --git a/ui/app/helpers/higher-order-components/with-modal-props/with-modal-props.test.js b/ui/helpers/higher-order-components/with-modal-props/with-modal-props.test.js similarity index 100% rename from ui/app/helpers/higher-order-components/with-modal-props/with-modal-props.test.js rename to ui/helpers/higher-order-components/with-modal-props/with-modal-props.test.js diff --git a/ui/lib/account-link.js b/ui/helpers/utils/account-link.js similarity index 100% rename from ui/lib/account-link.js rename to ui/helpers/utils/account-link.js diff --git a/ui/lib/account-link.test.js b/ui/helpers/utils/account-link.test.js similarity index 97% rename from ui/lib/account-link.test.js rename to ui/helpers/utils/account-link.test.js index 4e464309f..b5c430b87 100644 --- a/ui/lib/account-link.test.js +++ b/ui/helpers/utils/account-link.test.js @@ -1,7 +1,7 @@ import { MAINNET_CHAIN_ID, ROPSTEN_CHAIN_ID, -} from '../../shared/constants/network'; +} from '../../../shared/constants/network'; import getAccountLink from './account-link'; describe('Account link', () => { diff --git a/ui/app/helpers/utils/common.util.js b/ui/helpers/utils/common.util.js similarity index 100% rename from ui/app/helpers/utils/common.util.js rename to ui/helpers/utils/common.util.js diff --git a/ui/app/helpers/utils/common.util.test.js b/ui/helpers/utils/common.util.test.js similarity index 100% rename from ui/app/helpers/utils/common.util.test.js rename to ui/helpers/utils/common.util.test.js diff --git a/ui/app/helpers/utils/confirm-tx.util.js b/ui/helpers/utils/confirm-tx.util.js similarity index 98% rename from ui/app/helpers/utils/confirm-tx.util.js rename to ui/helpers/utils/confirm-tx.util.js index 80fe2f3df..5ae5d13c3 100644 --- a/ui/app/helpers/utils/confirm-tx.util.js +++ b/ui/helpers/utils/confirm-tx.util.js @@ -1,7 +1,7 @@ import currencyFormatter from 'currency-formatter'; import currencies from 'currency-formatter/currencies'; import BigNumber from 'bignumber.js'; -import { addHexPrefix } from '../../../../app/scripts/lib/util'; +import { addHexPrefix } from '../../../app/scripts/lib/util'; import { unconfirmedTransactionsCountSelector } from '../../selectors'; import { diff --git a/ui/app/helpers/utils/confirm-tx.util.test.js b/ui/helpers/utils/confirm-tx.util.test.js similarity index 100% rename from ui/app/helpers/utils/confirm-tx.util.test.js rename to ui/helpers/utils/confirm-tx.util.test.js diff --git a/ui/app/helpers/utils/conversion-util.js b/ui/helpers/utils/conversion-util.js similarity index 100% rename from ui/app/helpers/utils/conversion-util.js rename to ui/helpers/utils/conversion-util.js diff --git a/ui/app/helpers/utils/conversion-util.test.js b/ui/helpers/utils/conversion-util.test.js similarity index 100% rename from ui/app/helpers/utils/conversion-util.test.js rename to ui/helpers/utils/conversion-util.test.js diff --git a/ui/app/helpers/utils/conversions.util.js b/ui/helpers/utils/conversions.util.js similarity index 98% rename from ui/app/helpers/utils/conversions.util.js rename to ui/helpers/utils/conversions.util.js index ce4fe8c51..b7c901d97 100644 --- a/ui/app/helpers/utils/conversions.util.js +++ b/ui/helpers/utils/conversions.util.js @@ -1,5 +1,5 @@ import { ETH, GWEI, WEI } from '../constants/common'; -import { addHexPrefix } from '../../../../app/scripts/lib/util'; +import { addHexPrefix } from '../../../app/scripts/lib/util'; import { conversionUtil, addCurrencies, diff --git a/ui/app/helpers/utils/conversions.util.test.js b/ui/helpers/utils/conversions.util.test.js similarity index 100% rename from ui/app/helpers/utils/conversions.util.test.js rename to ui/helpers/utils/conversions.util.test.js diff --git a/ui/app/helpers/utils/fetch-with-cache.js b/ui/helpers/utils/fetch-with-cache.js similarity index 90% rename from ui/app/helpers/utils/fetch-with-cache.js rename to ui/helpers/utils/fetch-with-cache.js index 6dc377593..f810864cc 100644 --- a/ui/app/helpers/utils/fetch-with-cache.js +++ b/ui/helpers/utils/fetch-with-cache.js @@ -1,5 +1,5 @@ -import { getStorageItem, setStorageItem } from '../../../lib/storage-helpers'; -import getFetchWithTimeout from '../../../../shared/modules/fetch-with-timeout'; +import getFetchWithTimeout from '../../../shared/modules/fetch-with-timeout'; +import { getStorageItem, setStorageItem } from './storage-helpers'; const fetchWithCache = async ( url, diff --git a/ui/app/helpers/utils/fetch-with-cache.test.js b/ui/helpers/utils/fetch-with-cache.test.js similarity index 97% rename from ui/app/helpers/utils/fetch-with-cache.test.js rename to ui/helpers/utils/fetch-with-cache.test.js index 76e295a77..7244e1d14 100644 --- a/ui/app/helpers/utils/fetch-with-cache.test.js +++ b/ui/helpers/utils/fetch-with-cache.test.js @@ -1,9 +1,9 @@ import nock from 'nock'; import sinon from 'sinon'; -import { getStorageItem, setStorageItem } from '../../../lib/storage-helpers'; +import { getStorageItem, setStorageItem } from './storage-helpers'; -jest.mock('../../../lib/storage-helpers.js', () => ({ +jest.mock('./storage-helpers.js', () => ({ getStorageItem: jest.fn(), setStorageItem: jest.fn(), })); diff --git a/ui/app/helpers/utils/formatters.js b/ui/helpers/utils/formatters.js similarity index 100% rename from ui/app/helpers/utils/formatters.js rename to ui/helpers/utils/formatters.js diff --git a/ui/app/helpers/utils/i18n-helper.js b/ui/helpers/utils/i18n-helper.js similarity index 97% rename from ui/app/helpers/utils/i18n-helper.js rename to ui/helpers/utils/i18n-helper.js index ea2d7049f..611d1f665 100644 --- a/ui/app/helpers/utils/i18n-helper.js +++ b/ui/helpers/utils/i18n-helper.js @@ -3,7 +3,7 @@ import React from 'react'; import log from 'loglevel'; import * as Sentry from '@sentry/browser'; -import getFetchWithTimeout from '../../../../shared/modules/fetch-with-timeout'; +import getFetchWithTimeout from '../../../shared/modules/fetch-with-timeout'; const fetchWithTimeout = getFetchWithTimeout(30000); diff --git a/ui/app/helpers/utils/i18n-helper.test.js b/ui/helpers/utils/i18n-helper.test.js similarity index 100% rename from ui/app/helpers/utils/i18n-helper.test.js rename to ui/helpers/utils/i18n-helper.test.js diff --git a/ui/lib/icon-factory.js b/ui/helpers/utils/icon-factory.js similarity index 97% rename from ui/lib/icon-factory.js rename to ui/helpers/utils/icon-factory.js index 132f5330d..5189dcfce 100644 --- a/ui/lib/icon-factory.js +++ b/ui/helpers/utils/icon-factory.js @@ -2,7 +2,7 @@ import contractMap from '@metamask/contract-metadata'; import { isValidHexAddress, toChecksumHexAddress, -} from '../../shared/modules/hexstring-utils'; +} from '../../../shared/modules/hexstring-utils'; let iconFactory; diff --git a/ui/lib/is-mobile-view.js b/ui/helpers/utils/is-mobile-view.js similarity index 100% rename from ui/lib/is-mobile-view.js rename to ui/helpers/utils/is-mobile-view.js diff --git a/ui/lib/storage-helpers.js b/ui/helpers/utils/storage-helpers.js similarity index 100% rename from ui/lib/storage-helpers.js rename to ui/helpers/utils/storage-helpers.js diff --git a/ui/app/helpers/utils/switch-direction.js b/ui/helpers/utils/switch-direction.js similarity index 100% rename from ui/app/helpers/utils/switch-direction.js rename to ui/helpers/utils/switch-direction.js diff --git a/ui/app/helpers/utils/token-util.js b/ui/helpers/utils/token-util.js similarity index 100% rename from ui/app/helpers/utils/token-util.js rename to ui/helpers/utils/token-util.js diff --git a/ui/app/helpers/utils/transactions.util.js b/ui/helpers/utils/transactions.util.js similarity index 98% rename from ui/app/helpers/utils/transactions.util.js rename to ui/helpers/utils/transactions.util.js index 99ce94fe5..21a33112a 100644 --- a/ui/app/helpers/utils/transactions.util.js +++ b/ui/helpers/utils/transactions.util.js @@ -3,12 +3,12 @@ import abi from 'human-standard-token-abi'; import { ethers } from 'ethers'; import log from 'loglevel'; -import { addHexPrefix } from '../../../../app/scripts/lib/util'; +import { addHexPrefix } from '../../../app/scripts/lib/util'; import { TRANSACTION_TYPES, TRANSACTION_GROUP_STATUSES, TRANSACTION_STATUSES, -} from '../../../../shared/constants/transaction'; +} from '../../../shared/constants/transaction'; import fetchWithCache from './fetch-with-cache'; import { addCurrencies } from './conversion-util'; diff --git a/ui/app/helpers/utils/transactions.util.test.js b/ui/helpers/utils/transactions.util.test.js similarity index 97% rename from ui/app/helpers/utils/transactions.util.test.js rename to ui/helpers/utils/transactions.util.test.js index 9af77ef0f..a8663c3a6 100644 --- a/ui/app/helpers/utils/transactions.util.test.js +++ b/ui/helpers/utils/transactions.util.test.js @@ -2,7 +2,7 @@ import { TRANSACTION_TYPES, TRANSACTION_GROUP_STATUSES, TRANSACTION_STATUSES, -} from '../../../../shared/constants/transaction'; +} from '../../../shared/constants/transaction'; import * as utils from './transactions.util'; describe('Transactions utils', () => { diff --git a/ui/lib/tx-helper.js b/ui/helpers/utils/tx-helper.js similarity index 92% rename from ui/lib/tx-helper.js rename to ui/helpers/utils/tx-helper.js index 7585b33fe..bdfc576e9 100644 --- a/ui/lib/tx-helper.js +++ b/ui/helpers/utils/tx-helper.js @@ -1,6 +1,6 @@ import log from 'loglevel'; -import { transactionMatchesNetwork } from '../../shared/modules/transaction.utils'; -import { valuesFor } from '../app/helpers/utils/util'; +import { transactionMatchesNetwork } from '../../../shared/modules/transaction.utils'; +import { valuesFor } from './util'; export default function txHelper( unapprovedTxs, diff --git a/ui/lib/tx-helper.test.js b/ui/helpers/utils/tx-helper.test.js similarity index 92% rename from ui/lib/tx-helper.test.js rename to ui/helpers/utils/tx-helper.test.js index 502da54af..75565a2d9 100644 --- a/ui/lib/tx-helper.test.js +++ b/ui/helpers/utils/tx-helper.test.js @@ -1,7 +1,7 @@ import { MAINNET_CHAIN_ID, MAINNET_NETWORK_ID, -} from '../../shared/constants/network'; +} from '../../../shared/constants/network'; import txHelper from './tx-helper'; describe('txHelper', () => { diff --git a/ui/app/helpers/utils/util.js b/ui/helpers/utils/util.js similarity index 98% rename from ui/app/helpers/utils/util.js rename to ui/helpers/utils/util.js index 512acaef8..23e49d716 100644 --- a/ui/app/helpers/utils/util.js +++ b/ui/helpers/utils/util.js @@ -3,7 +3,7 @@ import abi from 'human-standard-token-abi'; import BigNumber from 'bignumber.js'; import * as ethUtil from 'ethereumjs-util'; import { DateTime } from 'luxon'; -import { addHexPrefix } from '../../../../app/scripts/lib/util'; +import { addHexPrefix } from '../../../app/scripts/lib/util'; import { GOERLI_CHAIN_ID, KOVAN_CHAIN_ID, @@ -11,8 +11,8 @@ import { MAINNET_CHAIN_ID, RINKEBY_CHAIN_ID, ROPSTEN_CHAIN_ID, -} from '../../../../shared/constants/network'; -import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils'; +} from '../../../shared/constants/network'; +import { toChecksumHexAddress } from '../../../shared/modules/hexstring-utils'; // formatData :: ( date: ) -> String export function formatDate(date, format = "M/d/y 'at' T") { diff --git a/ui/app/helpers/utils/util.test.js b/ui/helpers/utils/util.test.js similarity index 100% rename from ui/app/helpers/utils/util.test.js rename to ui/helpers/utils/util.test.js diff --git a/ui/lib/webcam-utils.js b/ui/helpers/utils/webcam-utils.js similarity index 90% rename from ui/lib/webcam-utils.js rename to ui/helpers/utils/webcam-utils.js index 7dd4dd499..ef7e80160 100644 --- a/ui/lib/webcam-utils.js +++ b/ui/helpers/utils/webcam-utils.js @@ -4,8 +4,8 @@ import { ENVIRONMENT_TYPE_POPUP, PLATFORM_BRAVE, PLATFORM_FIREFOX, -} from '../../shared/constants/app'; -import { getEnvironmentType, getPlatform } from '../../app/scripts/lib/util'; +} from '../../../shared/constants/app'; +import { getEnvironmentType, getPlatform } from '../../../app/scripts/lib/util'; class WebcamUtils { static async checkStatus() { diff --git a/ui/app/hooks/useCancelTransaction.js b/ui/hooks/useCancelTransaction.js similarity index 100% rename from ui/app/hooks/useCancelTransaction.js rename to ui/hooks/useCancelTransaction.js diff --git a/ui/app/hooks/useCancelTransaction.test.js b/ui/hooks/useCancelTransaction.test.js similarity index 98% rename from ui/app/hooks/useCancelTransaction.test.js rename to ui/hooks/useCancelTransaction.test.js index 773f2dbb5..28453bc6c 100644 --- a/ui/app/hooks/useCancelTransaction.test.js +++ b/ui/hooks/useCancelTransaction.test.js @@ -1,7 +1,7 @@ import * as reactRedux from 'react-redux'; import { renderHook } from '@testing-library/react-hooks'; import sinon from 'sinon'; -import transactions from '../../../test/data/transaction-data.json'; +import transactions from '../../test/data/transaction-data.json'; import { getConversionRate, getSelectedAccount } from '../selectors'; import { showModal } from '../store/actions'; import { increaseLastGasPrice } from '../helpers/utils/confirm-tx.util'; diff --git a/ui/app/hooks/useCopyToClipboard.js b/ui/hooks/useCopyToClipboard.js similarity index 100% rename from ui/app/hooks/useCopyToClipboard.js rename to ui/hooks/useCopyToClipboard.js diff --git a/ui/app/hooks/useCurrencyDisplay.js b/ui/hooks/useCurrencyDisplay.js similarity index 100% rename from ui/app/hooks/useCurrencyDisplay.js rename to ui/hooks/useCurrencyDisplay.js diff --git a/ui/app/hooks/useCurrencyDisplay.test.js b/ui/hooks/useCurrencyDisplay.test.js similarity index 100% rename from ui/app/hooks/useCurrencyDisplay.test.js rename to ui/hooks/useCurrencyDisplay.test.js diff --git a/ui/app/hooks/useCurrentAsset.js b/ui/hooks/useCurrentAsset.js similarity index 96% rename from ui/app/hooks/useCurrentAsset.js rename to ui/hooks/useCurrentAsset.js index 832576a0c..068d076e7 100644 --- a/ui/app/hooks/useCurrentAsset.js +++ b/ui/hooks/useCurrentAsset.js @@ -6,7 +6,7 @@ import { ASSET_ROUTE } from '../helpers/constants/routes'; import { SWAPS_CHAINID_DEFAULT_TOKEN_MAP, ETH_SWAPS_TOKEN_OBJECT, -} from '../../../shared/constants/swaps'; +} from '../../shared/constants/swaps'; /** * Returns a token object for the asset that is currently being viewed. diff --git a/ui/app/hooks/useEqualityCheck.js b/ui/hooks/useEqualityCheck.js similarity index 100% rename from ui/app/hooks/useEqualityCheck.js rename to ui/hooks/useEqualityCheck.js diff --git a/ui/app/hooks/useEthFiatAmount.js b/ui/hooks/useEthFiatAmount.js similarity index 100% rename from ui/app/hooks/useEthFiatAmount.js rename to ui/hooks/useEthFiatAmount.js diff --git a/ui/app/hooks/useI18nContext.js b/ui/hooks/useI18nContext.js similarity index 100% rename from ui/app/hooks/useI18nContext.js rename to ui/hooks/useI18nContext.js diff --git a/ui/app/hooks/useMethodData.js b/ui/hooks/useMethodData.js similarity index 100% rename from ui/app/hooks/useMethodData.js rename to ui/hooks/useMethodData.js diff --git a/ui/app/hooks/useMetricEvent.js b/ui/hooks/useMetricEvent.js similarity index 92% rename from ui/app/hooks/useMetricEvent.js rename to ui/hooks/useMetricEvent.js index b30b37eb5..9ca7834f1 100644 --- a/ui/app/hooks/useMetricEvent.js +++ b/ui/hooks/useMetricEvent.js @@ -6,7 +6,7 @@ import { useEqualityCheck } from './useEqualityCheck'; // Type imports /** * @typedef {import('../contexts/metametrics.new').UIMetricsEventPayload} UIMetricsEventPayload - * @typedef {import('../../../shared/constants/metametrics').MetaMetricsEventOptions} MetaMetricsEventOptions + * @typedef {import('../../shared/constants/metametrics').MetaMetricsEventOptions} MetaMetricsEventOptions */ export function useMetricEvent(config = {}, overrides = {}) { diff --git a/ui/app/hooks/useOriginMetadata.js b/ui/hooks/useOriginMetadata.js similarity index 100% rename from ui/app/hooks/useOriginMetadata.js rename to ui/hooks/useOriginMetadata.js diff --git a/ui/app/hooks/usePrevious.js b/ui/hooks/usePrevious.js similarity index 100% rename from ui/app/hooks/usePrevious.js rename to ui/hooks/usePrevious.js diff --git a/ui/app/hooks/useRetryTransaction.js b/ui/hooks/useRetryTransaction.js similarity index 100% rename from ui/app/hooks/useRetryTransaction.js rename to ui/hooks/useRetryTransaction.js diff --git a/ui/app/hooks/useRetryTransaction.test.js b/ui/hooks/useRetryTransaction.test.js similarity index 97% rename from ui/app/hooks/useRetryTransaction.test.js rename to ui/hooks/useRetryTransaction.test.js index c32d98174..da12dfdf2 100644 --- a/ui/app/hooks/useRetryTransaction.test.js +++ b/ui/hooks/useRetryTransaction.test.js @@ -1,7 +1,7 @@ import * as reactRedux from 'react-redux'; import { renderHook } from '@testing-library/react-hooks'; import sinon from 'sinon'; -import transactions from '../../../test/data/transaction-data.json'; +import transactions from '../../test/data/transaction-data.json'; import { showSidebar } from '../store/actions'; import * as methodDataHook from './useMethodData'; import * as metricEventHook from './useMetricEvent'; diff --git a/ui/app/hooks/useShouldShowSpeedUp.js b/ui/hooks/useShouldShowSpeedUp.js similarity index 100% rename from ui/app/hooks/useShouldShowSpeedUp.js rename to ui/hooks/useShouldShowSpeedUp.js diff --git a/ui/app/hooks/useSwappedTokenValue.js b/ui/hooks/useSwappedTokenValue.js similarity index 96% rename from ui/app/hooks/useSwappedTokenValue.js rename to ui/hooks/useSwappedTokenValue.js index 6eff3726f..02a2a1a37 100644 --- a/ui/app/hooks/useSwappedTokenValue.js +++ b/ui/hooks/useSwappedTokenValue.js @@ -1,9 +1,9 @@ import { useSelector } from 'react-redux'; -import { TRANSACTION_TYPES } from '../../../shared/constants/transaction'; +import { TRANSACTION_TYPES } from '../../shared/constants/transaction'; import { isSwapsDefaultTokenAddress, isSwapsDefaultTokenSymbol, -} from '../../../shared/modules/swaps.utils'; +} from '../../shared/modules/swaps.utils'; import { getSwapsTokensReceivedFromTxMeta } from '../pages/swaps/swaps.util'; import { getCurrentChainId } from '../selectors'; import { useTokenFiatAmount } from './useTokenFiatAmount'; diff --git a/ui/app/hooks/useTimeout.js b/ui/hooks/useTimeout.js similarity index 100% rename from ui/app/hooks/useTimeout.js rename to ui/hooks/useTimeout.js diff --git a/ui/app/hooks/useTokenData.js b/ui/hooks/useTokenData.js similarity index 100% rename from ui/app/hooks/useTokenData.js rename to ui/hooks/useTokenData.js diff --git a/ui/app/hooks/useTokenData.test.js b/ui/hooks/useTokenData.test.js similarity index 96% rename from ui/app/hooks/useTokenData.test.js rename to ui/hooks/useTokenData.test.js index 7c5ed8572..1e80f5c9e 100644 --- a/ui/app/hooks/useTokenData.test.js +++ b/ui/hooks/useTokenData.test.js @@ -1,7 +1,7 @@ /* eslint-disable jest/no-conditional-expect */ import { ethers } from 'ethers'; import { renderHook } from '@testing-library/react-hooks'; -import { TRANSACTION_TYPES } from '../../../shared/constants/transaction'; +import { TRANSACTION_TYPES } from '../../shared/constants/transaction'; import { useTokenData } from './useTokenData'; const tests = [ diff --git a/ui/app/hooks/useTokenDisplayValue.js b/ui/hooks/useTokenDisplayValue.js similarity index 100% rename from ui/app/hooks/useTokenDisplayValue.js rename to ui/hooks/useTokenDisplayValue.js diff --git a/ui/app/hooks/useTokenDisplayValue.test.js b/ui/hooks/useTokenDisplayValue.test.js similarity index 100% rename from ui/app/hooks/useTokenDisplayValue.test.js rename to ui/hooks/useTokenDisplayValue.test.js diff --git a/ui/app/hooks/useTokenFiatAmount.js b/ui/hooks/useTokenFiatAmount.js similarity index 100% rename from ui/app/hooks/useTokenFiatAmount.js rename to ui/hooks/useTokenFiatAmount.js diff --git a/ui/app/hooks/useTokenTracker.js b/ui/hooks/useTokenTracker.js similarity index 100% rename from ui/app/hooks/useTokenTracker.js rename to ui/hooks/useTokenTracker.js diff --git a/ui/app/hooks/useTokensToSearch.js b/ui/hooks/useTokensToSearch.js similarity index 96% rename from ui/app/hooks/useTokensToSearch.js rename to ui/hooks/useTokensToSearch.js index e4bc6495e..371530630 100644 --- a/ui/app/hooks/useTokensToSearch.js +++ b/ui/hooks/useTokensToSearch.js @@ -12,8 +12,8 @@ import { getCurrentChainId, } from '../selectors'; import { getSwapsTokens } from '../ducks/swaps/swaps'; -import { isSwapsDefaultTokenSymbol } from '../../../shared/modules/swaps.utils'; -import { toChecksumHexAddress } from '../../../shared/modules/hexstring-utils'; +import { toChecksumHexAddress } from '../../shared/modules/hexstring-utils'; +import { isSwapsDefaultTokenSymbol } from '../../shared/modules/swaps.utils'; import { useEqualityCheck } from './useEqualityCheck'; const tokenList = shuffle( diff --git a/ui/app/hooks/useTransactionDisplayData.js b/ui/hooks/useTransactionDisplayData.js similarity index 99% rename from ui/app/hooks/useTransactionDisplayData.js rename to ui/hooks/useTransactionDisplayData.js index dc589f858..1fad5d2c7 100644 --- a/ui/app/hooks/useTransactionDisplayData.js +++ b/ui/hooks/useTransactionDisplayData.js @@ -22,7 +22,7 @@ import { TRANSACTION_TYPES, TRANSACTION_GROUP_CATEGORIES, TRANSACTION_STATUSES, -} from '../../../shared/constants/transaction'; +} from '../../shared/constants/transaction'; import { useI18nContext } from './useI18nContext'; import { useTokenFiatAmount } from './useTokenFiatAmount'; import { useUserPreferencedCurrency } from './useUserPreferencedCurrency'; diff --git a/ui/app/hooks/useTransactionDisplayData.test.js b/ui/hooks/useTransactionDisplayData.test.js similarity index 97% rename from ui/app/hooks/useTransactionDisplayData.test.js rename to ui/hooks/useTransactionDisplayData.test.js index aa0a9832d..e91566acf 100644 --- a/ui/app/hooks/useTransactionDisplayData.test.js +++ b/ui/hooks/useTransactionDisplayData.test.js @@ -3,7 +3,7 @@ import * as reactRedux from 'react-redux'; import { renderHook } from '@testing-library/react-hooks'; import sinon from 'sinon'; import { MemoryRouter } from 'react-router-dom'; -import transactions from '../../../test/data/transaction-data.json'; +import transactions from '../../test/data/transaction-data.json'; import { getPreferences, getShouldShowFiat, @@ -13,14 +13,14 @@ import { } from '../selectors'; import { getTokens } from '../ducks/metamask/metamask'; import { getMessage } from '../helpers/utils/i18n-helper'; -import messages from '../../../app/_locales/en/messages.json'; +import messages from '../../app/_locales/en/messages.json'; import { ASSET_ROUTE, DEFAULT_ROUTE } from '../helpers/constants/routes'; -import { MAINNET_CHAIN_ID } from '../../../shared/constants/network'; +import { MAINNET_CHAIN_ID } from '../../shared/constants/network'; import { TRANSACTION_TYPES, TRANSACTION_GROUP_CATEGORIES, TRANSACTION_STATUSES, -} from '../../../shared/constants/transaction'; +} from '../../shared/constants/transaction'; import * as i18nhooks from './useI18nContext'; import * as useTokenFiatAmountHooks from './useTokenFiatAmount'; import { useTransactionDisplayData } from './useTransactionDisplayData'; diff --git a/ui/app/hooks/useUserPreferencedCurrency.js b/ui/hooks/useUserPreferencedCurrency.js similarity index 100% rename from ui/app/hooks/useUserPreferencedCurrency.js rename to ui/hooks/useUserPreferencedCurrency.js diff --git a/ui/app/hooks/useUserPreferencedCurrency.test.js b/ui/hooks/useUserPreferencedCurrency.test.js similarity index 100% rename from ui/app/hooks/useUserPreferencedCurrency.test.js rename to ui/hooks/useUserPreferencedCurrency.test.js diff --git a/ui/index.js b/ui/index.js index 16a8f5c7d..4bc8409b0 100644 --- a/ui/index.js +++ b/ui/index.js @@ -7,24 +7,24 @@ import { getEnvironmentType } from '../app/scripts/lib/util'; import { ALERT_TYPES } from '../shared/constants/alerts'; import { SENTRY_STATE } from '../app/scripts/lib/setupSentry'; import { ENVIRONMENT_TYPE_POPUP } from '../shared/constants/app'; -import Root from './app/pages'; -import * as actions from './app/store/actions'; -import configureStore from './app/store/store'; -import txHelper from './lib/tx-helper'; +import * as actions from './store/actions'; +import configureStore from './store/store'; import { fetchLocale, loadRelativeTimeFormatLocaleData, -} from './app/helpers/utils/i18n-helper'; -import switchDirection from './app/helpers/utils/switch-direction'; +} from './helpers/utils/i18n-helper'; +import switchDirection from './helpers/utils/switch-direction'; import { getPermittedAccountsForCurrentTab, getSelectedAddress, -} from './app/selectors'; -import { ALERT_STATE } from './app/ducks/alerts'; +} from './selectors'; +import { ALERT_STATE } from './ducks/alerts'; import { getUnconnectedAccountAlertEnabledness, getUnconnectedAccountAlertShown, -} from './app/ducks/metamask/metamask'; +} from './ducks/metamask/metamask'; +import Root from './pages'; +import txHelper from './helpers/utils/tx-helper'; log.setLevel(global.METAMASK_DEBUG ? 'debug' : 'warn'); diff --git a/ui/lib/shallow-with-context.js b/ui/lib/shallow-with-context.js deleted file mode 100644 index 9cfb1bd75..000000000 --- a/ui/lib/shallow-with-context.js +++ /dev/null @@ -1,7 +0,0 @@ -import { shallow } from 'enzyme'; - -export default function shallowWithContext(jsxComponent) { - return shallow(jsxComponent, { - context: { t: (str1, str2) => (str2 ? str1 + str2 : str1) }, - }); -} diff --git a/ui/lib/test-timeout.js b/ui/lib/test-timeout.js deleted file mode 100644 index 8c29780a1..000000000 --- a/ui/lib/test-timeout.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function timeout(time) { - return new Promise((resolve) => { - setTimeout(resolve, time || 1500); - }); -} diff --git a/ui/app/pages/add-token/add-token.component.js b/ui/pages/add-token/add-token.component.js similarity index 98% rename from ui/app/pages/add-token/add-token.component.js rename to ui/pages/add-token/add-token.component.js index cceeea624..f5c7d2077 100644 --- a/ui/app/pages/add-token/add-token.component.js +++ b/ui/pages/add-token/add-token.component.js @@ -6,8 +6,8 @@ import { CONFIRM_ADD_TOKEN_ROUTE } from '../../helpers/constants/routes'; import TextField from '../../components/ui/text-field'; import PageContainer from '../../components/ui/page-container'; import { Tabs, Tab } from '../../components/ui/tabs'; -import { addHexPrefix } from '../../../../app/scripts/lib/util'; -import { isValidHexAddress } from '../../../../shared/modules/hexstring-utils'; +import { isValidHexAddress } from '../../../shared/modules/hexstring-utils'; +import { addHexPrefix } from '../../../app/scripts/lib/util'; import TokenList from './token-list'; import TokenSearch from './token-search'; diff --git a/ui/app/pages/add-token/add-token.container.js b/ui/pages/add-token/add-token.container.js similarity index 100% rename from ui/app/pages/add-token/add-token.container.js rename to ui/pages/add-token/add-token.container.js diff --git a/ui/app/pages/add-token/add-token.test.js b/ui/pages/add-token/add-token.test.js similarity index 97% rename from ui/app/pages/add-token/add-token.test.js rename to ui/pages/add-token/add-token.test.js index e91feafa7..b94e06b60 100644 --- a/ui/app/pages/add-token/add-token.test.js +++ b/ui/pages/add-token/add-token.test.js @@ -2,7 +2,7 @@ import React from 'react'; import { Provider } from 'react-redux'; import sinon from 'sinon'; import configureMockStore from 'redux-mock-store'; -import { mountWithRouter } from '../../../../test/lib/render-helpers'; +import { mountWithRouter } from '../../../test/lib/render-helpers'; import AddToken from './add-token.container'; describe('Add Token', () => { diff --git a/ui/app/pages/add-token/index.js b/ui/pages/add-token/index.js similarity index 100% rename from ui/app/pages/add-token/index.js rename to ui/pages/add-token/index.js diff --git a/ui/app/pages/add-token/index.scss b/ui/pages/add-token/index.scss similarity index 100% rename from ui/app/pages/add-token/index.scss rename to ui/pages/add-token/index.scss diff --git a/ui/app/pages/add-token/token-list/index.js b/ui/pages/add-token/token-list/index.js similarity index 100% rename from ui/app/pages/add-token/token-list/index.js rename to ui/pages/add-token/token-list/index.js diff --git a/ui/app/pages/add-token/token-list/index.scss b/ui/pages/add-token/token-list/index.scss similarity index 100% rename from ui/app/pages/add-token/token-list/index.scss rename to ui/pages/add-token/token-list/index.scss diff --git a/ui/app/pages/add-token/token-list/token-list-placeholder/index.js b/ui/pages/add-token/token-list/token-list-placeholder/index.js similarity index 100% rename from ui/app/pages/add-token/token-list/token-list-placeholder/index.js rename to ui/pages/add-token/token-list/token-list-placeholder/index.js diff --git a/ui/app/pages/add-token/token-list/token-list-placeholder/index.scss b/ui/pages/add-token/token-list/token-list-placeholder/index.scss similarity index 100% rename from ui/app/pages/add-token/token-list/token-list-placeholder/index.scss rename to ui/pages/add-token/token-list/token-list-placeholder/index.scss diff --git a/ui/app/pages/add-token/token-list/token-list-placeholder/token-list-placeholder.component.js b/ui/pages/add-token/token-list/token-list-placeholder/token-list-placeholder.component.js similarity index 100% rename from ui/app/pages/add-token/token-list/token-list-placeholder/token-list-placeholder.component.js rename to ui/pages/add-token/token-list/token-list-placeholder/token-list-placeholder.component.js diff --git a/ui/app/pages/add-token/token-list/token-list.component.js b/ui/pages/add-token/token-list/token-list.component.js similarity index 100% rename from ui/app/pages/add-token/token-list/token-list.component.js rename to ui/pages/add-token/token-list/token-list.component.js diff --git a/ui/app/pages/add-token/token-list/token-list.container.js b/ui/pages/add-token/token-list/token-list.container.js similarity index 100% rename from ui/app/pages/add-token/token-list/token-list.container.js rename to ui/pages/add-token/token-list/token-list.container.js diff --git a/ui/app/pages/add-token/token-search/index.js b/ui/pages/add-token/token-search/index.js similarity index 100% rename from ui/app/pages/add-token/token-search/index.js rename to ui/pages/add-token/token-search/index.js diff --git a/ui/app/pages/add-token/token-search/token-search.component.js b/ui/pages/add-token/token-search/token-search.component.js similarity index 100% rename from ui/app/pages/add-token/token-search/token-search.component.js rename to ui/pages/add-token/token-search/token-search.component.js diff --git a/ui/app/pages/asset/asset.js b/ui/pages/asset/asset.js similarity index 100% rename from ui/app/pages/asset/asset.js rename to ui/pages/asset/asset.js diff --git a/ui/app/pages/asset/asset.scss b/ui/pages/asset/asset.scss similarity index 100% rename from ui/app/pages/asset/asset.scss rename to ui/pages/asset/asset.scss diff --git a/ui/app/pages/asset/components/asset-breadcrumb.js b/ui/pages/asset/components/asset-breadcrumb.js similarity index 100% rename from ui/app/pages/asset/components/asset-breadcrumb.js rename to ui/pages/asset/components/asset-breadcrumb.js diff --git a/ui/app/pages/asset/components/asset-navigation.js b/ui/pages/asset/components/asset-navigation.js similarity index 100% rename from ui/app/pages/asset/components/asset-navigation.js rename to ui/pages/asset/components/asset-navigation.js diff --git a/ui/app/pages/asset/components/asset-options.js b/ui/pages/asset/components/asset-options.js similarity index 100% rename from ui/app/pages/asset/components/asset-options.js rename to ui/pages/asset/components/asset-options.js diff --git a/ui/app/pages/asset/components/native-asset.js b/ui/pages/asset/components/native-asset.js similarity index 96% rename from ui/app/pages/asset/components/native-asset.js rename to ui/pages/asset/components/native-asset.js index f814c635a..cbb77aefd 100644 --- a/ui/app/pages/asset/components/native-asset.js +++ b/ui/pages/asset/components/native-asset.js @@ -11,7 +11,7 @@ import { getSelectedAddress, } from '../../../selectors/selectors'; import { showModal } from '../../../store/actions'; -import getAccountLink from '../../../../lib/account-link'; +import getAccountLink from '../../../helpers/utils/account-link'; import { DEFAULT_ROUTE } from '../../../helpers/constants/routes'; import AssetNavigation from './asset-navigation'; import AssetOptions from './asset-options'; diff --git a/ui/app/pages/asset/components/token-asset.js b/ui/pages/asset/components/token-asset.js similarity index 100% rename from ui/app/pages/asset/components/token-asset.js rename to ui/pages/asset/components/token-asset.js diff --git a/ui/app/pages/asset/index.js b/ui/pages/asset/index.js similarity index 100% rename from ui/app/pages/asset/index.js rename to ui/pages/asset/index.js diff --git a/ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js b/ui/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js similarity index 97% rename from ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js rename to ui/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js index 5c8c0e1d6..41d506644 100644 --- a/ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js +++ b/ui/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js @@ -3,8 +3,8 @@ import PropTypes from 'prop-types'; import Button from '../../components/ui/button'; import Identicon from '../../components/ui/identicon'; import TokenBalance from '../../components/ui/token-balance'; -import { getEnvironmentType } from '../../../../app/scripts/lib/util'; -import { ENVIRONMENT_TYPE_NOTIFICATION } from '../../../../shared/constants/app'; +import { getEnvironmentType } from '../../../app/scripts/lib/util'; +import { ENVIRONMENT_TYPE_NOTIFICATION } from '../../../shared/constants/app'; export default class ConfirmAddSuggestedToken extends Component { static contextTypes = { diff --git a/ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.container.js b/ui/pages/confirm-add-suggested-token/confirm-add-suggested-token.container.js similarity index 100% rename from ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.container.js rename to ui/pages/confirm-add-suggested-token/confirm-add-suggested-token.container.js diff --git a/ui/app/pages/confirm-add-suggested-token/index.js b/ui/pages/confirm-add-suggested-token/index.js similarity index 100% rename from ui/app/pages/confirm-add-suggested-token/index.js rename to ui/pages/confirm-add-suggested-token/index.js diff --git a/ui/app/pages/confirm-add-token/confirm-add-token.component.js b/ui/pages/confirm-add-token/confirm-add-token.component.js similarity index 100% rename from ui/app/pages/confirm-add-token/confirm-add-token.component.js rename to ui/pages/confirm-add-token/confirm-add-token.component.js diff --git a/ui/app/pages/confirm-add-token/confirm-add-token.container.js b/ui/pages/confirm-add-token/confirm-add-token.container.js similarity index 100% rename from ui/app/pages/confirm-add-token/confirm-add-token.container.js rename to ui/pages/confirm-add-token/confirm-add-token.container.js diff --git a/ui/app/pages/confirm-add-token/index.js b/ui/pages/confirm-add-token/index.js similarity index 100% rename from ui/app/pages/confirm-add-token/index.js rename to ui/pages/confirm-add-token/index.js diff --git a/ui/app/pages/confirm-add-token/index.scss b/ui/pages/confirm-add-token/index.scss similarity index 100% rename from ui/app/pages/confirm-add-token/index.scss rename to ui/pages/confirm-add-token/index.scss diff --git a/ui/app/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js b/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js similarity index 100% rename from ui/app/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js rename to ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js diff --git a/ui/app/pages/confirm-approve/confirm-approve-content/index.js b/ui/pages/confirm-approve/confirm-approve-content/index.js similarity index 100% rename from ui/app/pages/confirm-approve/confirm-approve-content/index.js rename to ui/pages/confirm-approve/confirm-approve-content/index.js diff --git a/ui/app/pages/confirm-approve/confirm-approve-content/index.scss b/ui/pages/confirm-approve/confirm-approve-content/index.scss similarity index 100% rename from ui/app/pages/confirm-approve/confirm-approve-content/index.scss rename to ui/pages/confirm-approve/confirm-approve-content/index.scss diff --git a/ui/app/pages/confirm-approve/confirm-approve.js b/ui/pages/confirm-approve/confirm-approve.js similarity index 100% rename from ui/app/pages/confirm-approve/confirm-approve.js rename to ui/pages/confirm-approve/confirm-approve.js diff --git a/ui/app/pages/confirm-approve/confirm-approve.util.js b/ui/pages/confirm-approve/confirm-approve.util.js similarity index 94% rename from ui/app/pages/confirm-approve/confirm-approve.util.js rename to ui/pages/confirm-approve/confirm-approve.util.js index 3345b0966..240925611 100644 --- a/ui/app/pages/confirm-approve/confirm-approve.util.js +++ b/ui/pages/confirm-approve/confirm-approve.util.js @@ -1,4 +1,4 @@ -import { TRANSACTION_TYPES } from '../../../../shared/constants/transaction'; +import { TRANSACTION_TYPES } from '../../../shared/constants/transaction'; import { decimalToHex } from '../../helpers/utils/conversions.util'; import { calcTokenValue, diff --git a/ui/app/pages/confirm-approve/index.js b/ui/pages/confirm-approve/index.js similarity index 100% rename from ui/app/pages/confirm-approve/index.js rename to ui/pages/confirm-approve/index.js diff --git a/ui/app/pages/confirm-approve/index.scss b/ui/pages/confirm-approve/index.scss similarity index 100% rename from ui/app/pages/confirm-approve/index.scss rename to ui/pages/confirm-approve/index.scss diff --git a/ui/app/pages/confirm-decrypt-message/confirm-decrypt-message.component.js b/ui/pages/confirm-decrypt-message/confirm-decrypt-message.component.js similarity index 98% rename from ui/app/pages/confirm-decrypt-message/confirm-decrypt-message.component.js rename to ui/pages/confirm-decrypt-message/confirm-decrypt-message.component.js index 3ed8f67c2..ffbbccf19 100644 --- a/ui/app/pages/confirm-decrypt-message/confirm-decrypt-message.component.js +++ b/ui/pages/confirm-decrypt-message/confirm-decrypt-message.component.js @@ -9,8 +9,8 @@ import Identicon from '../../components/ui/identicon'; import Tooltip from '../../components/ui/tooltip'; import Copy from '../../components/ui/icon/copy-icon.component'; -import { ENVIRONMENT_TYPE_NOTIFICATION } from '../../../../shared/constants/app'; -import { getEnvironmentType } from '../../../../app/scripts/lib/util'; +import { ENVIRONMENT_TYPE_NOTIFICATION } from '../../../shared/constants/app'; +import { getEnvironmentType } from '../../../app/scripts/lib/util'; import { conversionUtil } from '../../helpers/utils/conversion-util'; export default class ConfirmDecryptMessage extends Component { diff --git a/ui/app/pages/confirm-decrypt-message/confirm-decrypt-message.container.js b/ui/pages/confirm-decrypt-message/confirm-decrypt-message.container.js similarity index 100% rename from ui/app/pages/confirm-decrypt-message/confirm-decrypt-message.container.js rename to ui/pages/confirm-decrypt-message/confirm-decrypt-message.container.js diff --git a/ui/app/pages/confirm-decrypt-message/confirm-decrypt-message.scss b/ui/pages/confirm-decrypt-message/confirm-decrypt-message.scss similarity index 100% rename from ui/app/pages/confirm-decrypt-message/confirm-decrypt-message.scss rename to ui/pages/confirm-decrypt-message/confirm-decrypt-message.scss diff --git a/ui/app/pages/confirm-decrypt-message/index.js b/ui/pages/confirm-decrypt-message/index.js similarity index 100% rename from ui/app/pages/confirm-decrypt-message/index.js rename to ui/pages/confirm-decrypt-message/index.js diff --git a/ui/app/pages/confirm-deploy-contract/confirm-deploy-contract.component.js b/ui/pages/confirm-deploy-contract/confirm-deploy-contract.component.js similarity index 95% rename from ui/app/pages/confirm-deploy-contract/confirm-deploy-contract.component.js rename to ui/pages/confirm-deploy-contract/confirm-deploy-contract.component.js index 231cd484a..63026bfaa 100644 --- a/ui/app/pages/confirm-deploy-contract/confirm-deploy-contract.component.js +++ b/ui/pages/confirm-deploy-contract/confirm-deploy-contract.component.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import ConfirmTransactionBase from '../confirm-transaction-base'; -import { toBuffer } from '../../../../shared/modules/buffer-utils'; +import { toBuffer } from '../../../shared/modules/buffer-utils'; export default class ConfirmDeployContract extends Component { static contextTypes = { diff --git a/ui/app/pages/confirm-deploy-contract/confirm-deploy-contract.container.js b/ui/pages/confirm-deploy-contract/confirm-deploy-contract.container.js similarity index 100% rename from ui/app/pages/confirm-deploy-contract/confirm-deploy-contract.container.js rename to ui/pages/confirm-deploy-contract/confirm-deploy-contract.container.js diff --git a/ui/app/pages/confirm-deploy-contract/index.js b/ui/pages/confirm-deploy-contract/index.js similarity index 100% rename from ui/app/pages/confirm-deploy-contract/index.js rename to ui/pages/confirm-deploy-contract/index.js diff --git a/ui/app/pages/confirm-encryption-public-key/confirm-encryption-public-key.component.js b/ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.component.js similarity index 97% rename from ui/app/pages/confirm-encryption-public-key/confirm-encryption-public-key.component.js rename to ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.component.js index fb4100832..2382ea0bc 100644 --- a/ui/app/pages/confirm-encryption-public-key/confirm-encryption-public-key.component.js +++ b/ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.component.js @@ -5,8 +5,8 @@ import AccountListItem from '../../components/app/account-list-item'; import Button from '../../components/ui/button'; import Identicon from '../../components/ui/identicon'; -import { ENVIRONMENT_TYPE_NOTIFICATION } from '../../../../shared/constants/app'; -import { getEnvironmentType } from '../../../../app/scripts/lib/util'; +import { ENVIRONMENT_TYPE_NOTIFICATION } from '../../../shared/constants/app'; +import { getEnvironmentType } from '../../../app/scripts/lib/util'; import { conversionUtil } from '../../helpers/utils/conversion-util'; export default class ConfirmEncryptionPublicKey extends Component { diff --git a/ui/app/pages/confirm-encryption-public-key/confirm-encryption-public-key.container.js b/ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.container.js similarity index 100% rename from ui/app/pages/confirm-encryption-public-key/confirm-encryption-public-key.container.js rename to ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.container.js diff --git a/ui/app/pages/confirm-encryption-public-key/confirm-encryption-public-key.scss b/ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.scss similarity index 100% rename from ui/app/pages/confirm-encryption-public-key/confirm-encryption-public-key.scss rename to ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.scss diff --git a/ui/app/pages/confirm-encryption-public-key/index.js b/ui/pages/confirm-encryption-public-key/index.js similarity index 100% rename from ui/app/pages/confirm-encryption-public-key/index.js rename to ui/pages/confirm-encryption-public-key/index.js diff --git a/ui/app/pages/confirm-send-ether/confirm-send-ether.component.js b/ui/pages/confirm-send-ether/confirm-send-ether.component.js similarity index 100% rename from ui/app/pages/confirm-send-ether/confirm-send-ether.component.js rename to ui/pages/confirm-send-ether/confirm-send-ether.component.js diff --git a/ui/app/pages/confirm-send-ether/confirm-send-ether.container.js b/ui/pages/confirm-send-ether/confirm-send-ether.container.js similarity index 100% rename from ui/app/pages/confirm-send-ether/confirm-send-ether.container.js rename to ui/pages/confirm-send-ether/confirm-send-ether.container.js diff --git a/ui/app/pages/confirm-send-ether/index.js b/ui/pages/confirm-send-ether/index.js similarity index 100% rename from ui/app/pages/confirm-send-ether/index.js rename to ui/pages/confirm-send-ether/index.js diff --git a/ui/app/pages/confirm-send-token/confirm-send-token.component.js b/ui/pages/confirm-send-token/confirm-send-token.component.js similarity index 100% rename from ui/app/pages/confirm-send-token/confirm-send-token.component.js rename to ui/pages/confirm-send-token/confirm-send-token.component.js diff --git a/ui/app/pages/confirm-send-token/confirm-send-token.container.js b/ui/pages/confirm-send-token/confirm-send-token.container.js similarity index 100% rename from ui/app/pages/confirm-send-token/confirm-send-token.container.js rename to ui/pages/confirm-send-token/confirm-send-token.container.js diff --git a/ui/app/pages/confirm-send-token/index.js b/ui/pages/confirm-send-token/index.js similarity index 100% rename from ui/app/pages/confirm-send-token/index.js rename to ui/pages/confirm-send-token/index.js diff --git a/ui/app/pages/confirm-token-transaction-base/confirm-token-transaction-base.component.js b/ui/pages/confirm-token-transaction-base/confirm-token-transaction-base.component.js similarity index 100% rename from ui/app/pages/confirm-token-transaction-base/confirm-token-transaction-base.component.js rename to ui/pages/confirm-token-transaction-base/confirm-token-transaction-base.component.js diff --git a/ui/app/pages/confirm-token-transaction-base/confirm-token-transaction-base.container.js b/ui/pages/confirm-token-transaction-base/confirm-token-transaction-base.container.js similarity index 100% rename from ui/app/pages/confirm-token-transaction-base/confirm-token-transaction-base.container.js rename to ui/pages/confirm-token-transaction-base/confirm-token-transaction-base.container.js diff --git a/ui/app/pages/confirm-token-transaction-base/index.js b/ui/pages/confirm-token-transaction-base/index.js similarity index 100% rename from ui/app/pages/confirm-token-transaction-base/index.js rename to ui/pages/confirm-token-transaction-base/index.js diff --git a/ui/app/pages/confirm-transaction-base/confirm-transaction-base.component.js b/ui/pages/confirm-transaction-base/confirm-transaction-base.component.js similarity index 98% rename from ui/app/pages/confirm-transaction-base/confirm-transaction-base.component.js rename to ui/pages/confirm-transaction-base/confirm-transaction-base.component.js index 0192ad75f..2408f872a 100644 --- a/ui/app/pages/confirm-transaction-base/confirm-transaction-base.component.js +++ b/ui/pages/confirm-transaction-base/confirm-transaction-base.component.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import { ENVIRONMENT_TYPE_NOTIFICATION } from '../../../../shared/constants/app'; -import { getEnvironmentType } from '../../../../app/scripts/lib/util'; +import { ENVIRONMENT_TYPE_NOTIFICATION } from '../../../shared/constants/app'; +import { getEnvironmentType } from '../../../app/scripts/lib/util'; import ConfirmPageContainer, { ConfirmDetailRow, } from '../../components/app/confirm-page-container'; @@ -22,9 +22,9 @@ import TextField from '../../components/ui/text-field'; import { TRANSACTION_TYPES, TRANSACTION_STATUSES, -} from '../../../../shared/constants/transaction'; +} from '../../../shared/constants/transaction'; import { getTransactionTypeTitle } from '../../helpers/utils/transactions.util'; -import { toBuffer } from '../../../../shared/modules/buffer-utils'; +import { toBuffer } from '../../../shared/modules/buffer-utils'; import ErrorMessage from '../../components/ui/error-message'; export default class ConfirmTransactionBase extends Component { diff --git a/ui/app/pages/confirm-transaction-base/confirm-transaction-base.component.test.js b/ui/pages/confirm-transaction-base/confirm-transaction-base.component.test.js similarity index 100% rename from ui/app/pages/confirm-transaction-base/confirm-transaction-base.component.test.js rename to ui/pages/confirm-transaction-base/confirm-transaction-base.component.test.js diff --git a/ui/app/pages/confirm-transaction-base/confirm-transaction-base.container.js b/ui/pages/confirm-transaction-base/confirm-transaction-base.container.js similarity index 98% rename from ui/app/pages/confirm-transaction-base/confirm-transaction-base.container.js rename to ui/pages/confirm-transaction-base/confirm-transaction-base.container.js index a9a87219d..a043ee8d4 100644 --- a/ui/app/pages/confirm-transaction-base/confirm-transaction-base.container.js +++ b/ui/pages/confirm-transaction-base/confirm-transaction-base.container.js @@ -37,8 +37,8 @@ import { getIsEthGasPriceFetched, } from '../../selectors'; import { getMostRecentOverviewPage } from '../../ducks/history/history'; -import { transactionMatchesNetwork } from '../../../../shared/modules/transaction.utils'; -import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils'; +import { toChecksumHexAddress } from '../../../shared/modules/hexstring-utils'; +import { transactionMatchesNetwork } from '../../../shared/modules/transaction.utils'; import ConfirmTransactionBase from './confirm-transaction-base.component'; const casedContractMap = Object.keys(contractMap).reduce((acc, base) => { diff --git a/ui/app/pages/confirm-transaction-base/index.js b/ui/pages/confirm-transaction-base/index.js similarity index 100% rename from ui/app/pages/confirm-transaction-base/index.js rename to ui/pages/confirm-transaction-base/index.js diff --git a/ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.component.js b/ui/pages/confirm-transaction-switch/confirm-transaction-switch.component.js similarity index 95% rename from ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.component.js rename to ui/pages/confirm-transaction-switch/confirm-transaction-switch.component.js index 83aa7cdbc..6a708e54d 100644 --- a/ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.component.js +++ b/ui/pages/confirm-transaction-switch/confirm-transaction-switch.component.js @@ -14,8 +14,8 @@ import { DECRYPT_MESSAGE_REQUEST_PATH, ENCRYPTION_PUBLIC_KEY_REQUEST_PATH, } from '../../helpers/constants/routes'; -import { MESSAGE_TYPE } from '../../../../shared/constants/app'; -import { TRANSACTION_TYPES } from '../../../../shared/constants/transaction'; +import { MESSAGE_TYPE } from '../../../shared/constants/app'; +import { TRANSACTION_TYPES } from '../../../shared/constants/transaction'; export default class ConfirmTransactionSwitch extends Component { static propTypes = { diff --git a/ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.container.js b/ui/pages/confirm-transaction-switch/confirm-transaction-switch.container.js similarity index 100% rename from ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.container.js rename to ui/pages/confirm-transaction-switch/confirm-transaction-switch.container.js diff --git a/ui/app/pages/confirm-transaction-switch/index.js b/ui/pages/confirm-transaction-switch/index.js similarity index 100% rename from ui/app/pages/confirm-transaction-switch/index.js rename to ui/pages/confirm-transaction-switch/index.js diff --git a/ui/app/pages/confirm-transaction/conf-tx.js b/ui/pages/confirm-transaction/conf-tx.js similarity index 97% rename from ui/app/pages/confirm-transaction/conf-tx.js rename to ui/pages/confirm-transaction/conf-tx.js index ef8657424..23f6e2375 100644 --- a/ui/app/pages/confirm-transaction/conf-tx.js +++ b/ui/pages/confirm-transaction/conf-tx.js @@ -5,13 +5,13 @@ import { withRouter } from 'react-router-dom'; import { compose } from 'redux'; import log from 'loglevel'; import * as actions from '../../store/actions'; -import txHelper from '../../../lib/tx-helper'; +import txHelper from '../../helpers/utils/tx-helper'; import SignatureRequest from '../../components/app/signature-request'; import SignatureRequestOriginal from '../../components/app/signature-request-original'; import Loading from '../../components/ui/loading-screen'; import { getMostRecentOverviewPage } from '../../ducks/history/history'; -import { MESSAGE_TYPE } from '../../../../shared/constants/app'; -import { TRANSACTION_STATUSES } from '../../../../shared/constants/transaction'; +import { MESSAGE_TYPE } from '../../../shared/constants/app'; +import { TRANSACTION_STATUSES } from '../../../shared/constants/transaction'; function mapStateToProps(state) { const { metamask, appState } = state; diff --git a/ui/app/pages/confirm-transaction/confirm-transaction.component.js b/ui/pages/confirm-transaction/confirm-transaction.component.js similarity index 100% rename from ui/app/pages/confirm-transaction/confirm-transaction.component.js rename to ui/pages/confirm-transaction/confirm-transaction.component.js diff --git a/ui/app/pages/confirm-transaction/confirm-transaction.container.js b/ui/pages/confirm-transaction/confirm-transaction.container.js similarity index 100% rename from ui/app/pages/confirm-transaction/confirm-transaction.container.js rename to ui/pages/confirm-transaction/confirm-transaction.container.js diff --git a/ui/app/pages/confirm-transaction/index.js b/ui/pages/confirm-transaction/index.js similarity index 100% rename from ui/app/pages/confirm-transaction/index.js rename to ui/pages/confirm-transaction/index.js diff --git a/ui/app/pages/confirmation/components/confirmation-footer/confirmation-footer.js b/ui/pages/confirmation/components/confirmation-footer/confirmation-footer.js similarity index 100% rename from ui/app/pages/confirmation/components/confirmation-footer/confirmation-footer.js rename to ui/pages/confirmation/components/confirmation-footer/confirmation-footer.js diff --git a/ui/app/pages/confirmation/components/confirmation-footer/confirmation-footer.scss b/ui/pages/confirmation/components/confirmation-footer/confirmation-footer.scss similarity index 100% rename from ui/app/pages/confirmation/components/confirmation-footer/confirmation-footer.scss rename to ui/pages/confirmation/components/confirmation-footer/confirmation-footer.scss diff --git a/ui/app/pages/confirmation/components/confirmation-footer/index.js b/ui/pages/confirmation/components/confirmation-footer/index.js similarity index 100% rename from ui/app/pages/confirmation/components/confirmation-footer/index.js rename to ui/pages/confirmation/components/confirmation-footer/index.js diff --git a/ui/app/pages/confirmation/confirmation.js b/ui/pages/confirmation/confirmation.js similarity index 100% rename from ui/app/pages/confirmation/confirmation.js rename to ui/pages/confirmation/confirmation.js diff --git a/ui/app/pages/confirmation/confirmation.scss b/ui/pages/confirmation/confirmation.scss similarity index 100% rename from ui/app/pages/confirmation/confirmation.scss rename to ui/pages/confirmation/confirmation.scss diff --git a/ui/app/pages/confirmation/index.js b/ui/pages/confirmation/index.js similarity index 100% rename from ui/app/pages/confirmation/index.js rename to ui/pages/confirmation/index.js diff --git a/ui/app/pages/confirmation/templates/add-ethereum-chain.js b/ui/pages/confirmation/templates/add-ethereum-chain.js similarity index 100% rename from ui/app/pages/confirmation/templates/add-ethereum-chain.js rename to ui/pages/confirmation/templates/add-ethereum-chain.js diff --git a/ui/app/pages/confirmation/templates/index.js b/ui/pages/confirmation/templates/index.js similarity index 98% rename from ui/app/pages/confirmation/templates/index.js rename to ui/pages/confirmation/templates/index.js index 3c90a68fd..a4e873735 100644 --- a/ui/app/pages/confirmation/templates/index.js +++ b/ui/pages/confirmation/templates/index.js @@ -1,5 +1,5 @@ import { omit, pick } from 'lodash'; -import { MESSAGE_TYPE } from '../../../../../shared/constants/app'; +import { MESSAGE_TYPE } from '../../../../shared/constants/app'; import { rejectPendingApproval, resolvePendingApproval, diff --git a/ui/app/pages/confirmation/templates/switch-ethereum-chain.js b/ui/pages/confirmation/templates/switch-ethereum-chain.js similarity index 96% rename from ui/app/pages/confirmation/templates/switch-ethereum-chain.js rename to ui/pages/confirmation/templates/switch-ethereum-chain.js index 4dc351027..23f255bc6 100644 --- a/ui/app/pages/confirmation/templates/switch-ethereum-chain.js +++ b/ui/pages/confirmation/templates/switch-ethereum-chain.js @@ -1,5 +1,5 @@ import { ethErrors } from 'eth-rpc-errors'; -import { NETWORK_TYPE_RPC } from '../../../../../shared/constants/network'; +import { NETWORK_TYPE_RPC } from '../../../../shared/constants/network'; import { JUSTIFY_CONTENT, SEVERITIES, diff --git a/ui/app/pages/connected-accounts/connected-accounts.component.js b/ui/pages/connected-accounts/connected-accounts.component.js similarity index 100% rename from ui/app/pages/connected-accounts/connected-accounts.component.js rename to ui/pages/connected-accounts/connected-accounts.component.js diff --git a/ui/app/pages/connected-accounts/connected-accounts.container.js b/ui/pages/connected-accounts/connected-accounts.container.js similarity index 100% rename from ui/app/pages/connected-accounts/connected-accounts.container.js rename to ui/pages/connected-accounts/connected-accounts.container.js diff --git a/ui/app/pages/connected-accounts/index.js b/ui/pages/connected-accounts/index.js similarity index 100% rename from ui/app/pages/connected-accounts/index.js rename to ui/pages/connected-accounts/index.js diff --git a/ui/app/pages/connected-accounts/index.scss b/ui/pages/connected-accounts/index.scss similarity index 100% rename from ui/app/pages/connected-accounts/index.scss rename to ui/pages/connected-accounts/index.scss diff --git a/ui/app/pages/connected-sites/connected-sites.component.js b/ui/pages/connected-sites/connected-sites.component.js similarity index 100% rename from ui/app/pages/connected-sites/connected-sites.component.js rename to ui/pages/connected-sites/connected-sites.component.js diff --git a/ui/app/pages/connected-sites/connected-sites.container.js b/ui/pages/connected-sites/connected-sites.container.js similarity index 100% rename from ui/app/pages/connected-sites/connected-sites.container.js rename to ui/pages/connected-sites/connected-sites.container.js diff --git a/ui/app/pages/connected-sites/index.js b/ui/pages/connected-sites/index.js similarity index 100% rename from ui/app/pages/connected-sites/index.js rename to ui/pages/connected-sites/index.js diff --git a/ui/app/pages/connected-sites/index.scss b/ui/pages/connected-sites/index.scss similarity index 100% rename from ui/app/pages/connected-sites/index.scss rename to ui/pages/connected-sites/index.scss diff --git a/ui/app/pages/create-account/connect-hardware/account-list.js b/ui/pages/create-account/connect-hardware/account-list.js similarity index 99% rename from ui/app/pages/create-account/connect-hardware/account-list.js rename to ui/pages/create-account/connect-hardware/account-list.js index 7449b0f19..ae3b43437 100644 --- a/ui/app/pages/create-account/connect-hardware/account-list.js +++ b/ui/pages/create-account/connect-hardware/account-list.js @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; -import getAccountLink from '../../../../lib/account-link'; +import getAccountLink from '../../../helpers/utils/account-link'; import Button from '../../../components/ui/button'; import Checkbox from '../../../components/ui/check-box'; import Dropdown from '../../../components/ui/dropdown'; diff --git a/ui/app/pages/create-account/connect-hardware/index.js b/ui/pages/create-account/connect-hardware/index.js similarity index 100% rename from ui/app/pages/create-account/connect-hardware/index.js rename to ui/pages/create-account/connect-hardware/index.js diff --git a/ui/app/pages/create-account/connect-hardware/index.scss b/ui/pages/create-account/connect-hardware/index.scss similarity index 100% rename from ui/app/pages/create-account/connect-hardware/index.scss rename to ui/pages/create-account/connect-hardware/index.scss diff --git a/ui/app/pages/create-account/connect-hardware/select-hardware.js b/ui/pages/create-account/connect-hardware/select-hardware.js similarity index 100% rename from ui/app/pages/create-account/connect-hardware/select-hardware.js rename to ui/pages/create-account/connect-hardware/select-hardware.js diff --git a/ui/app/pages/create-account/create-account.component.js b/ui/pages/create-account/create-account.component.js similarity index 100% rename from ui/app/pages/create-account/create-account.component.js rename to ui/pages/create-account/create-account.component.js diff --git a/ui/app/pages/create-account/import-account/index.js b/ui/pages/create-account/import-account/index.js similarity index 100% rename from ui/app/pages/create-account/import-account/index.js rename to ui/pages/create-account/import-account/index.js diff --git a/ui/app/pages/create-account/import-account/index.scss b/ui/pages/create-account/import-account/index.scss similarity index 100% rename from ui/app/pages/create-account/import-account/index.scss rename to ui/pages/create-account/import-account/index.scss diff --git a/ui/app/pages/create-account/import-account/json.js b/ui/pages/create-account/import-account/json.js similarity index 100% rename from ui/app/pages/create-account/import-account/json.js rename to ui/pages/create-account/import-account/json.js diff --git a/ui/app/pages/create-account/import-account/private-key.js b/ui/pages/create-account/import-account/private-key.js similarity index 100% rename from ui/app/pages/create-account/import-account/private-key.js rename to ui/pages/create-account/import-account/private-key.js diff --git a/ui/app/pages/create-account/index.js b/ui/pages/create-account/index.js similarity index 100% rename from ui/app/pages/create-account/index.js rename to ui/pages/create-account/index.js diff --git a/ui/app/pages/create-account/index.scss b/ui/pages/create-account/index.scss similarity index 100% rename from ui/app/pages/create-account/index.scss rename to ui/pages/create-account/index.scss diff --git a/ui/app/pages/create-account/new-account.component.js b/ui/pages/create-account/new-account.component.js similarity index 100% rename from ui/app/pages/create-account/new-account.component.js rename to ui/pages/create-account/new-account.component.js diff --git a/ui/app/pages/create-account/new-account.container.js b/ui/pages/create-account/new-account.container.js similarity index 100% rename from ui/app/pages/create-account/new-account.container.js rename to ui/pages/create-account/new-account.container.js diff --git a/ui/app/pages/error/error.component.js b/ui/pages/error/error.component.js similarity index 93% rename from ui/app/pages/error/error.component.js rename to ui/pages/error/error.component.js index 92fad5fa6..eedb1ad64 100644 --- a/ui/app/pages/error/error.component.js +++ b/ui/pages/error/error.component.js @@ -1,7 +1,7 @@ import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; -import { getEnvironmentType } from '../../../../app/scripts/lib/util'; -import { ENVIRONMENT_TYPE_POPUP } from '../../../../shared/constants/app'; +import { getEnvironmentType } from '../../../app/scripts/lib/util'; +import { ENVIRONMENT_TYPE_POPUP } from '../../../shared/constants/app'; class ErrorPage extends PureComponent { static contextTypes = { diff --git a/ui/app/pages/error/index.js b/ui/pages/error/index.js similarity index 100% rename from ui/app/pages/error/index.js rename to ui/pages/error/index.js diff --git a/ui/app/pages/error/index.scss b/ui/pages/error/index.scss similarity index 100% rename from ui/app/pages/error/index.scss rename to ui/pages/error/index.scss diff --git a/ui/app/pages/first-time-flow/create-password/create-password.component.js b/ui/pages/first-time-flow/create-password/create-password.component.js similarity index 100% rename from ui/app/pages/first-time-flow/create-password/create-password.component.js rename to ui/pages/first-time-flow/create-password/create-password.component.js diff --git a/ui/app/pages/first-time-flow/create-password/create-password.container.js b/ui/pages/first-time-flow/create-password/create-password.container.js similarity index 100% rename from ui/app/pages/first-time-flow/create-password/create-password.container.js rename to ui/pages/first-time-flow/create-password/create-password.container.js diff --git a/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js b/ui/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js similarity index 100% rename from ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js rename to ui/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js diff --git a/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.test.js b/ui/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.test.js similarity index 100% rename from ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.test.js rename to ui/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.test.js diff --git a/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.container.js b/ui/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.container.js similarity index 100% rename from ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.container.js rename to ui/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.container.js diff --git a/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/index.js b/ui/pages/first-time-flow/create-password/import-with-seed-phrase/index.js similarity index 100% rename from ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/index.js rename to ui/pages/first-time-flow/create-password/import-with-seed-phrase/index.js diff --git a/ui/app/pages/first-time-flow/create-password/index.js b/ui/pages/first-time-flow/create-password/index.js similarity index 100% rename from ui/app/pages/first-time-flow/create-password/index.js rename to ui/pages/first-time-flow/create-password/index.js diff --git a/ui/app/pages/first-time-flow/create-password/new-account/index.js b/ui/pages/first-time-flow/create-password/new-account/index.js similarity index 100% rename from ui/app/pages/first-time-flow/create-password/new-account/index.js rename to ui/pages/first-time-flow/create-password/new-account/index.js diff --git a/ui/app/pages/first-time-flow/create-password/new-account/new-account.component.js b/ui/pages/first-time-flow/create-password/new-account/new-account.component.js similarity index 100% rename from ui/app/pages/first-time-flow/create-password/new-account/new-account.component.js rename to ui/pages/first-time-flow/create-password/new-account/new-account.component.js diff --git a/ui/app/pages/first-time-flow/end-of-flow/end-of-flow.component.js b/ui/pages/first-time-flow/end-of-flow/end-of-flow.component.js similarity index 100% rename from ui/app/pages/first-time-flow/end-of-flow/end-of-flow.component.js rename to ui/pages/first-time-flow/end-of-flow/end-of-flow.component.js diff --git a/ui/app/pages/first-time-flow/end-of-flow/end-of-flow.container.js b/ui/pages/first-time-flow/end-of-flow/end-of-flow.container.js similarity index 100% rename from ui/app/pages/first-time-flow/end-of-flow/end-of-flow.container.js rename to ui/pages/first-time-flow/end-of-flow/end-of-flow.container.js diff --git a/ui/app/pages/first-time-flow/end-of-flow/end-of-flow.test.js b/ui/pages/first-time-flow/end-of-flow/end-of-flow.test.js similarity index 87% rename from ui/app/pages/first-time-flow/end-of-flow/end-of-flow.test.js rename to ui/pages/first-time-flow/end-of-flow/end-of-flow.test.js index 314025110..e3f04eaa5 100644 --- a/ui/app/pages/first-time-flow/end-of-flow/end-of-flow.test.js +++ b/ui/pages/first-time-flow/end-of-flow/end-of-flow.test.js @@ -1,7 +1,7 @@ import React from 'react'; import sinon from 'sinon'; -import { tick } from '../../../../../test/lib/tick'; -import { mountWithRouter } from '../../../../../test/lib/render-helpers'; +import { tick } from '../../../../test/lib/tick'; +import { mountWithRouter } from '../../../../test/lib/render-helpers'; import { DEFAULT_ROUTE } from '../../../helpers/constants/routes'; import EndOfFlowScreen from './end-of-flow.container'; diff --git a/ui/app/pages/first-time-flow/end-of-flow/index.js b/ui/pages/first-time-flow/end-of-flow/index.js similarity index 100% rename from ui/app/pages/first-time-flow/end-of-flow/index.js rename to ui/pages/first-time-flow/end-of-flow/index.js diff --git a/ui/app/pages/first-time-flow/end-of-flow/index.scss b/ui/pages/first-time-flow/end-of-flow/index.scss similarity index 100% rename from ui/app/pages/first-time-flow/end-of-flow/index.scss rename to ui/pages/first-time-flow/end-of-flow/index.scss diff --git a/ui/app/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.component.js b/ui/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.component.js similarity index 100% rename from ui/app/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.component.js rename to ui/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.component.js diff --git a/ui/app/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.container.js b/ui/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.container.js similarity index 100% rename from ui/app/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.container.js rename to ui/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.container.js diff --git a/ui/app/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.test.js b/ui/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.test.js similarity index 97% rename from ui/app/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.test.js rename to ui/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.test.js index ab057080d..e07331222 100644 --- a/ui/app/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.test.js +++ b/ui/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.test.js @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithRouter } from '../../../../../test/lib/render-helpers'; +import { mountWithRouter } from '../../../../test/lib/render-helpers'; import { DEFAULT_ROUTE, LOCK_ROUTE, diff --git a/ui/app/pages/first-time-flow/first-time-flow-switch/index.js b/ui/pages/first-time-flow/first-time-flow-switch/index.js similarity index 100% rename from ui/app/pages/first-time-flow/first-time-flow-switch/index.js rename to ui/pages/first-time-flow/first-time-flow-switch/index.js diff --git a/ui/app/pages/first-time-flow/first-time-flow.component.js b/ui/pages/first-time-flow/first-time-flow.component.js similarity index 100% rename from ui/app/pages/first-time-flow/first-time-flow.component.js rename to ui/pages/first-time-flow/first-time-flow.component.js diff --git a/ui/app/pages/first-time-flow/first-time-flow.container.js b/ui/pages/first-time-flow/first-time-flow.container.js similarity index 100% rename from ui/app/pages/first-time-flow/first-time-flow.container.js rename to ui/pages/first-time-flow/first-time-flow.container.js diff --git a/ui/app/pages/first-time-flow/index.js b/ui/pages/first-time-flow/index.js similarity index 100% rename from ui/app/pages/first-time-flow/index.js rename to ui/pages/first-time-flow/index.js diff --git a/ui/app/pages/first-time-flow/index.scss b/ui/pages/first-time-flow/index.scss similarity index 100% rename from ui/app/pages/first-time-flow/index.scss rename to ui/pages/first-time-flow/index.scss diff --git a/ui/app/pages/first-time-flow/metametrics-opt-in/index.js b/ui/pages/first-time-flow/metametrics-opt-in/index.js similarity index 100% rename from ui/app/pages/first-time-flow/metametrics-opt-in/index.js rename to ui/pages/first-time-flow/metametrics-opt-in/index.js diff --git a/ui/app/pages/first-time-flow/metametrics-opt-in/index.scss b/ui/pages/first-time-flow/metametrics-opt-in/index.scss similarity index 100% rename from ui/app/pages/first-time-flow/metametrics-opt-in/index.scss rename to ui/pages/first-time-flow/metametrics-opt-in/index.scss diff --git a/ui/app/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.component.js b/ui/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.component.js similarity index 100% rename from ui/app/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.component.js rename to ui/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.component.js diff --git a/ui/app/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.container.js b/ui/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.container.js similarity index 100% rename from ui/app/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.container.js rename to ui/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.container.js diff --git a/ui/app/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.test.js b/ui/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.test.js similarity index 92% rename from ui/app/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.test.js rename to ui/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.test.js index fa1d61889..4a83441b0 100644 --- a/ui/app/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.test.js +++ b/ui/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.test.js @@ -1,7 +1,7 @@ import React from 'react'; import sinon from 'sinon'; import configureMockStore from 'redux-mock-store'; -import { mountWithRouter } from '../../../../../test/lib/render-helpers'; +import { mountWithRouter } from '../../../../test/lib/render-helpers'; import MetaMetricsOptIn from './metametrics-opt-in.container'; describe('MetaMetricsOptIn', () => { diff --git a/ui/app/pages/first-time-flow/onboarding-initiator-util.js b/ui/pages/first-time-flow/onboarding-initiator-util.js similarity index 100% rename from ui/app/pages/first-time-flow/onboarding-initiator-util.js rename to ui/pages/first-time-flow/onboarding-initiator-util.js diff --git a/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase-component.test.js b/ui/pages/first-time-flow/seed-phrase/confirm-seed-phrase-component.test.js similarity index 100% rename from ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase-component.test.js rename to ui/pages/first-time-flow/seed-phrase/confirm-seed-phrase-component.test.js diff --git a/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.component.js b/ui/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.component.js similarity index 100% rename from ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.component.js rename to ui/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.component.js diff --git a/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.container.js b/ui/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.container.js similarity index 100% rename from ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.container.js rename to ui/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.container.js diff --git a/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/draggable-seed.component.js b/ui/pages/first-time-flow/seed-phrase/confirm-seed-phrase/draggable-seed.component.js similarity index 100% rename from ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/draggable-seed.component.js rename to ui/pages/first-time-flow/seed-phrase/confirm-seed-phrase/draggable-seed.component.js diff --git a/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/index.js b/ui/pages/first-time-flow/seed-phrase/confirm-seed-phrase/index.js similarity index 100% rename from ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/index.js rename to ui/pages/first-time-flow/seed-phrase/confirm-seed-phrase/index.js diff --git a/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/index.scss b/ui/pages/first-time-flow/seed-phrase/confirm-seed-phrase/index.scss similarity index 100% rename from ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/index.scss rename to ui/pages/first-time-flow/seed-phrase/confirm-seed-phrase/index.scss diff --git a/ui/app/pages/first-time-flow/seed-phrase/index.js b/ui/pages/first-time-flow/seed-phrase/index.js similarity index 100% rename from ui/app/pages/first-time-flow/seed-phrase/index.js rename to ui/pages/first-time-flow/seed-phrase/index.js diff --git a/ui/app/pages/first-time-flow/seed-phrase/index.scss b/ui/pages/first-time-flow/seed-phrase/index.scss similarity index 100% rename from ui/app/pages/first-time-flow/seed-phrase/index.scss rename to ui/pages/first-time-flow/seed-phrase/index.scss diff --git a/ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.js b/ui/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.js similarity index 100% rename from ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.js rename to ui/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.js diff --git a/ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.scss b/ui/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.scss similarity index 100% rename from ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.scss rename to ui/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.scss diff --git a/ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.component.js b/ui/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.component.js similarity index 100% rename from ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.component.js rename to ui/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.component.js diff --git a/ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.container.js b/ui/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.container.js similarity index 100% rename from ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.container.js rename to ui/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.container.js diff --git a/ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.test.js b/ui/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.test.js similarity index 100% rename from ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.test.js rename to ui/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.test.js diff --git a/ui/app/pages/first-time-flow/seed-phrase/seed-phrase.component.js b/ui/pages/first-time-flow/seed-phrase/seed-phrase.component.js similarity index 100% rename from ui/app/pages/first-time-flow/seed-phrase/seed-phrase.component.js rename to ui/pages/first-time-flow/seed-phrase/seed-phrase.component.js diff --git a/ui/app/pages/first-time-flow/select-action/index.js b/ui/pages/first-time-flow/select-action/index.js similarity index 100% rename from ui/app/pages/first-time-flow/select-action/index.js rename to ui/pages/first-time-flow/select-action/index.js diff --git a/ui/app/pages/first-time-flow/select-action/index.scss b/ui/pages/first-time-flow/select-action/index.scss similarity index 100% rename from ui/app/pages/first-time-flow/select-action/index.scss rename to ui/pages/first-time-flow/select-action/index.scss diff --git a/ui/app/pages/first-time-flow/select-action/select-action.component.js b/ui/pages/first-time-flow/select-action/select-action.component.js similarity index 100% rename from ui/app/pages/first-time-flow/select-action/select-action.component.js rename to ui/pages/first-time-flow/select-action/select-action.component.js diff --git a/ui/app/pages/first-time-flow/select-action/select-action.container.js b/ui/pages/first-time-flow/select-action/select-action.container.js similarity index 100% rename from ui/app/pages/first-time-flow/select-action/select-action.container.js rename to ui/pages/first-time-flow/select-action/select-action.container.js diff --git a/ui/app/pages/first-time-flow/select-action/select-action.test.js b/ui/pages/first-time-flow/select-action/select-action.test.js similarity index 95% rename from ui/app/pages/first-time-flow/select-action/select-action.test.js rename to ui/pages/first-time-flow/select-action/select-action.test.js index 013176b30..e0b79c789 100644 --- a/ui/app/pages/first-time-flow/select-action/select-action.test.js +++ b/ui/pages/first-time-flow/select-action/select-action.test.js @@ -1,6 +1,6 @@ import React from 'react'; import sinon from 'sinon'; -import { mountWithRouter } from '../../../../../test/lib/render-helpers'; +import { mountWithRouter } from '../../../../test/lib/render-helpers'; import SelectAction from './select-action.container'; describe('Selection Action', () => { diff --git a/ui/app/pages/first-time-flow/welcome/index.js b/ui/pages/first-time-flow/welcome/index.js similarity index 100% rename from ui/app/pages/first-time-flow/welcome/index.js rename to ui/pages/first-time-flow/welcome/index.js diff --git a/ui/app/pages/first-time-flow/welcome/index.scss b/ui/pages/first-time-flow/welcome/index.scss similarity index 100% rename from ui/app/pages/first-time-flow/welcome/index.scss rename to ui/pages/first-time-flow/welcome/index.scss diff --git a/ui/app/pages/first-time-flow/welcome/welcome.component.js b/ui/pages/first-time-flow/welcome/welcome.component.js similarity index 100% rename from ui/app/pages/first-time-flow/welcome/welcome.component.js rename to ui/pages/first-time-flow/welcome/welcome.component.js diff --git a/ui/app/pages/first-time-flow/welcome/welcome.container.js b/ui/pages/first-time-flow/welcome/welcome.container.js similarity index 100% rename from ui/app/pages/first-time-flow/welcome/welcome.container.js rename to ui/pages/first-time-flow/welcome/welcome.container.js diff --git a/ui/app/pages/first-time-flow/welcome/welcome.test.js b/ui/pages/first-time-flow/welcome/welcome.test.js similarity index 95% rename from ui/app/pages/first-time-flow/welcome/welcome.test.js rename to ui/pages/first-time-flow/welcome/welcome.test.js index 2d60b4d57..14d1a22cc 100644 --- a/ui/app/pages/first-time-flow/welcome/welcome.test.js +++ b/ui/pages/first-time-flow/welcome/welcome.test.js @@ -1,7 +1,7 @@ import React from 'react'; import sinon from 'sinon'; import configureMockStore from 'redux-mock-store'; -import { mountWithRouter } from '../../../../../test/lib/render-helpers'; +import { mountWithRouter } from '../../../../test/lib/render-helpers'; import Welcome from './welcome.container'; describe('Welcome', () => { diff --git a/ui/app/pages/home/home.component.js b/ui/pages/home/home.component.js similarity index 100% rename from ui/app/pages/home/home.component.js rename to ui/pages/home/home.component.js diff --git a/ui/app/pages/home/home.container.js b/ui/pages/home/home.container.js similarity index 96% rename from ui/app/pages/home/home.container.js rename to ui/pages/home/home.container.js index 6020c1510..c9e0e68a6 100644 --- a/ui/app/pages/home/home.container.js +++ b/ui/pages/home/home.container.js @@ -29,15 +29,15 @@ import { import { setThreeBoxLastUpdated, hideWhatsNewPopup } from '../../ducks/app/app'; import { getWeb3ShimUsageAlertEnabledness } from '../../ducks/metamask/metamask'; import { getSwapsFeatureLiveness } from '../../ducks/swaps/swaps'; -import { getEnvironmentType } from '../../../../app/scripts/lib/util'; +import { getEnvironmentType } from '../../../app/scripts/lib/util'; import { ENVIRONMENT_TYPE_NOTIFICATION, ENVIRONMENT_TYPE_POPUP, -} from '../../../../shared/constants/app'; +} from '../../../shared/constants/app'; import { ALERT_TYPES, WEB3_SHIM_USAGE_ALERT_STATES, -} from '../../../../shared/constants/alerts'; +} from '../../../shared/constants/alerts'; import Home from './home.component'; const mapStateToProps = (state) => { diff --git a/ui/app/pages/home/index.js b/ui/pages/home/index.js similarity index 100% rename from ui/app/pages/home/index.js rename to ui/pages/home/index.js diff --git a/ui/app/pages/home/index.scss b/ui/pages/home/index.scss similarity index 100% rename from ui/app/pages/home/index.scss rename to ui/pages/home/index.scss diff --git a/ui/app/pages/index.js b/ui/pages/index.js similarity index 100% rename from ui/app/pages/index.js rename to ui/pages/index.js diff --git a/ui/app/pages/keychains/index.scss b/ui/pages/keychains/index.scss similarity index 100% rename from ui/app/pages/keychains/index.scss rename to ui/pages/keychains/index.scss diff --git a/ui/app/pages/keychains/restore-vault.js b/ui/pages/keychains/restore-vault.js similarity index 100% rename from ui/app/pages/keychains/restore-vault.js rename to ui/pages/keychains/restore-vault.js diff --git a/ui/app/pages/keychains/reveal-seed.js b/ui/pages/keychains/reveal-seed.js similarity index 100% rename from ui/app/pages/keychains/reveal-seed.js rename to ui/pages/keychains/reveal-seed.js diff --git a/ui/app/pages/keychains/reveal-seed.test.js b/ui/pages/keychains/reveal-seed.test.js similarity index 100% rename from ui/app/pages/keychains/reveal-seed.test.js rename to ui/pages/keychains/reveal-seed.test.js diff --git a/ui/app/pages/lock/index.js b/ui/pages/lock/index.js similarity index 100% rename from ui/app/pages/lock/index.js rename to ui/pages/lock/index.js diff --git a/ui/app/pages/lock/lock.component.js b/ui/pages/lock/lock.component.js similarity index 100% rename from ui/app/pages/lock/lock.component.js rename to ui/pages/lock/lock.component.js diff --git a/ui/app/pages/lock/lock.container.js b/ui/pages/lock/lock.container.js similarity index 100% rename from ui/app/pages/lock/lock.container.js rename to ui/pages/lock/lock.container.js diff --git a/ui/app/pages/lock/lock.test.js b/ui/pages/lock/lock.test.js similarity index 92% rename from ui/app/pages/lock/lock.test.js rename to ui/pages/lock/lock.test.js index 66de4a245..6f7d1def0 100644 --- a/ui/app/pages/lock/lock.test.js +++ b/ui/pages/lock/lock.test.js @@ -1,6 +1,6 @@ import React from 'react'; import sinon from 'sinon'; -import { mountWithRouter } from '../../../../test/lib/render-helpers'; +import { mountWithRouter } from '../../../test/lib/render-helpers'; import Lock from './lock.container'; describe('Lock', () => { diff --git a/ui/app/pages/mobile-sync/index.js b/ui/pages/mobile-sync/index.js similarity index 100% rename from ui/app/pages/mobile-sync/index.js rename to ui/pages/mobile-sync/index.js diff --git a/ui/app/pages/mobile-sync/mobile-sync.component.js b/ui/pages/mobile-sync/mobile-sync.component.js similarity index 100% rename from ui/app/pages/mobile-sync/mobile-sync.component.js rename to ui/pages/mobile-sync/mobile-sync.component.js diff --git a/ui/app/pages/mobile-sync/mobile-sync.container.js b/ui/pages/mobile-sync/mobile-sync.container.js similarity index 100% rename from ui/app/pages/mobile-sync/mobile-sync.container.js rename to ui/pages/mobile-sync/mobile-sync.container.js diff --git a/ui/app/pages/pages.scss b/ui/pages/pages.scss similarity index 100% rename from ui/app/pages/pages.scss rename to ui/pages/pages.scss diff --git a/ui/app/pages/permissions-connect/choose-account/choose-account.component.js b/ui/pages/permissions-connect/choose-account/choose-account.component.js similarity index 100% rename from ui/app/pages/permissions-connect/choose-account/choose-account.component.js rename to ui/pages/permissions-connect/choose-account/choose-account.component.js diff --git a/ui/app/pages/permissions-connect/choose-account/index.js b/ui/pages/permissions-connect/choose-account/index.js similarity index 100% rename from ui/app/pages/permissions-connect/choose-account/index.js rename to ui/pages/permissions-connect/choose-account/index.js diff --git a/ui/app/pages/permissions-connect/choose-account/index.scss b/ui/pages/permissions-connect/choose-account/index.scss similarity index 100% rename from ui/app/pages/permissions-connect/choose-account/index.scss rename to ui/pages/permissions-connect/choose-account/index.scss diff --git a/ui/app/pages/permissions-connect/index.js b/ui/pages/permissions-connect/index.js similarity index 100% rename from ui/app/pages/permissions-connect/index.js rename to ui/pages/permissions-connect/index.js diff --git a/ui/app/pages/permissions-connect/index.scss b/ui/pages/permissions-connect/index.scss similarity index 100% rename from ui/app/pages/permissions-connect/index.scss rename to ui/pages/permissions-connect/index.scss diff --git a/ui/app/pages/permissions-connect/permissions-connect.component.js b/ui/pages/permissions-connect/permissions-connect.component.js similarity index 98% rename from ui/app/pages/permissions-connect/permissions-connect.component.js rename to ui/pages/permissions-connect/permissions-connect.component.js index 1927af9ae..b9706faca 100644 --- a/ui/app/pages/permissions-connect/permissions-connect.component.js +++ b/ui/pages/permissions-connect/permissions-connect.component.js @@ -1,8 +1,8 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { Switch, Route } from 'react-router-dom'; -import { getEnvironmentType } from '../../../../app/scripts/lib/util'; -import { ENVIRONMENT_TYPE_NOTIFICATION } from '../../../../shared/constants/app'; +import { getEnvironmentType } from '../../../app/scripts/lib/util'; +import { ENVIRONMENT_TYPE_NOTIFICATION } from '../../../shared/constants/app'; import { DEFAULT_ROUTE } from '../../helpers/constants/routes'; import PermissionPageContainer from '../../components/app/permission-page-container'; import ChooseAccount from './choose-account'; diff --git a/ui/app/pages/permissions-connect/permissions-connect.container.js b/ui/pages/permissions-connect/permissions-connect.container.js similarity index 100% rename from ui/app/pages/permissions-connect/permissions-connect.container.js rename to ui/pages/permissions-connect/permissions-connect.container.js diff --git a/ui/app/pages/permissions-connect/redirect/index.js b/ui/pages/permissions-connect/redirect/index.js similarity index 100% rename from ui/app/pages/permissions-connect/redirect/index.js rename to ui/pages/permissions-connect/redirect/index.js diff --git a/ui/app/pages/permissions-connect/redirect/index.scss b/ui/pages/permissions-connect/redirect/index.scss similarity index 100% rename from ui/app/pages/permissions-connect/redirect/index.scss rename to ui/pages/permissions-connect/redirect/index.scss diff --git a/ui/app/pages/permissions-connect/redirect/permissions-redirect.component.js b/ui/pages/permissions-connect/redirect/permissions-redirect.component.js similarity index 100% rename from ui/app/pages/permissions-connect/redirect/permissions-redirect.component.js rename to ui/pages/permissions-connect/redirect/permissions-redirect.component.js diff --git a/ui/app/pages/routes/index.js b/ui/pages/routes/index.js similarity index 100% rename from ui/app/pages/routes/index.js rename to ui/pages/routes/index.js diff --git a/ui/app/pages/routes/routes.component.js b/ui/pages/routes/routes.component.js similarity index 98% rename from ui/app/pages/routes/routes.component.js rename to ui/pages/routes/routes.component.js index 5648e4e20..3248799d2 100644 --- a/ui/app/pages/routes/routes.component.js +++ b/ui/pages/routes/routes.component.js @@ -59,9 +59,9 @@ import { import { ENVIRONMENT_TYPE_NOTIFICATION, ENVIRONMENT_TYPE_POPUP, -} from '../../../../shared/constants/app'; -import { getEnvironmentType } from '../../../../app/scripts/lib/util'; -import { TRANSACTION_STATUSES } from '../../../../shared/constants/transaction'; +} from '../../../shared/constants/app'; +import { getEnvironmentType } from '../../../app/scripts/lib/util'; +import { TRANSACTION_STATUSES } from '../../../shared/constants/transaction'; import ConfirmationPage from '../confirmation'; export default class Routes extends Component { diff --git a/ui/app/pages/routes/routes.container.js b/ui/pages/routes/routes.container.js similarity index 100% rename from ui/app/pages/routes/routes.container.js rename to ui/pages/routes/routes.container.js diff --git a/ui/app/pages/send/index.js b/ui/pages/send/index.js similarity index 100% rename from ui/app/pages/send/index.js rename to ui/pages/send/index.js diff --git a/ui/app/pages/send/send-content/add-recipient/add-recipient.component.js b/ui/pages/send/send-content/add-recipient/add-recipient.component.js similarity index 99% rename from ui/app/pages/send/send-content/add-recipient/add-recipient.component.js rename to ui/pages/send/send-content/add-recipient/add-recipient.component.js index a7afd2141..da7999c94 100644 --- a/ui/app/pages/send/send-content/add-recipient/add-recipient.component.js +++ b/ui/pages/send/send-content/add-recipient/add-recipient.component.js @@ -11,7 +11,7 @@ import Confusable from '../../../../components/ui/confusable'; import { isBurnAddress, isValidHexAddress, -} from '../../../../../../shared/modules/hexstring-utils'; +} from '../../../../../shared/modules/hexstring-utils'; export default class AddRecipient extends Component { static propTypes = { diff --git a/ui/app/pages/send/send-content/add-recipient/add-recipient.component.test.js b/ui/pages/send/send-content/add-recipient/add-recipient.component.test.js similarity index 100% rename from ui/app/pages/send/send-content/add-recipient/add-recipient.component.test.js rename to ui/pages/send/send-content/add-recipient/add-recipient.component.test.js diff --git a/ui/app/pages/send/send-content/add-recipient/add-recipient.container.js b/ui/pages/send/send-content/add-recipient/add-recipient.container.js similarity index 100% rename from ui/app/pages/send/send-content/add-recipient/add-recipient.container.js rename to ui/pages/send/send-content/add-recipient/add-recipient.container.js diff --git a/ui/app/pages/send/send-content/add-recipient/add-recipient.container.test.js b/ui/pages/send/send-content/add-recipient/add-recipient.container.test.js similarity index 94% rename from ui/app/pages/send/send-content/add-recipient/add-recipient.container.test.js rename to ui/pages/send/send-content/add-recipient/add-recipient.container.test.js index 8e02da161..696ca926b 100644 --- a/ui/app/pages/send/send-content/add-recipient/add-recipient.container.test.js +++ b/ui/pages/send/send-content/add-recipient/add-recipient.container.test.js @@ -13,7 +13,7 @@ jest.mock('react-redux', () => ({ }, })); -jest.mock('../../../../../app/selectors', () => ({ +jest.mock('../../../../selectors', () => ({ getSendEnsResolution: (s) => `mockSendEnsResolution:${s}`, getSendEnsResolutionError: (s) => `mockSendEnsResolutionError:${s}`, getAddressBook: (s) => [{ name: `mockAddressBook:${s}` }], @@ -24,7 +24,7 @@ jest.mock('../../../../../app/selectors', () => ({ ], })); -jest.mock('../../../../../app/store/actions', () => ({ +jest.mock('../../../../store/actions', () => ({ updateSendTo: jest.fn(), })); diff --git a/ui/app/pages/send/send-content/add-recipient/add-recipient.js b/ui/pages/send/send-content/add-recipient/add-recipient.js similarity index 96% rename from ui/app/pages/send/send-content/add-recipient/add-recipient.js rename to ui/pages/send/send-content/add-recipient/add-recipient.js index 3124ccdb5..5141fda1d 100644 --- a/ui/app/pages/send/send-content/add-recipient/add-recipient.js +++ b/ui/pages/send/send-content/add-recipient/add-recipient.js @@ -19,7 +19,7 @@ import { isBurnAddress, isValidHexAddress, toChecksumHexAddress, -} from '../../../../../../shared/modules/hexstring-utils'; +} from '../../../../../shared/modules/hexstring-utils'; export function getToErrorObject(to, sendTokenAddress, chainId) { let toError = null; diff --git a/ui/app/pages/send/send-content/add-recipient/add-recipient.utils.test.js b/ui/pages/send/send-content/add-recipient/add-recipient.utils.test.js similarity index 92% rename from ui/app/pages/send/send-content/add-recipient/add-recipient.utils.test.js rename to ui/pages/send/send-content/add-recipient/add-recipient.utils.test.js index 33f70b876..bd498a7bd 100644 --- a/ui/app/pages/send/send-content/add-recipient/add-recipient.utils.test.js +++ b/ui/pages/send/send-content/add-recipient/add-recipient.utils.test.js @@ -7,15 +7,12 @@ import { } from '../../send.constants'; import { getToErrorObject, getToWarningObject } from './add-recipient'; -jest.mock('../../../../../app/helpers/utils/util', () => ({ +jest.mock('../../../../helpers/utils/util', () => ({ isDefaultMetaMaskChain: jest.fn().mockReturnValue(true), isEthNetwork: jest.fn().mockReturnValue(true), checkExistingAddresses: jest.fn().mockReturnValue(true), - isValidDomainName: jest.requireActual('../../../../../app/helpers/utils/util') - .isValidDomainName, - isOriginContractAddress: jest.requireActual( - '../../../../../app/helpers/utils/util', - ).isOriginContractAddress, + isOriginContractAddress: jest.requireActual('../../../../helpers/utils/util') + .isOriginContractAddress, })); jest.mock('../../../../../../shared/modules/hexstring-utils', () => ({ diff --git a/ui/app/pages/send/send-content/add-recipient/ens-input.component.js b/ui/pages/send/send-content/add-recipient/ens-input.component.js similarity index 98% rename from ui/app/pages/send/send-content/add-recipient/ens-input.component.js rename to ui/pages/send/send-content/add-recipient/ens-input.component.js index 9012ee643..f8899b72f 100644 --- a/ui/app/pages/send/send-content/add-recipient/ens-input.component.js +++ b/ui/pages/send/send-content/add-recipient/ens-input.component.js @@ -9,12 +9,12 @@ import networkMap from 'ethereum-ens-network-map'; import log from 'loglevel'; import { isHexString } from 'ethereumjs-util'; import { ellipsify } from '../../send.utils'; -import { isValidDomainName } from '../../../../helpers/utils/util'; -import { MAINNET_NETWORK_ID } from '../../../../../../shared/constants/network'; import { isBurnAddress, isValidHexAddress, -} from '../../../../../../shared/modules/hexstring-utils'; +} from '../../../../../shared/modules/hexstring-utils'; +import { isValidDomainName } from '../../../../helpers/utils/util'; +import { MAINNET_NETWORK_ID } from '../../../../../shared/constants/network'; // Local Constants const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000'; diff --git a/ui/app/pages/send/send-content/add-recipient/ens-input.container.js b/ui/pages/send/send-content/add-recipient/ens-input.container.js similarity index 85% rename from ui/app/pages/send/send-content/add-recipient/ens-input.container.js rename to ui/pages/send/send-content/add-recipient/ens-input.container.js index 42e75e501..90d2c3ff4 100644 --- a/ui/app/pages/send/send-content/add-recipient/ens-input.container.js +++ b/ui/pages/send/send-content/add-recipient/ens-input.container.js @@ -1,5 +1,5 @@ import { connect } from 'react-redux'; -import { CHAIN_ID_TO_NETWORK_ID_MAP } from '../../../../../../shared/constants/network'; +import { CHAIN_ID_TO_NETWORK_ID_MAP } from '../../../../../shared/constants/network'; import { getSendTo, getSendToNickname, diff --git a/ui/app/pages/send/send-content/add-recipient/ens-input.js b/ui/pages/send/send-content/add-recipient/ens-input.js similarity index 100% rename from ui/app/pages/send/send-content/add-recipient/ens-input.js rename to ui/pages/send/send-content/add-recipient/ens-input.js diff --git a/ui/app/pages/send/send-content/add-recipient/index.js b/ui/pages/send/send-content/add-recipient/index.js similarity index 100% rename from ui/app/pages/send/send-content/add-recipient/index.js rename to ui/pages/send/send-content/add-recipient/index.js diff --git a/ui/app/pages/send/send-content/index.js b/ui/pages/send/send-content/index.js similarity index 100% rename from ui/app/pages/send/send-content/index.js rename to ui/pages/send/send-content/index.js diff --git a/ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.component.js b/ui/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.component.js similarity index 100% rename from ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.component.js rename to ui/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.component.js diff --git a/ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.component.test.js b/ui/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.component.test.js similarity index 100% rename from ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.component.test.js rename to ui/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.component.test.js diff --git a/ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.container.js b/ui/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.container.js similarity index 100% rename from ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.container.js rename to ui/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.container.js diff --git a/ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.container.test.js b/ui/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.container.test.js similarity index 93% rename from ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.container.test.js rename to ui/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.container.test.js index 4137ce0f2..90f95e6cb 100644 --- a/ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.container.test.js +++ b/ui/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.container.test.js @@ -15,7 +15,7 @@ jest.mock('react-redux', () => ({ }, })); -jest.mock('../../../../../../app/selectors', () => ({ +jest.mock('../../../../../selectors', () => ({ getGasTotal: (s) => `mockGasTotal:${s}`, getSendToken: (s) => `mockSendToken:${s}`, getSendFromBalance: (s) => `mockBalance:${s}`, @@ -28,11 +28,11 @@ jest.mock('./amount-max-button.utils.js', () => ({ calcMaxAmount: (mockObj) => mockObj.val + 1, })); -jest.mock('../../../../../../app/store/actions', () => ({ +jest.mock('../../../../../store/actions', () => ({ setMaxModeTo: jest.fn(), updateSendAmount: jest.fn(), })); -jest.mock('../../../../../../app/ducks/send/send.duck', () => ({ +jest.mock('../../../../../ducks/send/send.duck', () => ({ updateSendErrors: jest.fn(), })); diff --git a/ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils.js b/ui/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils.js similarity index 89% rename from ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils.js rename to ui/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils.js index 934e2fd0a..6826b5e39 100644 --- a/ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils.js +++ b/ui/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils.js @@ -2,7 +2,7 @@ import { multiplyCurrencies, subtractCurrencies, } from '../../../../../helpers/utils/conversion-util'; -import { addHexPrefix } from '../../../../../../../app/scripts/lib/util'; +import { addHexPrefix } from '../../../../../../app/scripts/lib/util'; export function calcMaxAmount({ balance, gasTotal, sendToken, tokenBalance }) { const { decimals } = sendToken || {}; diff --git a/ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils.test.js b/ui/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils.test.js similarity index 100% rename from ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils.test.js rename to ui/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils.test.js diff --git a/ui/app/pages/send/send-content/send-amount-row/amount-max-button/index.js b/ui/pages/send/send-content/send-amount-row/amount-max-button/index.js similarity index 100% rename from ui/app/pages/send/send-content/send-amount-row/amount-max-button/index.js rename to ui/pages/send/send-content/send-amount-row/amount-max-button/index.js diff --git a/ui/app/pages/send/send-content/send-amount-row/index.js b/ui/pages/send/send-content/send-amount-row/index.js similarity index 100% rename from ui/app/pages/send/send-content/send-amount-row/index.js rename to ui/pages/send/send-content/send-amount-row/index.js diff --git a/ui/app/pages/send/send-content/send-amount-row/send-amount-row.component.js b/ui/pages/send/send-content/send-amount-row/send-amount-row.component.js similarity index 100% rename from ui/app/pages/send/send-content/send-amount-row/send-amount-row.component.js rename to ui/pages/send/send-content/send-amount-row/send-amount-row.component.js diff --git a/ui/app/pages/send/send-content/send-amount-row/send-amount-row.component.test.js b/ui/pages/send/send-content/send-amount-row/send-amount-row.component.test.js similarity index 100% rename from ui/app/pages/send/send-content/send-amount-row/send-amount-row.component.test.js rename to ui/pages/send/send-content/send-amount-row/send-amount-row.component.test.js diff --git a/ui/app/pages/send/send-content/send-amount-row/send-amount-row.container.js b/ui/pages/send/send-content/send-amount-row/send-amount-row.container.js similarity index 100% rename from ui/app/pages/send/send-content/send-amount-row/send-amount-row.container.js rename to ui/pages/send/send-content/send-amount-row/send-amount-row.container.js diff --git a/ui/app/pages/send/send-content/send-amount-row/send-amount-row.container.test.js b/ui/pages/send/send-content/send-amount-row/send-amount-row.container.test.js similarity index 95% rename from ui/app/pages/send/send-content/send-amount-row/send-amount-row.container.test.js rename to ui/pages/send/send-content/send-amount-row/send-amount-row.container.test.js index 1e0979673..6d3b06aef 100644 --- a/ui/app/pages/send/send-content/send-amount-row/send-amount-row.container.test.js +++ b/ui/pages/send/send-content/send-amount-row/send-amount-row.container.test.js @@ -28,12 +28,12 @@ jest.mock('../../send.utils', () => ({ }), })); -jest.mock('../../../../../app/store/actions', () => ({ +jest.mock('../../../../store/actions', () => ({ setMaxModeTo: jest.fn(), updateSendAmount: jest.fn(), })); -jest.mock('../../../../../app/ducks/send/send.duck', () => ({ +jest.mock('../../../../ducks/send/send.duck', () => ({ updateSendErrors: jest.fn(), })); diff --git a/ui/app/pages/send/send-content/send-amount-row/send-amount-row.scss b/ui/pages/send/send-content/send-amount-row/send-amount-row.scss similarity index 100% rename from ui/app/pages/send/send-content/send-amount-row/send-amount-row.scss rename to ui/pages/send/send-content/send-amount-row/send-amount-row.scss diff --git a/ui/app/pages/send/send-content/send-asset-row/index.js b/ui/pages/send/send-content/send-asset-row/index.js similarity index 100% rename from ui/app/pages/send/send-content/send-asset-row/index.js rename to ui/pages/send/send-content/send-asset-row/index.js diff --git a/ui/app/pages/send/send-content/send-asset-row/send-asset-row.component.js b/ui/pages/send/send-content/send-asset-row/send-asset-row.component.js similarity index 100% rename from ui/app/pages/send/send-content/send-asset-row/send-asset-row.component.js rename to ui/pages/send/send-content/send-asset-row/send-asset-row.component.js diff --git a/ui/app/pages/send/send-content/send-asset-row/send-asset-row.container.js b/ui/pages/send/send-content/send-asset-row/send-asset-row.container.js similarity index 100% rename from ui/app/pages/send/send-content/send-asset-row/send-asset-row.container.js rename to ui/pages/send/send-content/send-asset-row/send-asset-row.container.js diff --git a/ui/app/pages/send/send-content/send-content.component.js b/ui/pages/send/send-content/send-content.component.js similarity index 100% rename from ui/app/pages/send/send-content/send-content.component.js rename to ui/pages/send/send-content/send-content.component.js diff --git a/ui/app/pages/send/send-content/send-content.component.test.js b/ui/pages/send/send-content/send-content.component.test.js similarity index 100% rename from ui/app/pages/send/send-content/send-content.component.test.js rename to ui/pages/send/send-content/send-content.component.test.js diff --git a/ui/app/pages/send/send-content/send-content.container.js b/ui/pages/send/send-content/send-content.container.js similarity index 100% rename from ui/app/pages/send/send-content/send-content.container.js rename to ui/pages/send/send-content/send-content.container.js diff --git a/ui/app/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js b/ui/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js similarity index 100% rename from ui/app/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js rename to ui/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js diff --git a/ui/app/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.test.js b/ui/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.test.js similarity index 100% rename from ui/app/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.test.js rename to ui/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.test.js diff --git a/ui/app/pages/send/send-content/send-gas-row/gas-fee-display/index.js b/ui/pages/send/send-content/send-gas-row/gas-fee-display/index.js similarity index 100% rename from ui/app/pages/send/send-content/send-gas-row/gas-fee-display/index.js rename to ui/pages/send/send-content/send-gas-row/gas-fee-display/index.js diff --git a/ui/app/pages/send/send-content/send-gas-row/index.js b/ui/pages/send/send-content/send-gas-row/index.js similarity index 100% rename from ui/app/pages/send/send-content/send-gas-row/index.js rename to ui/pages/send/send-content/send-gas-row/index.js diff --git a/ui/app/pages/send/send-content/send-gas-row/send-gas-row.component.js b/ui/pages/send/send-content/send-gas-row/send-gas-row.component.js similarity index 100% rename from ui/app/pages/send/send-content/send-gas-row/send-gas-row.component.js rename to ui/pages/send/send-content/send-gas-row/send-gas-row.component.js diff --git a/ui/app/pages/send/send-content/send-gas-row/send-gas-row.component.test.js b/ui/pages/send/send-content/send-gas-row/send-gas-row.component.test.js similarity index 100% rename from ui/app/pages/send/send-content/send-gas-row/send-gas-row.component.test.js rename to ui/pages/send/send-content/send-gas-row/send-gas-row.component.test.js diff --git a/ui/app/pages/send/send-content/send-gas-row/send-gas-row.container.js b/ui/pages/send/send-content/send-gas-row/send-gas-row.container.js similarity index 100% rename from ui/app/pages/send/send-content/send-gas-row/send-gas-row.container.js rename to ui/pages/send/send-content/send-gas-row/send-gas-row.container.js diff --git a/ui/app/pages/send/send-content/send-gas-row/send-gas-row.container.test.js b/ui/pages/send/send-content/send-gas-row/send-gas-row.container.test.js similarity index 95% rename from ui/app/pages/send/send-content/send-gas-row/send-gas-row.container.test.js rename to ui/pages/send/send-content/send-gas-row/send-gas-row.container.test.js index 6bd3b37cf..db322d25a 100644 --- a/ui/app/pages/send/send-content/send-gas-row/send-gas-row.container.test.js +++ b/ui/pages/send/send-content/send-gas-row/send-gas-row.container.test.js @@ -26,7 +26,7 @@ jest.mock('react-redux', () => ({ }, })); -jest.mock('../../../../../app/selectors', () => ({ +jest.mock('../../../../selectors', () => ({ getSendMaxModeState: (s) => `mockMaxModeOn:${s}`, })); @@ -37,18 +37,18 @@ jest.mock('../../send.utils.js', () => ({ calcGasTotal: (gasLimit, gasPrice) => gasLimit + gasPrice, })); -jest.mock('../../../../../app/store/actions', () => ({ +jest.mock('../../../../store/actions', () => ({ showModal: jest.fn(), setGasPrice: jest.fn(), setGasTotal: jest.fn(), setGasLimit: jest.fn(), })); -jest.mock('../../../../../app/ducks/send/send.duck', () => ({ +jest.mock('../../../../ducks/send/send.duck', () => ({ showGasButtonGroup: jest.fn(), })); -jest.mock('../../../../../app/ducks/gas/gas.duck', () => ({ +jest.mock('../../../../ducks/gas/gas.duck', () => ({ resetCustomData: jest.fn(), setCustomGasPrice: jest.fn(), setCustomGasLimit: jest.fn(), diff --git a/ui/app/pages/send/send-content/send-gas-row/send-gas-row.scss b/ui/pages/send/send-content/send-gas-row/send-gas-row.scss similarity index 100% rename from ui/app/pages/send/send-content/send-gas-row/send-gas-row.scss rename to ui/pages/send/send-content/send-gas-row/send-gas-row.scss diff --git a/ui/app/pages/send/send-content/send-hex-data-row/index.js b/ui/pages/send/send-content/send-hex-data-row/index.js similarity index 100% rename from ui/app/pages/send/send-content/send-hex-data-row/index.js rename to ui/pages/send/send-content/send-hex-data-row/index.js diff --git a/ui/app/pages/send/send-content/send-hex-data-row/send-hex-data-row.component.js b/ui/pages/send/send-content/send-hex-data-row/send-hex-data-row.component.js similarity index 100% rename from ui/app/pages/send/send-content/send-hex-data-row/send-hex-data-row.component.js rename to ui/pages/send/send-content/send-hex-data-row/send-hex-data-row.component.js diff --git a/ui/app/pages/send/send-content/send-hex-data-row/send-hex-data-row.container.js b/ui/pages/send/send-content/send-hex-data-row/send-hex-data-row.container.js similarity index 100% rename from ui/app/pages/send/send-content/send-hex-data-row/send-hex-data-row.container.js rename to ui/pages/send/send-content/send-hex-data-row/send-hex-data-row.container.js diff --git a/ui/app/pages/send/send-content/send-row-wrapper/index.js b/ui/pages/send/send-content/send-row-wrapper/index.js similarity index 100% rename from ui/app/pages/send/send-content/send-row-wrapper/index.js rename to ui/pages/send/send-content/send-row-wrapper/index.js diff --git a/ui/app/pages/send/send-content/send-row-wrapper/send-row-error-message/index.js b/ui/pages/send/send-content/send-row-wrapper/send-row-error-message/index.js similarity index 100% rename from ui/app/pages/send/send-content/send-row-wrapper/send-row-error-message/index.js rename to ui/pages/send/send-content/send-row-wrapper/send-row-error-message/index.js diff --git a/ui/app/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.component.js b/ui/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.component.js similarity index 100% rename from ui/app/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.component.js rename to ui/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.component.js diff --git a/ui/app/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.component.test.js b/ui/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.component.test.js similarity index 100% rename from ui/app/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.component.test.js rename to ui/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.component.test.js diff --git a/ui/app/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.container.js b/ui/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.container.js similarity index 100% rename from ui/app/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.container.js rename to ui/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.container.js diff --git a/ui/app/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.container.test.js b/ui/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.container.test.js similarity index 100% rename from ui/app/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.container.test.js rename to ui/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.container.test.js diff --git a/ui/app/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.scss b/ui/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.scss similarity index 100% rename from ui/app/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.scss rename to ui/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.scss diff --git a/ui/app/pages/send/send-content/send-row-wrapper/send-row-wrapper.component.js b/ui/pages/send/send-content/send-row-wrapper/send-row-wrapper.component.js similarity index 100% rename from ui/app/pages/send/send-content/send-row-wrapper/send-row-wrapper.component.js rename to ui/pages/send/send-content/send-row-wrapper/send-row-wrapper.component.js diff --git a/ui/app/pages/send/send-content/send-row-wrapper/send-row-wrapper.component.test.js b/ui/pages/send/send-content/send-row-wrapper/send-row-wrapper.component.test.js similarity index 100% rename from ui/app/pages/send/send-content/send-row-wrapper/send-row-wrapper.component.test.js rename to ui/pages/send/send-content/send-row-wrapper/send-row-wrapper.component.test.js diff --git a/ui/app/pages/send/send-content/send-row-wrapper/send-row-wrapper.scss b/ui/pages/send/send-content/send-row-wrapper/send-row-wrapper.scss similarity index 100% rename from ui/app/pages/send/send-content/send-row-wrapper/send-row-wrapper.scss rename to ui/pages/send/send-content/send-row-wrapper/send-row-wrapper.scss diff --git a/ui/app/pages/send/send-footer/index.js b/ui/pages/send/send-footer/index.js similarity index 100% rename from ui/app/pages/send/send-footer/index.js rename to ui/pages/send/send-footer/index.js diff --git a/ui/app/pages/send/send-footer/send-footer.component.js b/ui/pages/send/send-footer/send-footer.component.js similarity index 100% rename from ui/app/pages/send/send-footer/send-footer.component.js rename to ui/pages/send/send-footer/send-footer.component.js diff --git a/ui/app/pages/send/send-footer/send-footer.component.test.js b/ui/pages/send/send-footer/send-footer.component.test.js similarity index 100% rename from ui/app/pages/send/send-footer/send-footer.component.test.js rename to ui/pages/send/send-footer/send-footer.component.test.js diff --git a/ui/app/pages/send/send-footer/send-footer.container.js b/ui/pages/send/send-footer/send-footer.container.js similarity index 97% rename from ui/app/pages/send/send-footer/send-footer.container.js rename to ui/pages/send/send-footer/send-footer.container.js index d68d16b60..e8ea039e1 100644 --- a/ui/app/pages/send/send-footer/send-footer.container.js +++ b/ui/pages/send/send-footer/send-footer.container.js @@ -27,7 +27,7 @@ import { getNoGasPriceFetched, } from '../../../selectors'; import { getMostRecentOverviewPage } from '../../../ducks/history/history'; -import { addHexPrefix } from '../../../../../app/scripts/lib/util'; +import { addHexPrefix } from '../../../../app/scripts/lib/util'; import SendFooter from './send-footer.component'; import { addressIsNew, diff --git a/ui/app/pages/send/send-footer/send-footer.container.test.js b/ui/pages/send/send-footer/send-footer.container.test.js similarity index 96% rename from ui/app/pages/send/send-footer/send-footer.container.test.js rename to ui/pages/send/send-footer/send-footer.container.test.js index 56e280b70..7fb79cbae 100644 --- a/ui/app/pages/send/send-footer/send-footer.container.test.js +++ b/ui/pages/send/send-footer/send-footer.container.test.js @@ -21,7 +21,7 @@ jest.mock('react-redux', () => ({ }, })); -jest.mock('../../../../app/store/actions.js', () => ({ +jest.mock('../../../store/actions.js', () => ({ addToAddressBook: jest.fn(), clearSend: jest.fn(), signTokenTx: jest.fn(), @@ -29,7 +29,7 @@ jest.mock('../../../../app/store/actions.js', () => ({ updateTransaction: jest.fn(), })); -jest.mock('../../../../app/selectors/send.js', () => ({ +jest.mock('../../../selectors/send.js', () => ({ getGasLimit: (s) => `mockGasLimit:${s}`, getGasPrice: (s) => `mockGasPrice:${s}`, getGasTotal: (s) => `mockGasTotal:${s}`, @@ -48,7 +48,7 @@ jest.mock('../../../../app/selectors/send.js', () => ({ getDefaultActiveButtonIndex: () => 0, })); -jest.mock('../../../../app/selectors/custom-gas.js', () => ({ +jest.mock('../../../selectors/custom-gas.js', () => ({ getRenderableEstimateDataForSmallButtonsFromGWEI: (s) => [ { gasEstimateType: `mockGasEstimateType:${s}` }, ], diff --git a/ui/app/pages/send/send-footer/send-footer.scss b/ui/pages/send/send-footer/send-footer.scss similarity index 100% rename from ui/app/pages/send/send-footer/send-footer.scss rename to ui/pages/send/send-footer/send-footer.scss diff --git a/ui/app/pages/send/send-footer/send-footer.utils.js b/ui/pages/send/send-footer/send-footer.utils.js similarity index 96% rename from ui/app/pages/send/send-footer/send-footer.utils.js rename to ui/pages/send/send-footer/send-footer.utils.js index 52be9143f..778b07867 100644 --- a/ui/app/pages/send/send-footer/send-footer.utils.js +++ b/ui/pages/send/send-footer/send-footer.utils.js @@ -1,6 +1,6 @@ import ethAbi from 'ethereumjs-abi'; import { TOKEN_TRANSFER_FUNCTION_SIGNATURE } from '../send.constants'; -import { addHexPrefix } from '../../../../../app/scripts/lib/util'; +import { addHexPrefix } from '../../../../app/scripts/lib/util'; import { addHexPrefixToObjectValues } from '../../../helpers/utils/util'; export function constructTxParams({ diff --git a/ui/app/pages/send/send-footer/send-footer.utils.test.js b/ui/pages/send/send-footer/send-footer.utils.test.js similarity index 100% rename from ui/app/pages/send/send-footer/send-footer.utils.test.js rename to ui/pages/send/send-footer/send-footer.utils.test.js diff --git a/ui/app/pages/send/send-header/index.js b/ui/pages/send/send-header/index.js similarity index 100% rename from ui/app/pages/send/send-header/index.js rename to ui/pages/send/send-header/index.js diff --git a/ui/app/pages/send/send-header/send-header.component.js b/ui/pages/send/send-header/send-header.component.js similarity index 100% rename from ui/app/pages/send/send-header/send-header.component.js rename to ui/pages/send/send-header/send-header.component.js diff --git a/ui/app/pages/send/send-header/send-header.component.test.js b/ui/pages/send/send-header/send-header.component.test.js similarity index 100% rename from ui/app/pages/send/send-header/send-header.component.test.js rename to ui/pages/send/send-header/send-header.component.test.js diff --git a/ui/app/pages/send/send-header/send-header.container.js b/ui/pages/send/send-header/send-header.container.js similarity index 100% rename from ui/app/pages/send/send-header/send-header.container.js rename to ui/pages/send/send-header/send-header.container.js diff --git a/ui/app/pages/send/send.component.js b/ui/pages/send/send.component.js similarity index 99% rename from ui/app/pages/send/send.component.js rename to ui/pages/send/send.component.js index 24bd3dc7a..6954f9cfc 100644 --- a/ui/app/pages/send/send.component.js +++ b/ui/pages/send/send.component.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { debounce } from 'lodash'; -import { isValidHexAddress } from '../../../../shared/modules/hexstring-utils'; +import { isValidHexAddress } from '../../../shared/modules/hexstring-utils'; import { getAmountErrorObject, getGasFeeErrorObject, diff --git a/ui/app/pages/send/send.component.test.js b/ui/pages/send/send.component.test.js similarity index 99% rename from ui/app/pages/send/send.component.test.js rename to ui/pages/send/send.component.test.js index bfceb20dd..5cc90307e 100644 --- a/ui/app/pages/send/send.component.test.js +++ b/ui/pages/send/send.component.test.js @@ -4,7 +4,7 @@ import sinon from 'sinon'; import { RINKEBY_CHAIN_ID, ROPSTEN_CHAIN_ID, -} from '../../../../shared/constants/network'; +} from '../../../shared/constants/network'; import SendTransactionScreen from './send.component'; import * as util from './send.utils'; diff --git a/ui/app/pages/send/send.constants.js b/ui/pages/send/send.constants.js similarity index 96% rename from ui/app/pages/send/send.constants.js rename to ui/pages/send/send.constants.js index 93b620d14..ffeaf0397 100644 --- a/ui/app/pages/send/send.constants.js +++ b/ui/pages/send/send.constants.js @@ -2,7 +2,7 @@ import { conversionUtil, multiplyCurrencies, } from '../../helpers/utils/conversion-util'; -import { addHexPrefix } from '../../../../app/scripts/lib/util'; +import { addHexPrefix } from '../../../app/scripts/lib/util'; const MIN_GAS_PRICE_DEC = '0'; const MIN_GAS_PRICE_HEX = parseInt(MIN_GAS_PRICE_DEC, 10).toString(16); diff --git a/ui/app/pages/send/send.container.js b/ui/pages/send/send.container.js similarity index 100% rename from ui/app/pages/send/send.container.js rename to ui/pages/send/send.container.js diff --git a/ui/app/pages/send/send.container.test.js b/ui/pages/send/send.container.test.js similarity index 97% rename from ui/app/pages/send/send.container.test.js rename to ui/pages/send/send.container.test.js index be7f137e9..bb2aca2dd 100644 --- a/ui/app/pages/send/send.container.test.js +++ b/ui/pages/send/send.container.test.js @@ -25,12 +25,12 @@ jest.mock('redux', () => ({ compose: (_, arg2) => () => arg2(), })); -jest.mock('../../../app/store/actions', () => ({ +jest.mock('../../store/actions', () => ({ updateSendTokenBalance: jest.fn(), updateGasData: jest.fn(), setGasTotal: jest.fn(), })); -jest.mock('../../../app/ducks/send/send.duck', () => ({ +jest.mock('../../ducks/send/send.duck', () => ({ updateSendErrors: jest.fn(), resetSendState: jest.fn(), })); diff --git a/ui/app/pages/send/send.scss b/ui/pages/send/send.scss similarity index 100% rename from ui/app/pages/send/send.scss rename to ui/pages/send/send.scss diff --git a/ui/app/pages/send/send.utils.js b/ui/pages/send/send.utils.js similarity index 99% rename from ui/app/pages/send/send.utils.js rename to ui/pages/send/send.utils.js index ffe76241d..1603061e2 100644 --- a/ui/app/pages/send/send.utils.js +++ b/ui/pages/send/send.utils.js @@ -9,7 +9,7 @@ import { } from '../../helpers/utils/conversion-util'; import { calcTokenAmount } from '../../helpers/utils/token-util'; -import { addHexPrefix } from '../../../../app/scripts/lib/util'; +import { addHexPrefix } from '../../../app/scripts/lib/util'; import { BASE_TOKEN_GAS_COST, diff --git a/ui/app/pages/send/send.utils.test.js b/ui/pages/send/send.utils.test.js similarity index 99% rename from ui/app/pages/send/send.utils.test.js rename to ui/pages/send/send.utils.test.js index f94c00fdc..06d3d8edc 100644 --- a/ui/app/pages/send/send.utils.test.js +++ b/ui/pages/send/send.utils.test.js @@ -29,7 +29,7 @@ import { INSUFFICIENT_TOKENS_ERROR, } from './send.constants'; -jest.mock('../../../app/helpers/utils/conversion-util', () => ({ +jest.mock('../../helpers/utils/conversion-util', () => ({ addCurrencies: jest.fn((a, b) => { let [a1, b1] = [a, b]; if (String(a).match(/^0x.+/u)) { @@ -47,7 +47,7 @@ jest.mock('../../../app/helpers/utils/conversion-util', () => ({ conversionLessThan: (obj1, obj2) => obj1.value < obj2.value, })); -jest.mock('../../../app/helpers/utils/token-util', () => ({ +jest.mock('../../helpers/utils/token-util', () => ({ calcTokenAmount: (a, d) => `calc:${a}${d}`, })); diff --git a/ui/app/pages/settings/advanced-tab/advanced-tab.component.js b/ui/pages/settings/advanced-tab/advanced-tab.component.js similarity index 99% rename from ui/app/pages/settings/advanced-tab/advanced-tab.component.js rename to ui/pages/settings/advanced-tab/advanced-tab.component.js index ef95e84f2..cfda8a786 100644 --- a/ui/app/pages/settings/advanced-tab/advanced-tab.component.js +++ b/ui/pages/settings/advanced-tab/advanced-tab.component.js @@ -7,8 +7,8 @@ import TextField from '../../../components/ui/text-field'; import Button from '../../../components/ui/button'; import { MOBILE_SYNC_ROUTE } from '../../../helpers/constants/routes'; -import { getPlatform } from '../../../../../app/scripts/lib/util'; -import { PLATFORM_FIREFOX } from '../../../../../shared/constants/app'; +import { getPlatform } from '../../../../app/scripts/lib/util'; +import { PLATFORM_FIREFOX } from '../../../../shared/constants/app'; export default class AdvancedTab extends PureComponent { static contextTypes = { diff --git a/ui/app/pages/settings/advanced-tab/advanced-tab.component.test.js b/ui/pages/settings/advanced-tab/advanced-tab.component.test.js similarity index 100% rename from ui/app/pages/settings/advanced-tab/advanced-tab.component.test.js rename to ui/pages/settings/advanced-tab/advanced-tab.component.test.js diff --git a/ui/app/pages/settings/advanced-tab/advanced-tab.container.js b/ui/pages/settings/advanced-tab/advanced-tab.container.js similarity index 100% rename from ui/app/pages/settings/advanced-tab/advanced-tab.container.js rename to ui/pages/settings/advanced-tab/advanced-tab.container.js diff --git a/ui/app/pages/settings/advanced-tab/index.js b/ui/pages/settings/advanced-tab/index.js similarity index 100% rename from ui/app/pages/settings/advanced-tab/index.js rename to ui/pages/settings/advanced-tab/index.js diff --git a/ui/app/pages/settings/alerts-tab/alerts-tab.js b/ui/pages/settings/alerts-tab/alerts-tab.js similarity index 96% rename from ui/app/pages/settings/alerts-tab/alerts-tab.js rename to ui/pages/settings/alerts-tab/alerts-tab.js index cdf77c7a5..c8d092470 100644 --- a/ui/app/pages/settings/alerts-tab/alerts-tab.js +++ b/ui/pages/settings/alerts-tab/alerts-tab.js @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { useSelector } from 'react-redux'; -import { ALERT_TYPES } from '../../../../../shared/constants/alerts'; +import { ALERT_TYPES } from '../../../../shared/constants/alerts'; import Tooltip from '../../../components/ui/tooltip'; import ToggleButton from '../../../components/ui/toggle-button'; import { setAlertEnabledness } from '../../../store/actions'; diff --git a/ui/app/pages/settings/alerts-tab/alerts-tab.scss b/ui/pages/settings/alerts-tab/alerts-tab.scss similarity index 100% rename from ui/app/pages/settings/alerts-tab/alerts-tab.scss rename to ui/pages/settings/alerts-tab/alerts-tab.scss diff --git a/ui/app/pages/settings/alerts-tab/index.js b/ui/pages/settings/alerts-tab/index.js similarity index 100% rename from ui/app/pages/settings/alerts-tab/index.js rename to ui/pages/settings/alerts-tab/index.js diff --git a/ui/app/pages/settings/contact-list-tab/add-contact/add-contact.component.js b/ui/pages/settings/contact-list-tab/add-contact/add-contact.component.js similarity index 98% rename from ui/app/pages/settings/contact-list-tab/add-contact/add-contact.component.js rename to ui/pages/settings/contact-list-tab/add-contact/add-contact.component.js index 8ddd29ac2..f017604fd 100644 --- a/ui/app/pages/settings/contact-list-tab/add-contact/add-contact.component.js +++ b/ui/pages/settings/contact-list-tab/add-contact/add-contact.component.js @@ -10,7 +10,7 @@ import PageContainerFooter from '../../../../components/ui/page-container/page-c import { isBurnAddress, isValidHexAddress, -} from '../../../../../../shared/modules/hexstring-utils'; +} from '../../../../../shared/modules/hexstring-utils'; export default class AddContact extends PureComponent { static contextTypes = { diff --git a/ui/app/pages/settings/contact-list-tab/add-contact/add-contact.container.js b/ui/pages/settings/contact-list-tab/add-contact/add-contact.container.js similarity index 100% rename from ui/app/pages/settings/contact-list-tab/add-contact/add-contact.container.js rename to ui/pages/settings/contact-list-tab/add-contact/add-contact.container.js diff --git a/ui/app/pages/settings/contact-list-tab/add-contact/index.js b/ui/pages/settings/contact-list-tab/add-contact/index.js similarity index 100% rename from ui/app/pages/settings/contact-list-tab/add-contact/index.js rename to ui/pages/settings/contact-list-tab/add-contact/index.js diff --git a/ui/app/pages/settings/contact-list-tab/contact-list-tab.component.js b/ui/pages/settings/contact-list-tab/contact-list-tab.component.js similarity index 100% rename from ui/app/pages/settings/contact-list-tab/contact-list-tab.component.js rename to ui/pages/settings/contact-list-tab/contact-list-tab.component.js diff --git a/ui/app/pages/settings/contact-list-tab/contact-list-tab.container.js b/ui/pages/settings/contact-list-tab/contact-list-tab.container.js similarity index 89% rename from ui/app/pages/settings/contact-list-tab/contact-list-tab.container.js rename to ui/pages/settings/contact-list-tab/contact-list-tab.container.js index 0d80480b5..60e760a11 100644 --- a/ui/app/pages/settings/contact-list-tab/contact-list-tab.container.js +++ b/ui/pages/settings/contact-list-tab/contact-list-tab.container.js @@ -2,8 +2,8 @@ import { compose } from 'redux'; import { connect } from 'react-redux'; import { withRouter } from 'react-router-dom'; import { getAddressBook } from '../../../selectors'; -import { ENVIRONMENT_TYPE_POPUP } from '../../../../../shared/constants/app'; -import { getEnvironmentType } from '../../../../../app/scripts/lib/util'; +import { ENVIRONMENT_TYPE_POPUP } from '../../../../shared/constants/app'; +import { getEnvironmentType } from '../../../../app/scripts/lib/util'; import { CONTACT_ADD_ROUTE, diff --git a/ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.component.js b/ui/pages/settings/contact-list-tab/edit-contact/edit-contact.component.js similarity index 98% rename from ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.component.js rename to ui/pages/settings/contact-list-tab/edit-contact/edit-contact.component.js index 00725f6ea..51419b302 100644 --- a/ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.component.js +++ b/ui/pages/settings/contact-list-tab/edit-contact/edit-contact.component.js @@ -8,7 +8,7 @@ import PageContainerFooter from '../../../../components/ui/page-container/page-c import { isBurnAddress, isValidHexAddress, -} from '../../../../../../shared/modules/hexstring-utils'; +} from '../../../../../shared/modules/hexstring-utils'; export default class EditContact extends PureComponent { static contextTypes = { diff --git a/ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.container.js b/ui/pages/settings/contact-list-tab/edit-contact/edit-contact.container.js similarity index 100% rename from ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.container.js rename to ui/pages/settings/contact-list-tab/edit-contact/edit-contact.container.js diff --git a/ui/app/pages/settings/contact-list-tab/edit-contact/index.js b/ui/pages/settings/contact-list-tab/edit-contact/index.js similarity index 100% rename from ui/app/pages/settings/contact-list-tab/edit-contact/index.js rename to ui/pages/settings/contact-list-tab/edit-contact/index.js diff --git a/ui/app/pages/settings/contact-list-tab/index.js b/ui/pages/settings/contact-list-tab/index.js similarity index 100% rename from ui/app/pages/settings/contact-list-tab/index.js rename to ui/pages/settings/contact-list-tab/index.js diff --git a/ui/app/pages/settings/contact-list-tab/index.scss b/ui/pages/settings/contact-list-tab/index.scss similarity index 100% rename from ui/app/pages/settings/contact-list-tab/index.scss rename to ui/pages/settings/contact-list-tab/index.scss diff --git a/ui/app/pages/settings/contact-list-tab/view-contact/index.js b/ui/pages/settings/contact-list-tab/view-contact/index.js similarity index 100% rename from ui/app/pages/settings/contact-list-tab/view-contact/index.js rename to ui/pages/settings/contact-list-tab/view-contact/index.js diff --git a/ui/app/pages/settings/contact-list-tab/view-contact/view-contact.component.js b/ui/pages/settings/contact-list-tab/view-contact/view-contact.component.js similarity index 100% rename from ui/app/pages/settings/contact-list-tab/view-contact/view-contact.component.js rename to ui/pages/settings/contact-list-tab/view-contact/view-contact.component.js diff --git a/ui/app/pages/settings/contact-list-tab/view-contact/view-contact.container.js b/ui/pages/settings/contact-list-tab/view-contact/view-contact.container.js similarity index 92% rename from ui/app/pages/settings/contact-list-tab/view-contact/view-contact.container.js rename to ui/pages/settings/contact-list-tab/view-contact/view-contact.container.js index 2ce020ffa..275273d0a 100644 --- a/ui/app/pages/settings/contact-list-tab/view-contact/view-contact.container.js +++ b/ui/pages/settings/contact-list-tab/view-contact/view-contact.container.js @@ -6,7 +6,7 @@ import { CONTACT_EDIT_ROUTE, CONTACT_LIST_ROUTE, } from '../../../../helpers/constants/routes'; -import { toChecksumHexAddress } from '../../../../../../shared/modules/hexstring-utils'; +import { toChecksumHexAddress } from '../../../../../shared/modules/hexstring-utils'; import ViewContact from './view-contact.component'; const mapStateToProps = (state, ownProps) => { diff --git a/ui/app/pages/settings/index.js b/ui/pages/settings/index.js similarity index 100% rename from ui/app/pages/settings/index.js rename to ui/pages/settings/index.js diff --git a/ui/app/pages/settings/index.scss b/ui/pages/settings/index.scss similarity index 100% rename from ui/app/pages/settings/index.scss rename to ui/pages/settings/index.scss diff --git a/ui/app/pages/settings/info-tab/index.js b/ui/pages/settings/info-tab/index.js similarity index 100% rename from ui/app/pages/settings/info-tab/index.js rename to ui/pages/settings/info-tab/index.js diff --git a/ui/app/pages/settings/info-tab/index.scss b/ui/pages/settings/info-tab/index.scss similarity index 100% rename from ui/app/pages/settings/info-tab/index.scss rename to ui/pages/settings/info-tab/index.scss diff --git a/ui/app/pages/settings/info-tab/info-tab.component.js b/ui/pages/settings/info-tab/info-tab.component.js similarity index 100% rename from ui/app/pages/settings/info-tab/info-tab.component.js rename to ui/pages/settings/info-tab/info-tab.component.js diff --git a/ui/app/pages/settings/networks-tab/index.js b/ui/pages/settings/networks-tab/index.js similarity index 100% rename from ui/app/pages/settings/networks-tab/index.js rename to ui/pages/settings/networks-tab/index.js diff --git a/ui/app/pages/settings/networks-tab/index.scss b/ui/pages/settings/networks-tab/index.scss similarity index 100% rename from ui/app/pages/settings/networks-tab/index.scss rename to ui/pages/settings/networks-tab/index.scss diff --git a/ui/app/pages/settings/networks-tab/network-form/index.js b/ui/pages/settings/networks-tab/network-form/index.js similarity index 100% rename from ui/app/pages/settings/networks-tab/network-form/index.js rename to ui/pages/settings/networks-tab/network-form/index.js diff --git a/ui/app/pages/settings/networks-tab/network-form/network-form.component.js b/ui/pages/settings/networks-tab/network-form/network-form.component.js similarity index 99% rename from ui/app/pages/settings/networks-tab/network-form/network-form.component.js rename to ui/pages/settings/networks-tab/network-form/network-form.component.js index 58a3f5754..ff969be39 100644 --- a/ui/app/pages/settings/networks-tab/network-form/network-form.component.js +++ b/ui/pages/settings/networks-tab/network-form/network-form.component.js @@ -8,8 +8,8 @@ import Tooltip from '../../../../components/ui/tooltip'; import { isPrefixedFormattedHexString, isSafeChainId, -} from '../../../../../../shared/modules/network.utils'; -import { jsonRpcRequest } from '../../../../../../shared/modules/rpc.utils'; +} from '../../../../../shared/modules/network.utils'; +import { jsonRpcRequest } from '../../../../../shared/modules/rpc.utils'; const FORM_STATE_KEYS = [ 'rpcUrl', diff --git a/ui/app/pages/settings/networks-tab/networks-tab.component.js b/ui/pages/settings/networks-tab/networks-tab.component.js similarity index 99% rename from ui/app/pages/settings/networks-tab/networks-tab.component.js rename to ui/pages/settings/networks-tab/networks-tab.component.js index f62a40790..e4fb230c7 100644 --- a/ui/app/pages/settings/networks-tab/networks-tab.component.js +++ b/ui/pages/settings/networks-tab/networks-tab.component.js @@ -1,7 +1,7 @@ import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; -import { NETWORK_TYPE_RPC } from '../../../../../shared/constants/network'; +import { NETWORK_TYPE_RPC } from '../../../../shared/constants/network'; import Button from '../../../components/ui/button'; import LockIcon from '../../../components/ui/lock-icon'; import { diff --git a/ui/app/pages/settings/networks-tab/networks-tab.constants.js b/ui/pages/settings/networks-tab/networks-tab.constants.js similarity index 96% rename from ui/app/pages/settings/networks-tab/networks-tab.constants.js rename to ui/pages/settings/networks-tab/networks-tab.constants.js index 52f6514d7..91fdbe251 100644 --- a/ui/app/pages/settings/networks-tab/networks-tab.constants.js +++ b/ui/pages/settings/networks-tab/networks-tab.constants.js @@ -9,7 +9,7 @@ import { RINKEBY_CHAIN_ID, ROPSTEN, ROPSTEN_CHAIN_ID, -} from '../../../../../shared/constants/network'; +} from '../../../../shared/constants/network'; const defaultNetworksData = [ { diff --git a/ui/app/pages/settings/networks-tab/networks-tab.container.js b/ui/pages/settings/networks-tab/networks-tab.container.js similarity index 93% rename from ui/app/pages/settings/networks-tab/networks-tab.container.js rename to ui/pages/settings/networks-tab/networks-tab.container.js index 75b637159..2878cbf11 100644 --- a/ui/app/pages/settings/networks-tab/networks-tab.container.js +++ b/ui/pages/settings/networks-tab/networks-tab.container.js @@ -10,9 +10,9 @@ import { showModal, } from '../../../store/actions'; import { NETWORKS_FORM_ROUTE } from '../../../helpers/constants/routes'; -import { ENVIRONMENT_TYPE_FULLSCREEN } from '../../../../../shared/constants/app'; -import { NETWORK_TYPE_RPC } from '../../../../../shared/constants/network'; -import { getEnvironmentType } from '../../../../../app/scripts/lib/util'; +import { ENVIRONMENT_TYPE_FULLSCREEN } from '../../../../shared/constants/app'; +import { NETWORK_TYPE_RPC } from '../../../../shared/constants/network'; +import { getEnvironmentType } from '../../../../app/scripts/lib/util'; import NetworksTab from './networks-tab.component'; import { defaultNetworksData } from './networks-tab.constants'; diff --git a/ui/app/pages/settings/security-tab/index.js b/ui/pages/settings/security-tab/index.js similarity index 100% rename from ui/app/pages/settings/security-tab/index.js rename to ui/pages/settings/security-tab/index.js diff --git a/ui/app/pages/settings/security-tab/security-tab.component.js b/ui/pages/settings/security-tab/security-tab.component.js similarity index 100% rename from ui/app/pages/settings/security-tab/security-tab.component.js rename to ui/pages/settings/security-tab/security-tab.component.js diff --git a/ui/app/pages/settings/security-tab/security-tab.container.js b/ui/pages/settings/security-tab/security-tab.container.js similarity index 100% rename from ui/app/pages/settings/security-tab/security-tab.container.js rename to ui/pages/settings/security-tab/security-tab.container.js diff --git a/ui/app/pages/settings/security-tab/security-tab.container.test.js b/ui/pages/settings/security-tab/security-tab.container.test.js similarity index 100% rename from ui/app/pages/settings/security-tab/security-tab.container.test.js rename to ui/pages/settings/security-tab/security-tab.container.test.js diff --git a/ui/app/pages/settings/settings-tab/index.js b/ui/pages/settings/settings-tab/index.js similarity index 100% rename from ui/app/pages/settings/settings-tab/index.js rename to ui/pages/settings/settings-tab/index.js diff --git a/ui/app/pages/settings/settings-tab/index.scss b/ui/pages/settings/settings-tab/index.scss similarity index 100% rename from ui/app/pages/settings/settings-tab/index.scss rename to ui/pages/settings/settings-tab/index.scss diff --git a/ui/app/pages/settings/settings-tab/settings-tab.component.js b/ui/pages/settings/settings-tab/settings-tab.component.js similarity index 99% rename from ui/app/pages/settings/settings-tab/settings-tab.component.js rename to ui/pages/settings/settings-tab/settings-tab.component.js index 71aae33a6..d40b446c2 100644 --- a/ui/app/pages/settings/settings-tab/settings-tab.component.js +++ b/ui/pages/settings/settings-tab/settings-tab.component.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import availableCurrencies from '../../../helpers/constants/available-conversions.json'; import Dropdown from '../../../components/ui/dropdown'; import ToggleButton from '../../../components/ui/toggle-button'; -import locales from '../../../../../app/_locales/index.json'; +import locales from '../../../../app/_locales/index.json'; const sortedCurrencies = availableCurrencies.sort((a, b) => { return a.name.toLocaleLowerCase().localeCompare(b.name.toLocaleLowerCase()); diff --git a/ui/app/pages/settings/settings-tab/settings-tab.container.js b/ui/pages/settings/settings-tab/settings-tab.container.js similarity index 100% rename from ui/app/pages/settings/settings-tab/settings-tab.container.js rename to ui/pages/settings/settings-tab/settings-tab.container.js diff --git a/ui/app/pages/settings/settings-tab/settings-tab.container.test.js b/ui/pages/settings/settings-tab/settings-tab.container.test.js similarity index 100% rename from ui/app/pages/settings/settings-tab/settings-tab.container.test.js rename to ui/pages/settings/settings-tab/settings-tab.container.test.js diff --git a/ui/app/pages/settings/settings.component.js b/ui/pages/settings/settings.component.js similarity index 100% rename from ui/app/pages/settings/settings.component.js rename to ui/pages/settings/settings.component.js diff --git a/ui/app/pages/settings/settings.container.js b/ui/pages/settings/settings.container.js similarity index 92% rename from ui/app/pages/settings/settings.container.js rename to ui/pages/settings/settings.container.js index 1121c4755..bf428c4fc 100644 --- a/ui/app/pages/settings/settings.container.js +++ b/ui/pages/settings/settings.container.js @@ -2,13 +2,13 @@ import { compose } from 'redux'; import { connect } from 'react-redux'; import { withRouter } from 'react-router-dom'; import { getAddressBookEntryName } from '../../selectors'; -import { ENVIRONMENT_TYPE_POPUP } from '../../../../shared/constants/app'; -import { getEnvironmentType } from '../../../../app/scripts/lib/util'; +import { ENVIRONMENT_TYPE_POPUP } from '../../../shared/constants/app'; +import { getEnvironmentType } from '../../../app/scripts/lib/util'; import { getMostRecentOverviewPage } from '../../ducks/history/history'; import { isValidHexAddress, isBurnAddress, -} from '../../../../shared/modules/hexstring-utils'; +} from '../../../shared/modules/hexstring-utils'; import { ABOUT_US_ROUTE, diff --git a/ui/app/pages/swaps/__snapshots__/index.test.js.snap b/ui/pages/swaps/__snapshots__/index.test.js.snap similarity index 100% rename from ui/app/pages/swaps/__snapshots__/index.test.js.snap rename to ui/pages/swaps/__snapshots__/index.test.js.snap diff --git a/ui/app/pages/swaps/actionable-message/__snapshots__/actionable-message.test.js.snap b/ui/pages/swaps/actionable-message/__snapshots__/actionable-message.test.js.snap similarity index 100% rename from ui/app/pages/swaps/actionable-message/__snapshots__/actionable-message.test.js.snap rename to ui/pages/swaps/actionable-message/__snapshots__/actionable-message.test.js.snap diff --git a/ui/app/pages/swaps/actionable-message/actionable-message.js b/ui/pages/swaps/actionable-message/actionable-message.js similarity index 100% rename from ui/app/pages/swaps/actionable-message/actionable-message.js rename to ui/pages/swaps/actionable-message/actionable-message.js diff --git a/ui/app/pages/swaps/actionable-message/actionable-message.stories.js b/ui/pages/swaps/actionable-message/actionable-message.stories.js similarity index 100% rename from ui/app/pages/swaps/actionable-message/actionable-message.stories.js rename to ui/pages/swaps/actionable-message/actionable-message.stories.js diff --git a/ui/app/pages/swaps/actionable-message/actionable-message.test.js b/ui/pages/swaps/actionable-message/actionable-message.test.js similarity index 89% rename from ui/app/pages/swaps/actionable-message/actionable-message.test.js rename to ui/pages/swaps/actionable-message/actionable-message.test.js index 6074f4576..aeae55104 100644 --- a/ui/app/pages/swaps/actionable-message/actionable-message.test.js +++ b/ui/pages/swaps/actionable-message/actionable-message.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../test/jest'; +import { renderWithProvider } from '../../../../test/jest'; import ActionableMessage from '.'; const createProps = (customProps = {}) => { diff --git a/ui/app/pages/swaps/actionable-message/index.js b/ui/pages/swaps/actionable-message/index.js similarity index 100% rename from ui/app/pages/swaps/actionable-message/index.js rename to ui/pages/swaps/actionable-message/index.js diff --git a/ui/app/pages/swaps/actionable-message/index.scss b/ui/pages/swaps/actionable-message/index.scss similarity index 100% rename from ui/app/pages/swaps/actionable-message/index.scss rename to ui/pages/swaps/actionable-message/index.scss diff --git a/ui/app/pages/swaps/awaiting-swap/__snapshots__/awaiting-swap.test.js.snap b/ui/pages/swaps/awaiting-swap/__snapshots__/awaiting-swap.test.js.snap similarity index 100% rename from ui/app/pages/swaps/awaiting-swap/__snapshots__/awaiting-swap.test.js.snap rename to ui/pages/swaps/awaiting-swap/__snapshots__/awaiting-swap.test.js.snap diff --git a/ui/app/pages/swaps/awaiting-swap/__snapshots__/quotes-timeout-icon.test.js.snap b/ui/pages/swaps/awaiting-swap/__snapshots__/quotes-timeout-icon.test.js.snap similarity index 100% rename from ui/app/pages/swaps/awaiting-swap/__snapshots__/quotes-timeout-icon.test.js.snap rename to ui/pages/swaps/awaiting-swap/__snapshots__/quotes-timeout-icon.test.js.snap diff --git a/ui/app/pages/swaps/awaiting-swap/__snapshots__/swap-failure-icon.test.js.snap b/ui/pages/swaps/awaiting-swap/__snapshots__/swap-failure-icon.test.js.snap similarity index 100% rename from ui/app/pages/swaps/awaiting-swap/__snapshots__/swap-failure-icon.test.js.snap rename to ui/pages/swaps/awaiting-swap/__snapshots__/swap-failure-icon.test.js.snap diff --git a/ui/app/pages/swaps/awaiting-swap/__snapshots__/swap-success-icon.test.js.snap b/ui/pages/swaps/awaiting-swap/__snapshots__/swap-success-icon.test.js.snap similarity index 100% rename from ui/app/pages/swaps/awaiting-swap/__snapshots__/swap-success-icon.test.js.snap rename to ui/pages/swaps/awaiting-swap/__snapshots__/swap-success-icon.test.js.snap diff --git a/ui/app/pages/swaps/awaiting-swap/awaiting-swap.js b/ui/pages/swaps/awaiting-swap/awaiting-swap.js similarity index 97% rename from ui/app/pages/swaps/awaiting-swap/awaiting-swap.js rename to ui/pages/swaps/awaiting-swap/awaiting-swap.js index af21ce29b..c777ea198 100644 --- a/ui/app/pages/swaps/awaiting-swap/awaiting-swap.js +++ b/ui/pages/swaps/awaiting-swap/awaiting-swap.js @@ -33,16 +33,16 @@ import { QUOTES_NOT_AVAILABLE_ERROR, OFFLINE_FOR_MAINTENANCE, SWAPS_CHAINID_DEFAULT_BLOCK_EXPLORER_URL_MAP, -} from '../../../../../shared/constants/swaps'; -import { CHAIN_ID_TO_TYPE_MAP as VALID_INFURA_CHAIN_IDS } from '../../../../../shared/constants/network'; -import { isSwapsDefaultTokenSymbol } from '../../../../../shared/modules/swaps.utils'; +} from '../../../../shared/constants/swaps'; +import { CHAIN_ID_TO_TYPE_MAP as VALID_INFURA_CHAIN_IDS } from '../../../../shared/constants/network'; +import { isSwapsDefaultTokenSymbol } from '../../../../shared/modules/swaps.utils'; import PulseLoader from '../../../components/ui/pulse-loader'; import { ASSET_ROUTE, DEFAULT_ROUTE } from '../../../helpers/constants/routes'; import { getRenderableNetworkFeesForQuote } from '../swaps.util'; import SwapsFooter from '../swaps-footer'; -import { getBlockExplorerUrlForTx } from '../../../../../shared/modules/transaction.utils'; +import { getBlockExplorerUrlForTx } from '../../../../shared/modules/transaction.utils'; import SwapFailureIcon from './swap-failure-icon'; import SwapSuccessIcon from './swap-success-icon'; diff --git a/ui/app/pages/swaps/awaiting-swap/awaiting-swap.test.js b/ui/pages/swaps/awaiting-swap/awaiting-swap.test.js similarity index 96% rename from ui/app/pages/swaps/awaiting-swap/awaiting-swap.test.js rename to ui/pages/swaps/awaiting-swap/awaiting-swap.test.js index 396bcfb51..af9850752 100644 --- a/ui/app/pages/swaps/awaiting-swap/awaiting-swap.test.js +++ b/ui/pages/swaps/awaiting-swap/awaiting-swap.test.js @@ -4,7 +4,7 @@ import configureMockStore from 'redux-mock-store'; import { renderWithProvider, createSwapsMockStore, -} from '../../../../../test/jest'; +} from '../../../../test/jest'; import AwaitingSwap from '.'; const createProps = (customProps = {}) => { diff --git a/ui/app/pages/swaps/awaiting-swap/index.js b/ui/pages/swaps/awaiting-swap/index.js similarity index 100% rename from ui/app/pages/swaps/awaiting-swap/index.js rename to ui/pages/swaps/awaiting-swap/index.js diff --git a/ui/app/pages/swaps/awaiting-swap/index.scss b/ui/pages/swaps/awaiting-swap/index.scss similarity index 100% rename from ui/app/pages/swaps/awaiting-swap/index.scss rename to ui/pages/swaps/awaiting-swap/index.scss diff --git a/ui/app/pages/swaps/awaiting-swap/quotes-timeout-icon.js b/ui/pages/swaps/awaiting-swap/quotes-timeout-icon.js similarity index 100% rename from ui/app/pages/swaps/awaiting-swap/quotes-timeout-icon.js rename to ui/pages/swaps/awaiting-swap/quotes-timeout-icon.js diff --git a/ui/app/pages/swaps/awaiting-swap/quotes-timeout-icon.test.js b/ui/pages/swaps/awaiting-swap/quotes-timeout-icon.test.js similarity index 81% rename from ui/app/pages/swaps/awaiting-swap/quotes-timeout-icon.test.js rename to ui/pages/swaps/awaiting-swap/quotes-timeout-icon.test.js index 6afc922ef..12f2adf45 100644 --- a/ui/app/pages/swaps/awaiting-swap/quotes-timeout-icon.test.js +++ b/ui/pages/swaps/awaiting-swap/quotes-timeout-icon.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../test/jest'; +import { renderWithProvider } from '../../../../test/jest'; import QuotesTimeoutIcon from './quotes-timeout-icon'; describe('QuotesTimeoutIcon', () => { diff --git a/ui/app/pages/swaps/awaiting-swap/swap-failure-icon.js b/ui/pages/swaps/awaiting-swap/swap-failure-icon.js similarity index 100% rename from ui/app/pages/swaps/awaiting-swap/swap-failure-icon.js rename to ui/pages/swaps/awaiting-swap/swap-failure-icon.js diff --git a/ui/app/pages/swaps/awaiting-swap/swap-failure-icon.test.js b/ui/pages/swaps/awaiting-swap/swap-failure-icon.test.js similarity index 81% rename from ui/app/pages/swaps/awaiting-swap/swap-failure-icon.test.js rename to ui/pages/swaps/awaiting-swap/swap-failure-icon.test.js index be75020f8..02af2db06 100644 --- a/ui/app/pages/swaps/awaiting-swap/swap-failure-icon.test.js +++ b/ui/pages/swaps/awaiting-swap/swap-failure-icon.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../test/jest'; +import { renderWithProvider } from '../../../../test/jest'; import SwapFailureIcon from './swap-failure-icon'; describe('SwapFailureIcon', () => { diff --git a/ui/app/pages/swaps/awaiting-swap/swap-success-icon.js b/ui/pages/swaps/awaiting-swap/swap-success-icon.js similarity index 100% rename from ui/app/pages/swaps/awaiting-swap/swap-success-icon.js rename to ui/pages/swaps/awaiting-swap/swap-success-icon.js diff --git a/ui/app/pages/swaps/awaiting-swap/swap-success-icon.test.js b/ui/pages/swaps/awaiting-swap/swap-success-icon.test.js similarity index 81% rename from ui/app/pages/swaps/awaiting-swap/swap-success-icon.test.js rename to ui/pages/swaps/awaiting-swap/swap-success-icon.test.js index 39d9eed12..4e735f158 100644 --- a/ui/app/pages/swaps/awaiting-swap/swap-success-icon.test.js +++ b/ui/pages/swaps/awaiting-swap/swap-success-icon.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../test/jest'; +import { renderWithProvider } from '../../../../test/jest'; import SwapSuccessIcon from './swap-success-icon'; describe('SwapSuccessIcon', () => { diff --git a/ui/app/pages/swaps/awaiting-swap/view-on-ether-scan-link/__snapshots__/view-on-ether-scan-link.test.js.snap b/ui/pages/swaps/awaiting-swap/view-on-ether-scan-link/__snapshots__/view-on-ether-scan-link.test.js.snap similarity index 100% rename from ui/app/pages/swaps/awaiting-swap/view-on-ether-scan-link/__snapshots__/view-on-ether-scan-link.test.js.snap rename to ui/pages/swaps/awaiting-swap/view-on-ether-scan-link/__snapshots__/view-on-ether-scan-link.test.js.snap diff --git a/ui/app/pages/swaps/awaiting-swap/view-on-ether-scan-link/index.js b/ui/pages/swaps/awaiting-swap/view-on-ether-scan-link/index.js similarity index 100% rename from ui/app/pages/swaps/awaiting-swap/view-on-ether-scan-link/index.js rename to ui/pages/swaps/awaiting-swap/view-on-ether-scan-link/index.js diff --git a/ui/app/pages/swaps/awaiting-swap/view-on-ether-scan-link/view-on-ether-scan-link.js b/ui/pages/swaps/awaiting-swap/view-on-ether-scan-link/view-on-ether-scan-link.js similarity index 100% rename from ui/app/pages/swaps/awaiting-swap/view-on-ether-scan-link/view-on-ether-scan-link.js rename to ui/pages/swaps/awaiting-swap/view-on-ether-scan-link/view-on-ether-scan-link.js diff --git a/ui/app/pages/swaps/awaiting-swap/view-on-ether-scan-link/view-on-ether-scan-link.test.js b/ui/pages/swaps/awaiting-swap/view-on-ether-scan-link/view-on-ether-scan-link.test.js similarity index 94% rename from ui/app/pages/swaps/awaiting-swap/view-on-ether-scan-link/view-on-ether-scan-link.test.js rename to ui/pages/swaps/awaiting-swap/view-on-ether-scan-link/view-on-ether-scan-link.test.js index 0eb8a4dc7..91e32b82c 100644 --- a/ui/app/pages/swaps/awaiting-swap/view-on-ether-scan-link/view-on-ether-scan-link.test.js +++ b/ui/pages/swaps/awaiting-swap/view-on-ether-scan-link/view-on-ether-scan-link.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../../test/jest'; +import { renderWithProvider } from '../../../../../test/jest'; import ViewOnEtherScanLink from '.'; const createProps = (customProps = {}) => { diff --git a/ui/app/pages/swaps/build-quote/__snapshots__/build-quote.test.js.snap b/ui/pages/swaps/build-quote/__snapshots__/build-quote.test.js.snap similarity index 100% rename from ui/app/pages/swaps/build-quote/__snapshots__/build-quote.test.js.snap rename to ui/pages/swaps/build-quote/__snapshots__/build-quote.test.js.snap diff --git a/ui/app/pages/swaps/build-quote/build-quote.js b/ui/pages/swaps/build-quote/build-quote.js similarity index 99% rename from ui/app/pages/swaps/build-quote/build-quote.js rename to ui/pages/swaps/build-quote/build-quote.js index d93ab6a9b..22ed85d30 100644 --- a/ui/app/pages/swaps/build-quote/build-quote.js +++ b/ui/pages/swaps/build-quote/build-quote.js @@ -53,8 +53,8 @@ import { useEthFiatAmount } from '../../../hooks/useEthFiatAmount'; import { isSwapsDefaultTokenAddress, isSwapsDefaultTokenSymbol, -} from '../../../../../shared/modules/swaps.utils'; -import { SWAPS_CHAINID_DEFAULT_BLOCK_EXPLORER_URL_MAP } from '../../../../../shared/constants/swaps'; +} from '../../../../shared/modules/swaps.utils'; +import { SWAPS_CHAINID_DEFAULT_BLOCK_EXPLORER_URL_MAP } from '../../../../shared/constants/swaps'; import { resetSwapsPostFetchState, removeToken } from '../../../store/actions'; import { fetchTokenPrice, fetchTokenBalance } from '../swaps.util'; diff --git a/ui/app/pages/swaps/build-quote/build-quote.stories.js b/ui/pages/swaps/build-quote/build-quote.stories.js similarity index 100% rename from ui/app/pages/swaps/build-quote/build-quote.stories.js rename to ui/pages/swaps/build-quote/build-quote.stories.js diff --git a/ui/app/pages/swaps/build-quote/build-quote.test.js b/ui/pages/swaps/build-quote/build-quote.test.js similarity index 97% rename from ui/app/pages/swaps/build-quote/build-quote.test.js rename to ui/pages/swaps/build-quote/build-quote.test.js index d27990687..960489281 100644 --- a/ui/app/pages/swaps/build-quote/build-quote.test.js +++ b/ui/pages/swaps/build-quote/build-quote.test.js @@ -6,7 +6,7 @@ import { renderWithProvider, createSwapsMockStore, setBackgroundConnection, -} from '../../../../../test/jest'; +} from '../../../../test/jest'; import BuildQuote from '.'; const middleware = [thunk]; diff --git a/ui/app/pages/swaps/build-quote/index.js b/ui/pages/swaps/build-quote/index.js similarity index 100% rename from ui/app/pages/swaps/build-quote/index.js rename to ui/pages/swaps/build-quote/index.js diff --git a/ui/app/pages/swaps/build-quote/index.scss b/ui/pages/swaps/build-quote/index.scss similarity index 100% rename from ui/app/pages/swaps/build-quote/index.scss rename to ui/pages/swaps/build-quote/index.scss diff --git a/ui/app/pages/swaps/countdown-timer/countdown-timer.js b/ui/pages/swaps/countdown-timer/countdown-timer.js similarity index 100% rename from ui/app/pages/swaps/countdown-timer/countdown-timer.js rename to ui/pages/swaps/countdown-timer/countdown-timer.js diff --git a/ui/app/pages/swaps/countdown-timer/countdown-timer.stories.js b/ui/pages/swaps/countdown-timer/countdown-timer.stories.js similarity index 100% rename from ui/app/pages/swaps/countdown-timer/countdown-timer.stories.js rename to ui/pages/swaps/countdown-timer/countdown-timer.stories.js diff --git a/ui/app/pages/swaps/countdown-timer/countdown-timer.test.js b/ui/pages/swaps/countdown-timer/countdown-timer.test.js similarity index 95% rename from ui/app/pages/swaps/countdown-timer/countdown-timer.test.js rename to ui/pages/swaps/countdown-timer/countdown-timer.test.js index ad6697f3a..49f37dcd6 100644 --- a/ui/app/pages/swaps/countdown-timer/countdown-timer.test.js +++ b/ui/pages/swaps/countdown-timer/countdown-timer.test.js @@ -4,7 +4,7 @@ import configureMockStore from 'redux-mock-store'; import { renderWithProvider, createSwapsMockStore, -} from '../../../../../test/jest'; +} from '../../../../test/jest'; import CountdownTimer from '.'; const createProps = (customProps = {}) => { diff --git a/ui/app/pages/swaps/countdown-timer/index.js b/ui/pages/swaps/countdown-timer/index.js similarity index 100% rename from ui/app/pages/swaps/countdown-timer/index.js rename to ui/pages/swaps/countdown-timer/index.js diff --git a/ui/app/pages/swaps/countdown-timer/index.scss b/ui/pages/swaps/countdown-timer/index.scss similarity index 100% rename from ui/app/pages/swaps/countdown-timer/index.scss rename to ui/pages/swaps/countdown-timer/index.scss diff --git a/ui/app/pages/swaps/dropdown-input-pair/__snapshots__/dropdown-input-pair.test.js.snap b/ui/pages/swaps/dropdown-input-pair/__snapshots__/dropdown-input-pair.test.js.snap similarity index 100% rename from ui/app/pages/swaps/dropdown-input-pair/__snapshots__/dropdown-input-pair.test.js.snap rename to ui/pages/swaps/dropdown-input-pair/__snapshots__/dropdown-input-pair.test.js.snap diff --git a/ui/app/pages/swaps/dropdown-input-pair/dropdown-input-pair.js b/ui/pages/swaps/dropdown-input-pair/dropdown-input-pair.js similarity index 100% rename from ui/app/pages/swaps/dropdown-input-pair/dropdown-input-pair.js rename to ui/pages/swaps/dropdown-input-pair/dropdown-input-pair.js diff --git a/ui/app/pages/swaps/dropdown-input-pair/dropdown-input-pair.stories.js b/ui/pages/swaps/dropdown-input-pair/dropdown-input-pair.stories.js similarity index 100% rename from ui/app/pages/swaps/dropdown-input-pair/dropdown-input-pair.stories.js rename to ui/pages/swaps/dropdown-input-pair/dropdown-input-pair.stories.js diff --git a/ui/app/pages/swaps/dropdown-input-pair/dropdown-input-pair.test.js b/ui/pages/swaps/dropdown-input-pair/dropdown-input-pair.test.js similarity index 89% rename from ui/app/pages/swaps/dropdown-input-pair/dropdown-input-pair.test.js rename to ui/pages/swaps/dropdown-input-pair/dropdown-input-pair.test.js index 69420a56c..92a7024a0 100644 --- a/ui/app/pages/swaps/dropdown-input-pair/dropdown-input-pair.test.js +++ b/ui/pages/swaps/dropdown-input-pair/dropdown-input-pair.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../test/jest'; +import { renderWithProvider } from '../../../../test/jest'; import DropdownInputPair from '.'; const createProps = (customProps = {}) => { diff --git a/ui/app/pages/swaps/dropdown-input-pair/index.js b/ui/pages/swaps/dropdown-input-pair/index.js similarity index 100% rename from ui/app/pages/swaps/dropdown-input-pair/index.js rename to ui/pages/swaps/dropdown-input-pair/index.js diff --git a/ui/app/pages/swaps/dropdown-input-pair/index.scss b/ui/pages/swaps/dropdown-input-pair/index.scss similarity index 100% rename from ui/app/pages/swaps/dropdown-input-pair/index.scss rename to ui/pages/swaps/dropdown-input-pair/index.scss diff --git a/ui/app/pages/swaps/dropdown-search-list/__snapshots__/dropdown-search-list.test.js.snap b/ui/pages/swaps/dropdown-search-list/__snapshots__/dropdown-search-list.test.js.snap similarity index 100% rename from ui/app/pages/swaps/dropdown-search-list/__snapshots__/dropdown-search-list.test.js.snap rename to ui/pages/swaps/dropdown-search-list/__snapshots__/dropdown-search-list.test.js.snap diff --git a/ui/app/pages/swaps/dropdown-search-list/dropdown-search-list.js b/ui/pages/swaps/dropdown-search-list/dropdown-search-list.js similarity index 100% rename from ui/app/pages/swaps/dropdown-search-list/dropdown-search-list.js rename to ui/pages/swaps/dropdown-search-list/dropdown-search-list.js diff --git a/ui/app/pages/swaps/dropdown-search-list/dropdown-search-list.stories.js b/ui/pages/swaps/dropdown-search-list/dropdown-search-list.stories.js similarity index 100% rename from ui/app/pages/swaps/dropdown-search-list/dropdown-search-list.stories.js rename to ui/pages/swaps/dropdown-search-list/dropdown-search-list.stories.js diff --git a/ui/app/pages/swaps/dropdown-search-list/dropdown-search-list.test.js b/ui/pages/swaps/dropdown-search-list/dropdown-search-list.test.js similarity index 89% rename from ui/app/pages/swaps/dropdown-search-list/dropdown-search-list.test.js rename to ui/pages/swaps/dropdown-search-list/dropdown-search-list.test.js index 70f0e6a68..a14bc989f 100644 --- a/ui/app/pages/swaps/dropdown-search-list/dropdown-search-list.test.js +++ b/ui/pages/swaps/dropdown-search-list/dropdown-search-list.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../test/jest'; +import { renderWithProvider } from '../../../../test/jest'; import DropdownSearchList from '.'; const createProps = (customProps = {}) => { diff --git a/ui/app/pages/swaps/dropdown-search-list/index.js b/ui/pages/swaps/dropdown-search-list/index.js similarity index 100% rename from ui/app/pages/swaps/dropdown-search-list/index.js rename to ui/pages/swaps/dropdown-search-list/index.js diff --git a/ui/app/pages/swaps/dropdown-search-list/index.scss b/ui/pages/swaps/dropdown-search-list/index.scss similarity index 100% rename from ui/app/pages/swaps/dropdown-search-list/index.scss rename to ui/pages/swaps/dropdown-search-list/index.scss diff --git a/ui/app/pages/swaps/exchange-rate-display/__snapshots__/exchange-rate-display.test.js.snap b/ui/pages/swaps/exchange-rate-display/__snapshots__/exchange-rate-display.test.js.snap similarity index 100% rename from ui/app/pages/swaps/exchange-rate-display/__snapshots__/exchange-rate-display.test.js.snap rename to ui/pages/swaps/exchange-rate-display/__snapshots__/exchange-rate-display.test.js.snap diff --git a/ui/app/pages/swaps/exchange-rate-display/exchange-rate-display.js b/ui/pages/swaps/exchange-rate-display/exchange-rate-display.js similarity index 100% rename from ui/app/pages/swaps/exchange-rate-display/exchange-rate-display.js rename to ui/pages/swaps/exchange-rate-display/exchange-rate-display.js diff --git a/ui/app/pages/swaps/exchange-rate-display/exchange-rate-display.stories.js b/ui/pages/swaps/exchange-rate-display/exchange-rate-display.stories.js similarity index 100% rename from ui/app/pages/swaps/exchange-rate-display/exchange-rate-display.stories.js rename to ui/pages/swaps/exchange-rate-display/exchange-rate-display.stories.js diff --git a/ui/app/pages/swaps/exchange-rate-display/exchange-rate-display.test.js b/ui/pages/swaps/exchange-rate-display/exchange-rate-display.test.js similarity index 92% rename from ui/app/pages/swaps/exchange-rate-display/exchange-rate-display.test.js rename to ui/pages/swaps/exchange-rate-display/exchange-rate-display.test.js index b0aa8db60..9dc224206 100644 --- a/ui/app/pages/swaps/exchange-rate-display/exchange-rate-display.test.js +++ b/ui/pages/swaps/exchange-rate-display/exchange-rate-display.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../test/jest'; +import { renderWithProvider } from '../../../../test/jest'; import ExchangeRateDisplay from '.'; const createProps = (customProps = {}) => { diff --git a/ui/app/pages/swaps/exchange-rate-display/index.js b/ui/pages/swaps/exchange-rate-display/index.js similarity index 100% rename from ui/app/pages/swaps/exchange-rate-display/index.js rename to ui/pages/swaps/exchange-rate-display/index.js diff --git a/ui/app/pages/swaps/exchange-rate-display/index.scss b/ui/pages/swaps/exchange-rate-display/index.scss similarity index 100% rename from ui/app/pages/swaps/exchange-rate-display/index.scss rename to ui/pages/swaps/exchange-rate-display/index.scss diff --git a/ui/app/pages/swaps/fee-card/__snapshots__/fee-card.test.js.snap b/ui/pages/swaps/fee-card/__snapshots__/fee-card.test.js.snap similarity index 100% rename from ui/app/pages/swaps/fee-card/__snapshots__/fee-card.test.js.snap rename to ui/pages/swaps/fee-card/__snapshots__/fee-card.test.js.snap diff --git a/ui/app/pages/swaps/fee-card/fee-card.js b/ui/pages/swaps/fee-card/fee-card.js similarity index 99% rename from ui/app/pages/swaps/fee-card/fee-card.js rename to ui/pages/swaps/fee-card/fee-card.js index 23bb545f9..68ee4faec 100644 --- a/ui/app/pages/swaps/fee-card/fee-card.js +++ b/ui/pages/swaps/fee-card/fee-card.js @@ -6,7 +6,7 @@ import { MAINNET_CHAIN_ID, BSC_CHAIN_ID, LOCALHOST_CHAIN_ID, -} from '../../../../../shared/constants/network'; +} from '../../../../shared/constants/network'; export default function FeeCard({ primaryFee, diff --git a/ui/app/pages/swaps/fee-card/fee-card.stories.js b/ui/pages/swaps/fee-card/fee-card.stories.js similarity index 100% rename from ui/app/pages/swaps/fee-card/fee-card.stories.js rename to ui/pages/swaps/fee-card/fee-card.stories.js diff --git a/ui/app/pages/swaps/fee-card/fee-card.test.js b/ui/pages/swaps/fee-card/fee-card.test.js similarity index 92% rename from ui/app/pages/swaps/fee-card/fee-card.test.js rename to ui/pages/swaps/fee-card/fee-card.test.js index 15c8b0c33..7a81e4903 100644 --- a/ui/app/pages/swaps/fee-card/fee-card.test.js +++ b/ui/pages/swaps/fee-card/fee-card.test.js @@ -1,7 +1,7 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../test/jest'; -import { MAINNET_CHAIN_ID } from '../../../../../shared/constants/network'; +import { renderWithProvider } from '../../../../test/jest'; +import { MAINNET_CHAIN_ID } from '../../../../shared/constants/network'; import FeeCard from '.'; const createProps = (customProps = {}) => { diff --git a/ui/app/pages/swaps/fee-card/index.js b/ui/pages/swaps/fee-card/index.js similarity index 100% rename from ui/app/pages/swaps/fee-card/index.js rename to ui/pages/swaps/fee-card/index.js diff --git a/ui/app/pages/swaps/fee-card/index.scss b/ui/pages/swaps/fee-card/index.scss similarity index 100% rename from ui/app/pages/swaps/fee-card/index.scss rename to ui/pages/swaps/fee-card/index.scss diff --git a/ui/app/pages/swaps/fee-card/pig-icon.js b/ui/pages/swaps/fee-card/pig-icon.js similarity index 100% rename from ui/app/pages/swaps/fee-card/pig-icon.js rename to ui/pages/swaps/fee-card/pig-icon.js diff --git a/ui/app/pages/swaps/fee-card/pig-icon.test.js b/ui/pages/swaps/fee-card/pig-icon.test.js similarity index 80% rename from ui/app/pages/swaps/fee-card/pig-icon.test.js rename to ui/pages/swaps/fee-card/pig-icon.test.js index 7764681b8..6321b7dc6 100644 --- a/ui/app/pages/swaps/fee-card/pig-icon.test.js +++ b/ui/pages/swaps/fee-card/pig-icon.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../test/jest'; +import { renderWithProvider } from '../../../../test/jest'; import PigIcon from './pig-icon'; describe('PigIcon', () => { diff --git a/ui/app/pages/swaps/index.js b/ui/pages/swaps/index.js similarity index 99% rename from ui/app/pages/swaps/index.js rename to ui/pages/swaps/index.js index 7af7b83b1..bf5dfb17f 100644 --- a/ui/app/pages/swaps/index.js +++ b/ui/pages/swaps/index.js @@ -46,7 +46,7 @@ import { QUOTES_NOT_AVAILABLE_ERROR, SWAP_FAILED_ERROR, OFFLINE_FOR_MAINTENANCE, -} from '../../../../shared/constants/swaps'; +} from '../../../shared/constants/swaps'; import { resetBackgroundSwapsState, @@ -59,7 +59,7 @@ import { currentNetworkTxListSelector } from '../../selectors'; import { useNewMetricEvent } from '../../hooks/useMetricEvent'; import FeatureToggledRoute from '../../helpers/higher-order-components/feature-toggled-route'; -import { TRANSACTION_STATUSES } from '../../../../shared/constants/transaction'; +import { TRANSACTION_STATUSES } from '../../../shared/constants/transaction'; import { fetchTokens, fetchTopAssets, diff --git a/ui/app/pages/swaps/index.scss b/ui/pages/swaps/index.scss similarity index 100% rename from ui/app/pages/swaps/index.scss rename to ui/pages/swaps/index.scss diff --git a/ui/app/pages/swaps/index.test.js b/ui/pages/swaps/index.test.js similarity index 98% rename from ui/app/pages/swaps/index.test.js rename to ui/pages/swaps/index.test.js index fc47e01bf..a3162ae2a 100644 --- a/ui/app/pages/swaps/index.test.js +++ b/ui/pages/swaps/index.test.js @@ -10,7 +10,7 @@ import { setBackgroundConnection, MOCKS, CONSTANTS, -} from '../../../../test/jest'; +} from '../../../test/jest'; import Swap from '.'; const middleware = [thunk]; diff --git a/ui/pages/swaps/intro-popup/__snapshots__/intro-popup.test.js.snap b/ui/pages/swaps/intro-popup/__snapshots__/intro-popup.test.js.snap new file mode 100644 index 000000000..d9d0324df --- /dev/null +++ b/ui/pages/swaps/intro-popup/__snapshots__/intro-popup.test.js.snap @@ -0,0 +1,9 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`IntroPopup renders the component with initial props 1`] = ` +
+
+
+`; diff --git a/ui/pages/swaps/intro-popup/index.js b/ui/pages/swaps/intro-popup/index.js new file mode 100644 index 000000000..6460538b9 --- /dev/null +++ b/ui/pages/swaps/intro-popup/index.js @@ -0,0 +1 @@ +export { default } from './intro-popup'; diff --git a/ui/pages/swaps/intro-popup/index.scss b/ui/pages/swaps/intro-popup/index.scss new file mode 100644 index 000000000..48d79c5f9 --- /dev/null +++ b/ui/pages/swaps/intro-popup/index.scss @@ -0,0 +1,71 @@ +.intro-popup { + &__liquidity-sources-label { + @include H7; + + font-weight: bold; + margin-bottom: 6px; + color: $Black-100; + + @media screen and (min-width: 576px) { + @include H6; + } + } + + &__learn-more-header { + @include H4; + + font-weight: bold; + margin-bottom: 12px; + margin-top: 16px; + } + + &__learn-more-link { + @include H6; + + color: $Blue-500; + margin-bottom: 8px; + cursor: pointer; + } + + &__content { + margin-left: 24px; + + > img { + width: 96%; + margin-left: -9px; + } + } + + &__footer { + border-top: none; + } + + &__button { + border-radius: 100px; + height: 44px; + } + + &__source-logo-container { + width: 276px; + display: flex; + justify-content: center; + align-items: center; + padding: 20px 16px; + background: $Grey-000; + border-radius: 8px; + + @media screen and (min-width: 576px) { + width: 412px; + + img { + width: 364px; + } + } + } + + &__popover { + @media screen and (min-width: 576px) { + width: 460px; + } + } +} diff --git a/ui/pages/swaps/intro-popup/intro-popup.js b/ui/pages/swaps/intro-popup/intro-popup.js new file mode 100644 index 000000000..658c84bb9 --- /dev/null +++ b/ui/pages/swaps/intro-popup/intro-popup.js @@ -0,0 +1,108 @@ +import React, { useContext } from 'react'; +import { useDispatch, useSelector } from 'react-redux'; +import { useHistory } from 'react-router-dom'; +import PropTypes from 'prop-types'; +import { setSwapsFromToken } from '../../../ducks/swaps/swaps'; +import { I18nContext } from '../../../contexts/i18n'; +import { BUILD_QUOTE_ROUTE } from '../../../helpers/constants/routes'; +import { useNewMetricEvent } from '../../../hooks/useMetricEvent'; +import { getSwapsDefaultToken } from '../../../selectors'; +import Button from '../../../components/ui/button'; +import Popover from '../../../components/ui/popover'; + +export default function IntroPopup({ onClose }) { + const dispatch = useDispatch(useDispatch); + const history = useHistory(); + const t = useContext(I18nContext); + + const swapsDefaultToken = useSelector(getSwapsDefaultToken); + const enteredSwapsEvent = useNewMetricEvent({ + event: 'Swaps Opened', + properties: { + source: 'Intro popup', + active_currency: swapsDefaultToken.symbol, + }, + category: 'swaps', + }); + const blogPostVisitedEvent = useNewMetricEvent({ + event: 'Blog Post Visited ', + category: 'swaps', + }); + const contractAuditVisitedEvent = useNewMetricEvent({ + event: 'Contract Audit Visited', + category: 'swaps', + }); + const productOverviewDismissedEvent = useNewMetricEvent({ + event: 'Product Overview Dismissed', + category: 'swaps', + }); + + return ( +
+ { + productOverviewDismissedEvent(); + onClose(); + }} + footerClassName="intro-popup__footer" + footer={ + + } + > +
+
+ {t('swapIntroLiquiditySourcesLabel')} +
+
+ +
+
+ {t('swapIntroLearnMoreHeader')} +
+
{ + global.platform.openTab({ + url: + 'https://medium.com/metamask/introducing-metamask-swaps-84318c643785', + }); + blogPostVisitedEvent(); + }} + > + {t('swapIntroLearnMoreLink')} +
+
{ + global.platform.openTab({ + url: + 'https://diligence.consensys.net/audits/private/lsjipyllnw2/', + }); + contractAuditVisitedEvent(); + }} + > + {t('swapLearnMoreContractsAuditReview')} +
+
+
+
+ ); +} + +IntroPopup.propTypes = { + onClose: PropTypes.func.isRequired, +}; diff --git a/ui/pages/swaps/intro-popup/intro-popup.test.js b/ui/pages/swaps/intro-popup/intro-popup.test.js new file mode 100644 index 000000000..049c73091 --- /dev/null +++ b/ui/pages/swaps/intro-popup/intro-popup.test.js @@ -0,0 +1,24 @@ +import React from 'react'; +import configureMockStore from 'redux-mock-store'; + +import { + renderWithProvider, + createSwapsMockStore, +} from '../../../../test/jest'; +import IntroPopup from '.'; + +const createProps = (customProps = {}) => { + return { + onClose: jest.fn(), + ...customProps, + }; +}; + +describe('IntroPopup', () => { + it('renders the component with initial props', () => { + const store = configureMockStore()(createSwapsMockStore()); + const props = createProps(); + const { container } = renderWithProvider(, store); + expect(container).toMatchSnapshot(); + }); +}); diff --git a/ui/app/pages/swaps/loading-swaps-quotes/__snapshots__/aggregator-logo.test.js.snap b/ui/pages/swaps/loading-swaps-quotes/__snapshots__/aggregator-logo.test.js.snap similarity index 100% rename from ui/app/pages/swaps/loading-swaps-quotes/__snapshots__/aggregator-logo.test.js.snap rename to ui/pages/swaps/loading-swaps-quotes/__snapshots__/aggregator-logo.test.js.snap diff --git a/ui/app/pages/swaps/loading-swaps-quotes/__snapshots__/loading-swaps-quotes-stories-metadata.test.js.snap b/ui/pages/swaps/loading-swaps-quotes/__snapshots__/loading-swaps-quotes-stories-metadata.test.js.snap similarity index 100% rename from ui/app/pages/swaps/loading-swaps-quotes/__snapshots__/loading-swaps-quotes-stories-metadata.test.js.snap rename to ui/pages/swaps/loading-swaps-quotes/__snapshots__/loading-swaps-quotes-stories-metadata.test.js.snap diff --git a/ui/app/pages/swaps/loading-swaps-quotes/aggregator-logo.js b/ui/pages/swaps/loading-swaps-quotes/aggregator-logo.js similarity index 100% rename from ui/app/pages/swaps/loading-swaps-quotes/aggregator-logo.js rename to ui/pages/swaps/loading-swaps-quotes/aggregator-logo.js diff --git a/ui/app/pages/swaps/loading-swaps-quotes/aggregator-logo.test.js b/ui/pages/swaps/loading-swaps-quotes/aggregator-logo.test.js similarity index 98% rename from ui/app/pages/swaps/loading-swaps-quotes/aggregator-logo.test.js rename to ui/pages/swaps/loading-swaps-quotes/aggregator-logo.test.js index fb81e33e6..3367316b6 100644 --- a/ui/app/pages/swaps/loading-swaps-quotes/aggregator-logo.test.js +++ b/ui/pages/swaps/loading-swaps-quotes/aggregator-logo.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../test/jest'; +import { renderWithProvider } from '../../../../test/jest'; import AggregatorLogo from './aggregator-logo'; const createProps = (customProps = {}) => { diff --git a/ui/app/pages/swaps/loading-swaps-quotes/background-animation.js b/ui/pages/swaps/loading-swaps-quotes/background-animation.js similarity index 100% rename from ui/app/pages/swaps/loading-swaps-quotes/background-animation.js rename to ui/pages/swaps/loading-swaps-quotes/background-animation.js diff --git a/ui/app/pages/swaps/loading-swaps-quotes/background-animation.test.js b/ui/pages/swaps/loading-swaps-quotes/background-animation.test.js similarity index 85% rename from ui/app/pages/swaps/loading-swaps-quotes/background-animation.test.js rename to ui/pages/swaps/loading-swaps-quotes/background-animation.test.js index 64e31843e..f4601ddc6 100644 --- a/ui/app/pages/swaps/loading-swaps-quotes/background-animation.test.js +++ b/ui/pages/swaps/loading-swaps-quotes/background-animation.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../test/jest'; +import { renderWithProvider } from '../../../../test/jest'; import BackgroundAnimation from './background-animation'; describe('BackgroundAnimation', () => { diff --git a/ui/app/pages/swaps/loading-swaps-quotes/index.js b/ui/pages/swaps/loading-swaps-quotes/index.js similarity index 100% rename from ui/app/pages/swaps/loading-swaps-quotes/index.js rename to ui/pages/swaps/loading-swaps-quotes/index.js diff --git a/ui/app/pages/swaps/loading-swaps-quotes/index.scss b/ui/pages/swaps/loading-swaps-quotes/index.scss similarity index 100% rename from ui/app/pages/swaps/loading-swaps-quotes/index.scss rename to ui/pages/swaps/loading-swaps-quotes/index.scss diff --git a/ui/app/pages/swaps/loading-swaps-quotes/loading-swaps-quotes-stories-metadata.js b/ui/pages/swaps/loading-swaps-quotes/loading-swaps-quotes-stories-metadata.js similarity index 100% rename from ui/app/pages/swaps/loading-swaps-quotes/loading-swaps-quotes-stories-metadata.js rename to ui/pages/swaps/loading-swaps-quotes/loading-swaps-quotes-stories-metadata.js diff --git a/ui/app/pages/swaps/loading-swaps-quotes/loading-swaps-quotes-stories-metadata.test.js b/ui/pages/swaps/loading-swaps-quotes/loading-swaps-quotes-stories-metadata.test.js similarity index 100% rename from ui/app/pages/swaps/loading-swaps-quotes/loading-swaps-quotes-stories-metadata.test.js rename to ui/pages/swaps/loading-swaps-quotes/loading-swaps-quotes-stories-metadata.test.js diff --git a/ui/app/pages/swaps/loading-swaps-quotes/loading-swaps-quotes.js b/ui/pages/swaps/loading-swaps-quotes/loading-swaps-quotes.js similarity index 100% rename from ui/app/pages/swaps/loading-swaps-quotes/loading-swaps-quotes.js rename to ui/pages/swaps/loading-swaps-quotes/loading-swaps-quotes.js diff --git a/ui/app/pages/swaps/main-quote-summary/__snapshots__/main-quote-summary.test.js.snap b/ui/pages/swaps/main-quote-summary/__snapshots__/main-quote-summary.test.js.snap similarity index 100% rename from ui/app/pages/swaps/main-quote-summary/__snapshots__/main-quote-summary.test.js.snap rename to ui/pages/swaps/main-quote-summary/__snapshots__/main-quote-summary.test.js.snap diff --git a/ui/app/pages/swaps/main-quote-summary/__snapshots__/quote-backdrop.test.js.snap b/ui/pages/swaps/main-quote-summary/__snapshots__/quote-backdrop.test.js.snap similarity index 100% rename from ui/app/pages/swaps/main-quote-summary/__snapshots__/quote-backdrop.test.js.snap rename to ui/pages/swaps/main-quote-summary/__snapshots__/quote-backdrop.test.js.snap diff --git a/ui/app/pages/swaps/main-quote-summary/index.js b/ui/pages/swaps/main-quote-summary/index.js similarity index 100% rename from ui/app/pages/swaps/main-quote-summary/index.js rename to ui/pages/swaps/main-quote-summary/index.js diff --git a/ui/app/pages/swaps/main-quote-summary/index.scss b/ui/pages/swaps/main-quote-summary/index.scss similarity index 100% rename from ui/app/pages/swaps/main-quote-summary/index.scss rename to ui/pages/swaps/main-quote-summary/index.scss diff --git a/ui/app/pages/swaps/main-quote-summary/main-quote-summary.js b/ui/pages/swaps/main-quote-summary/main-quote-summary.js similarity index 100% rename from ui/app/pages/swaps/main-quote-summary/main-quote-summary.js rename to ui/pages/swaps/main-quote-summary/main-quote-summary.js diff --git a/ui/app/pages/swaps/main-quote-summary/main-quote-summary.stories.js b/ui/pages/swaps/main-quote-summary/main-quote-summary.stories.js similarity index 100% rename from ui/app/pages/swaps/main-quote-summary/main-quote-summary.stories.js rename to ui/pages/swaps/main-quote-summary/main-quote-summary.stories.js diff --git a/ui/app/pages/swaps/main-quote-summary/main-quote-summary.test.js b/ui/pages/swaps/main-quote-summary/main-quote-summary.test.js similarity index 94% rename from ui/app/pages/swaps/main-quote-summary/main-quote-summary.test.js rename to ui/pages/swaps/main-quote-summary/main-quote-summary.test.js index cc1775363..85e17bd48 100644 --- a/ui/app/pages/swaps/main-quote-summary/main-quote-summary.test.js +++ b/ui/pages/swaps/main-quote-summary/main-quote-summary.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../test/jest'; +import { renderWithProvider } from '../../../../test/jest'; import MainQuoteSummary from '.'; const createProps = (customProps = {}) => { diff --git a/ui/app/pages/swaps/main-quote-summary/quote-backdrop.js b/ui/pages/swaps/main-quote-summary/quote-backdrop.js similarity index 100% rename from ui/app/pages/swaps/main-quote-summary/quote-backdrop.js rename to ui/pages/swaps/main-quote-summary/quote-backdrop.js diff --git a/ui/app/pages/swaps/main-quote-summary/quote-backdrop.test.js b/ui/pages/swaps/main-quote-summary/quote-backdrop.test.js similarity index 90% rename from ui/app/pages/swaps/main-quote-summary/quote-backdrop.test.js rename to ui/pages/swaps/main-quote-summary/quote-backdrop.test.js index caab811ca..00d23c265 100644 --- a/ui/app/pages/swaps/main-quote-summary/quote-backdrop.test.js +++ b/ui/pages/swaps/main-quote-summary/quote-backdrop.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../test/jest'; +import { renderWithProvider } from '../../../../test/jest'; import QuotesBackdrop from './quote-backdrop'; const createProps = (customProps = {}) => { diff --git a/ui/app/pages/swaps/searchable-item-list/__snapshots__/searchable-item-list.test.js.snap b/ui/pages/swaps/searchable-item-list/__snapshots__/searchable-item-list.test.js.snap similarity index 100% rename from ui/app/pages/swaps/searchable-item-list/__snapshots__/searchable-item-list.test.js.snap rename to ui/pages/swaps/searchable-item-list/__snapshots__/searchable-item-list.test.js.snap diff --git a/ui/app/pages/swaps/searchable-item-list/index.js b/ui/pages/swaps/searchable-item-list/index.js similarity index 100% rename from ui/app/pages/swaps/searchable-item-list/index.js rename to ui/pages/swaps/searchable-item-list/index.js diff --git a/ui/app/pages/swaps/searchable-item-list/index.scss b/ui/pages/swaps/searchable-item-list/index.scss similarity index 100% rename from ui/app/pages/swaps/searchable-item-list/index.scss rename to ui/pages/swaps/searchable-item-list/index.scss diff --git a/ui/app/pages/swaps/searchable-item-list/item-list/index.js b/ui/pages/swaps/searchable-item-list/item-list/index.js similarity index 100% rename from ui/app/pages/swaps/searchable-item-list/item-list/index.js rename to ui/pages/swaps/searchable-item-list/item-list/index.js diff --git a/ui/app/pages/swaps/searchable-item-list/item-list/item-list.component.js b/ui/pages/swaps/searchable-item-list/item-list/item-list.component.js similarity index 100% rename from ui/app/pages/swaps/searchable-item-list/item-list/item-list.component.js rename to ui/pages/swaps/searchable-item-list/item-list/item-list.component.js diff --git a/ui/app/pages/swaps/searchable-item-list/list-item-search/index.js b/ui/pages/swaps/searchable-item-list/list-item-search/index.js similarity index 100% rename from ui/app/pages/swaps/searchable-item-list/list-item-search/index.js rename to ui/pages/swaps/searchable-item-list/list-item-search/index.js diff --git a/ui/app/pages/swaps/searchable-item-list/list-item-search/list-item-search.component.js b/ui/pages/swaps/searchable-item-list/list-item-search/list-item-search.component.js similarity index 100% rename from ui/app/pages/swaps/searchable-item-list/list-item-search/list-item-search.component.js rename to ui/pages/swaps/searchable-item-list/list-item-search/list-item-search.component.js diff --git a/ui/app/pages/swaps/searchable-item-list/searchable-item-list.js b/ui/pages/swaps/searchable-item-list/searchable-item-list.js similarity index 100% rename from ui/app/pages/swaps/searchable-item-list/searchable-item-list.js rename to ui/pages/swaps/searchable-item-list/searchable-item-list.js diff --git a/ui/app/pages/swaps/searchable-item-list/searchable-item-list.test.js b/ui/pages/swaps/searchable-item-list/searchable-item-list.test.js similarity index 96% rename from ui/app/pages/swaps/searchable-item-list/searchable-item-list.test.js rename to ui/pages/swaps/searchable-item-list/searchable-item-list.test.js index ef9a3a016..c62272e54 100644 --- a/ui/app/pages/swaps/searchable-item-list/searchable-item-list.test.js +++ b/ui/pages/swaps/searchable-item-list/searchable-item-list.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../test/jest'; +import { renderWithProvider } from '../../../../test/jest'; import SearchableItemList from '.'; const createProps = (customProps = {}) => { diff --git a/ui/app/pages/swaps/select-quote-popover/__snapshots__/select-quote-popover.test.js.snap b/ui/pages/swaps/select-quote-popover/__snapshots__/select-quote-popover.test.js.snap similarity index 100% rename from ui/app/pages/swaps/select-quote-popover/__snapshots__/select-quote-popover.test.js.snap rename to ui/pages/swaps/select-quote-popover/__snapshots__/select-quote-popover.test.js.snap diff --git a/ui/app/pages/swaps/select-quote-popover/index.js b/ui/pages/swaps/select-quote-popover/index.js similarity index 100% rename from ui/app/pages/swaps/select-quote-popover/index.js rename to ui/pages/swaps/select-quote-popover/index.js diff --git a/ui/app/pages/swaps/select-quote-popover/index.scss b/ui/pages/swaps/select-quote-popover/index.scss similarity index 100% rename from ui/app/pages/swaps/select-quote-popover/index.scss rename to ui/pages/swaps/select-quote-popover/index.scss diff --git a/ui/app/pages/swaps/select-quote-popover/mock-quote-data.js b/ui/pages/swaps/select-quote-popover/mock-quote-data.js similarity index 100% rename from ui/app/pages/swaps/select-quote-popover/mock-quote-data.js rename to ui/pages/swaps/select-quote-popover/mock-quote-data.js diff --git a/ui/app/pages/swaps/select-quote-popover/mock-quote-data.test.js b/ui/pages/swaps/select-quote-popover/mock-quote-data.test.js similarity index 100% rename from ui/app/pages/swaps/select-quote-popover/mock-quote-data.test.js rename to ui/pages/swaps/select-quote-popover/mock-quote-data.test.js diff --git a/ui/app/pages/swaps/select-quote-popover/quote-details/index.js b/ui/pages/swaps/select-quote-popover/quote-details/index.js similarity index 100% rename from ui/app/pages/swaps/select-quote-popover/quote-details/index.js rename to ui/pages/swaps/select-quote-popover/quote-details/index.js diff --git a/ui/app/pages/swaps/select-quote-popover/quote-details/index.scss b/ui/pages/swaps/select-quote-popover/quote-details/index.scss similarity index 100% rename from ui/app/pages/swaps/select-quote-popover/quote-details/index.scss rename to ui/pages/swaps/select-quote-popover/quote-details/index.scss diff --git a/ui/app/pages/swaps/select-quote-popover/quote-details/quote-details.js b/ui/pages/swaps/select-quote-popover/quote-details/quote-details.js similarity index 100% rename from ui/app/pages/swaps/select-quote-popover/quote-details/quote-details.js rename to ui/pages/swaps/select-quote-popover/quote-details/quote-details.js diff --git a/ui/app/pages/swaps/select-quote-popover/select-quote-popover-constants.js b/ui/pages/swaps/select-quote-popover/select-quote-popover-constants.js similarity index 100% rename from ui/app/pages/swaps/select-quote-popover/select-quote-popover-constants.js rename to ui/pages/swaps/select-quote-popover/select-quote-popover-constants.js diff --git a/ui/app/pages/swaps/select-quote-popover/select-quote-popover.js b/ui/pages/swaps/select-quote-popover/select-quote-popover.js similarity index 100% rename from ui/app/pages/swaps/select-quote-popover/select-quote-popover.js rename to ui/pages/swaps/select-quote-popover/select-quote-popover.js diff --git a/ui/app/pages/swaps/select-quote-popover/select-quote-popover.stories.js b/ui/pages/swaps/select-quote-popover/select-quote-popover.stories.js similarity index 100% rename from ui/app/pages/swaps/select-quote-popover/select-quote-popover.stories.js rename to ui/pages/swaps/select-quote-popover/select-quote-popover.stories.js diff --git a/ui/app/pages/swaps/select-quote-popover/select-quote-popover.test.js b/ui/pages/swaps/select-quote-popover/select-quote-popover.test.js similarity index 89% rename from ui/app/pages/swaps/select-quote-popover/select-quote-popover.test.js rename to ui/pages/swaps/select-quote-popover/select-quote-popover.test.js index b23a35f68..1eaa99738 100644 --- a/ui/app/pages/swaps/select-quote-popover/select-quote-popover.test.js +++ b/ui/pages/swaps/select-quote-popover/select-quote-popover.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../test/jest'; +import { renderWithProvider } from '../../../../test/jest'; import SelectQuotePopover from '.'; const createProps = (customProps = {}) => { diff --git a/ui/app/pages/swaps/select-quote-popover/sort-list/__snapshots__/sort-list.test.js.snap b/ui/pages/swaps/select-quote-popover/sort-list/__snapshots__/sort-list.test.js.snap similarity index 100% rename from ui/app/pages/swaps/select-quote-popover/sort-list/__snapshots__/sort-list.test.js.snap rename to ui/pages/swaps/select-quote-popover/sort-list/__snapshots__/sort-list.test.js.snap diff --git a/ui/app/pages/swaps/select-quote-popover/sort-list/index.js b/ui/pages/swaps/select-quote-popover/sort-list/index.js similarity index 100% rename from ui/app/pages/swaps/select-quote-popover/sort-list/index.js rename to ui/pages/swaps/select-quote-popover/sort-list/index.js diff --git a/ui/app/pages/swaps/select-quote-popover/sort-list/sort-list.js b/ui/pages/swaps/select-quote-popover/sort-list/sort-list.js similarity index 100% rename from ui/app/pages/swaps/select-quote-popover/sort-list/sort-list.js rename to ui/pages/swaps/select-quote-popover/sort-list/sort-list.js diff --git a/ui/app/pages/swaps/select-quote-popover/sort-list/sort-list.test.js b/ui/pages/swaps/select-quote-popover/sort-list/sort-list.test.js similarity index 97% rename from ui/app/pages/swaps/select-quote-popover/sort-list/sort-list.test.js rename to ui/pages/swaps/select-quote-popover/sort-list/sort-list.test.js index 57896b8e0..99e5a19e5 100644 --- a/ui/app/pages/swaps/select-quote-popover/sort-list/sort-list.test.js +++ b/ui/pages/swaps/select-quote-popover/sort-list/sort-list.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../../test/jest'; +import { renderWithProvider } from '../../../../../test/jest'; import SortList from './sort-list'; const createProps = (customProps = {}) => { diff --git a/ui/app/pages/swaps/slippage-buttons/__snapshots__/slippage-buttons.test.js.snap b/ui/pages/swaps/slippage-buttons/__snapshots__/slippage-buttons.test.js.snap similarity index 100% rename from ui/app/pages/swaps/slippage-buttons/__snapshots__/slippage-buttons.test.js.snap rename to ui/pages/swaps/slippage-buttons/__snapshots__/slippage-buttons.test.js.snap diff --git a/ui/app/pages/swaps/slippage-buttons/index.js b/ui/pages/swaps/slippage-buttons/index.js similarity index 100% rename from ui/app/pages/swaps/slippage-buttons/index.js rename to ui/pages/swaps/slippage-buttons/index.js diff --git a/ui/app/pages/swaps/slippage-buttons/index.scss b/ui/pages/swaps/slippage-buttons/index.scss similarity index 100% rename from ui/app/pages/swaps/slippage-buttons/index.scss rename to ui/pages/swaps/slippage-buttons/index.scss diff --git a/ui/app/pages/swaps/slippage-buttons/slippage-buttons.js b/ui/pages/swaps/slippage-buttons/slippage-buttons.js similarity index 100% rename from ui/app/pages/swaps/slippage-buttons/slippage-buttons.js rename to ui/pages/swaps/slippage-buttons/slippage-buttons.js diff --git a/ui/app/pages/swaps/slippage-buttons/slippage-buttons.stories.js b/ui/pages/swaps/slippage-buttons/slippage-buttons.stories.js similarity index 100% rename from ui/app/pages/swaps/slippage-buttons/slippage-buttons.stories.js rename to ui/pages/swaps/slippage-buttons/slippage-buttons.stories.js diff --git a/ui/app/pages/swaps/slippage-buttons/slippage-buttons.test.js b/ui/pages/swaps/slippage-buttons/slippage-buttons.test.js similarity index 93% rename from ui/app/pages/swaps/slippage-buttons/slippage-buttons.test.js rename to ui/pages/swaps/slippage-buttons/slippage-buttons.test.js index 0108f07d2..60ceeff4c 100644 --- a/ui/app/pages/swaps/slippage-buttons/slippage-buttons.test.js +++ b/ui/pages/swaps/slippage-buttons/slippage-buttons.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../test/jest'; +import { renderWithProvider } from '../../../../test/jest'; import SlippageButtons from '.'; const createProps = (customProps = {}) => { diff --git a/ui/app/pages/swaps/swaps-footer/__snapshots__/swaps-footer.test.js.snap b/ui/pages/swaps/swaps-footer/__snapshots__/swaps-footer.test.js.snap similarity index 100% rename from ui/app/pages/swaps/swaps-footer/__snapshots__/swaps-footer.test.js.snap rename to ui/pages/swaps/swaps-footer/__snapshots__/swaps-footer.test.js.snap diff --git a/ui/app/pages/swaps/swaps-footer/index.js b/ui/pages/swaps/swaps-footer/index.js similarity index 100% rename from ui/app/pages/swaps/swaps-footer/index.js rename to ui/pages/swaps/swaps-footer/index.js diff --git a/ui/app/pages/swaps/swaps-footer/index.scss b/ui/pages/swaps/swaps-footer/index.scss similarity index 100% rename from ui/app/pages/swaps/swaps-footer/index.scss rename to ui/pages/swaps/swaps-footer/index.scss diff --git a/ui/app/pages/swaps/swaps-footer/swaps-footer.js b/ui/pages/swaps/swaps-footer/swaps-footer.js similarity index 100% rename from ui/app/pages/swaps/swaps-footer/swaps-footer.js rename to ui/pages/swaps/swaps-footer/swaps-footer.js diff --git a/ui/app/pages/swaps/swaps-footer/swaps-footer.test.js b/ui/pages/swaps/swaps-footer/swaps-footer.test.js similarity index 91% rename from ui/app/pages/swaps/swaps-footer/swaps-footer.test.js rename to ui/pages/swaps/swaps-footer/swaps-footer.test.js index 4cff41083..17a2b3355 100644 --- a/ui/app/pages/swaps/swaps-footer/swaps-footer.test.js +++ b/ui/pages/swaps/swaps-footer/swaps-footer.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../test/jest'; +import { renderWithProvider } from '../../../../test/jest'; import SwapsFooter from '.'; const createProps = (customProps = {}) => { diff --git a/ui/app/pages/swaps/swaps-gas-customization-modal/index.js b/ui/pages/swaps/swaps-gas-customization-modal/index.js similarity index 100% rename from ui/app/pages/swaps/swaps-gas-customization-modal/index.js rename to ui/pages/swaps/swaps-gas-customization-modal/index.js diff --git a/ui/app/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.component.js b/ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.component.js similarity index 100% rename from ui/app/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.component.js rename to ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.component.js diff --git a/ui/app/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.container.js b/ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.container.js similarity index 100% rename from ui/app/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.container.js rename to ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.container.js diff --git a/ui/app/pages/swaps/swaps-util-test-constants.js b/ui/pages/swaps/swaps-util-test-constants.js similarity index 99% rename from ui/app/pages/swaps/swaps-util-test-constants.js rename to ui/pages/swaps/swaps-util-test-constants.js index cf54889b1..54c0b1e34 100644 --- a/ui/app/pages/swaps/swaps-util-test-constants.js +++ b/ui/pages/swaps/swaps-util-test-constants.js @@ -1,4 +1,4 @@ -import { ETH_SWAPS_TOKEN_OBJECT } from '../../../../shared/constants/swaps'; +import { ETH_SWAPS_TOKEN_OBJECT } from '../../../shared/constants/swaps'; export const TRADES_BASE_PROD_URL = 'https://api.metaswap.codefi.network/trades?'; diff --git a/ui/app/pages/swaps/swaps.util.js b/ui/pages/swaps/swaps.util.js similarity index 98% rename from ui/app/pages/swaps/swaps.util.js rename to ui/pages/swaps/swaps.util.js index 968802bb3..e72483f35 100644 --- a/ui/app/pages/swaps/swaps.util.js +++ b/ui/pages/swaps/swaps.util.js @@ -6,16 +6,16 @@ import { METASWAP_CHAINID_API_HOST_MAP, SWAPS_CHAINID_CONTRACT_ADDRESS_MAP, ETH_WETH_CONTRACT_ADDRESS, -} from '../../../../shared/constants/swaps'; +} from '../../../shared/constants/swaps'; import { isSwapsDefaultTokenAddress, isSwapsDefaultTokenSymbol, -} from '../../../../shared/modules/swaps.utils'; +} from '../../../shared/modules/swaps.utils'; import { ETH_SYMBOL, WETH_SYMBOL, MAINNET_CHAIN_ID, -} from '../../../../shared/constants/network'; +} from '../../../shared/constants/network'; import { calcTokenValue, calcTokenAmount, @@ -34,7 +34,7 @@ import { formatCurrency } from '../../helpers/utils/confirm-tx.util'; import fetchWithCache from '../../helpers/utils/fetch-with-cache'; import { calcGasTotal } from '../send/send.utils'; -import { isValidHexAddress } from '../../../../shared/modules/hexstring-utils'; +import { isValidHexAddress } from '../../../shared/modules/hexstring-utils'; const TOKEN_TRANSFER_LOG_TOPIC_HASH = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'; diff --git a/ui/app/pages/swaps/swaps.util.test.js b/ui/pages/swaps/swaps.util.test.js similarity index 98% rename from ui/app/pages/swaps/swaps.util.test.js rename to ui/pages/swaps/swaps.util.test.js index cc7f6d9fc..936864f0f 100644 --- a/ui/app/pages/swaps/swaps.util.test.js +++ b/ui/pages/swaps/swaps.util.test.js @@ -5,11 +5,11 @@ import { MAINNET_CHAIN_ID, BSC_CHAIN_ID, LOCALHOST_CHAIN_ID, -} from '../../../../shared/constants/network'; +} from '../../../shared/constants/network'; import { SWAPS_CHAINID_CONTRACT_ADDRESS_MAP, ETH_WETH_CONTRACT_ADDRESS, -} from '../../../../shared/constants/swaps'; +} from '../../../shared/constants/swaps'; import { TOKENS, EXPECTED_TOKENS_RESULT, @@ -26,7 +26,7 @@ import { isContractAddressValid, } from './swaps.util'; -jest.mock('../../../lib/storage-helpers.js', () => ({ +jest.mock('../../helpers/utils/storage-helpers.js', () => ({ getStorageItem: jest.fn(), setStorageItem: jest.fn(), })); diff --git a/ui/app/pages/swaps/view-quote/index.js b/ui/pages/swaps/view-quote/index.js similarity index 100% rename from ui/app/pages/swaps/view-quote/index.js rename to ui/pages/swaps/view-quote/index.js diff --git a/ui/app/pages/swaps/view-quote/index.scss b/ui/pages/swaps/view-quote/index.scss similarity index 100% rename from ui/app/pages/swaps/view-quote/index.scss rename to ui/pages/swaps/view-quote/index.scss diff --git a/ui/app/pages/swaps/view-quote/view-quote-price-difference.js b/ui/pages/swaps/view-quote/view-quote-price-difference.js similarity index 100% rename from ui/app/pages/swaps/view-quote/view-quote-price-difference.js rename to ui/pages/swaps/view-quote/view-quote-price-difference.js diff --git a/ui/app/pages/swaps/view-quote/view-quote-price-difference.test.js b/ui/pages/swaps/view-quote/view-quote-price-difference.test.js similarity index 98% rename from ui/app/pages/swaps/view-quote/view-quote-price-difference.test.js rename to ui/pages/swaps/view-quote/view-quote-price-difference.test.js index c00322959..f18950464 100644 --- a/ui/app/pages/swaps/view-quote/view-quote-price-difference.test.js +++ b/ui/pages/swaps/view-quote/view-quote-price-difference.test.js @@ -2,7 +2,7 @@ import React from 'react'; import { shallow } from 'enzyme'; import { Provider } from 'react-redux'; import configureMockStore from 'redux-mock-store'; -import { NETWORK_TYPE_RPC } from '../../../../../shared/constants/network'; +import { NETWORK_TYPE_RPC } from '../../../../shared/constants/network'; import ViewQuotePriceDifference from './view-quote-price-difference'; describe('View Price Quote Difference', () => { diff --git a/ui/app/pages/swaps/view-quote/view-quote.js b/ui/pages/swaps/view-quote/view-quote.js similarity index 99% rename from ui/app/pages/swaps/view-quote/view-quote.js rename to ui/pages/swaps/view-quote/view-quote.js index e20e806a0..ee88f7513 100644 --- a/ui/app/pages/swaps/view-quote/view-quote.js +++ b/ui/pages/swaps/view-quote/view-quote.js @@ -75,7 +75,7 @@ import { getRenderableNetworkFeesForQuote, } from '../swaps.util'; import { useTokenTracker } from '../../../hooks/useTokenTracker'; -import { QUOTES_EXPIRED_ERROR } from '../../../../../shared/constants/swaps'; +import { QUOTES_EXPIRED_ERROR } from '../../../../shared/constants/swaps'; import CountdownTimer from '../countdown-timer'; import SwapsFooter from '../swaps-footer'; import ViewQuotePriceDifference from './view-quote-price-difference'; diff --git a/ui/app/pages/unlock-page/index.js b/ui/pages/unlock-page/index.js similarity index 100% rename from ui/app/pages/unlock-page/index.js rename to ui/pages/unlock-page/index.js diff --git a/ui/app/pages/unlock-page/index.scss b/ui/pages/unlock-page/index.scss similarity index 100% rename from ui/app/pages/unlock-page/index.scss rename to ui/pages/unlock-page/index.scss diff --git a/ui/app/pages/unlock-page/unlock-page.component.js b/ui/pages/unlock-page/unlock-page.component.js similarity index 100% rename from ui/app/pages/unlock-page/unlock-page.component.js rename to ui/pages/unlock-page/unlock-page.component.js diff --git a/ui/app/pages/unlock-page/unlock-page.component.test.js b/ui/pages/unlock-page/unlock-page.component.test.js similarity index 91% rename from ui/app/pages/unlock-page/unlock-page.component.test.js rename to ui/pages/unlock-page/unlock-page.component.test.js index 412b7dc6f..b29afa5c7 100644 --- a/ui/app/pages/unlock-page/unlock-page.component.test.js +++ b/ui/pages/unlock-page/unlock-page.component.test.js @@ -2,7 +2,7 @@ import React from 'react'; import sinon from 'sinon'; import configureMockStore from 'redux-mock-store'; import { fireEvent } from '@testing-library/react'; -import { renderWithProvider } from '../../../../test/lib/render-helpers'; +import { renderWithProvider } from '../../../test/lib/render-helpers'; import UnlockPage from './unlock-page.component'; describe('Unlock Page Component', () => { diff --git a/ui/app/pages/unlock-page/unlock-page.container.js b/ui/pages/unlock-page/unlock-page.container.js similarity index 92% rename from ui/app/pages/unlock-page/unlock-page.container.js rename to ui/pages/unlock-page/unlock-page.container.js index 56da7e661..eb1be797a 100644 --- a/ui/app/pages/unlock-page/unlock-page.container.js +++ b/ui/pages/unlock-page/unlock-page.container.js @@ -1,8 +1,8 @@ import { connect } from 'react-redux'; import { withRouter } from 'react-router-dom'; import { compose } from 'redux'; -import { getEnvironmentType } from '../../../../app/scripts/lib/util'; -import { ENVIRONMENT_TYPE_POPUP } from '../../../../shared/constants/app'; +import { getEnvironmentType } from '../../../app/scripts/lib/util'; +import { ENVIRONMENT_TYPE_POPUP } from '../../../shared/constants/app'; import { DEFAULT_ROUTE, RESTORE_VAULT_ROUTE, diff --git a/ui/app/pages/unlock-page/unlock-page.container.test.js b/ui/pages/unlock-page/unlock-page.container.test.js similarity index 100% rename from ui/app/pages/unlock-page/unlock-page.container.test.js rename to ui/pages/unlock-page/unlock-page.container.test.js diff --git a/ui/app/selectors/confirm-transaction.js b/ui/selectors/confirm-transaction.js similarity index 98% rename from ui/app/selectors/confirm-transaction.js rename to ui/selectors/confirm-transaction.js index 2ac609be7..ba837e8ab 100644 --- a/ui/app/selectors/confirm-transaction.js +++ b/ui/selectors/confirm-transaction.js @@ -1,5 +1,5 @@ import { createSelector } from 'reselect'; -import txHelper from '../../lib/tx-helper'; +import txHelper from '../helpers/utils/tx-helper'; import { calcTokenAmount } from '../helpers/utils/token-util'; import { roundExponential, @@ -10,7 +10,7 @@ import { addEth, } from '../helpers/utils/confirm-tx.util'; import { sumHexes } from '../helpers/utils/transactions.util'; -import { transactionMatchesNetwork } from '../../../shared/modules/transaction.utils'; +import { transactionMatchesNetwork } from '../../shared/modules/transaction.utils'; import { getCurrentChainId, deprecatedGetCurrentNetworkId } from './selectors'; import { getNativeCurrency } from '.'; diff --git a/ui/app/selectors/confirm-transaction.test.js b/ui/selectors/confirm-transaction.test.js similarity index 95% rename from ui/app/selectors/confirm-transaction.test.js rename to ui/selectors/confirm-transaction.test.js index 1f7acf158..9a899a523 100644 --- a/ui/app/selectors/confirm-transaction.test.js +++ b/ui/selectors/confirm-transaction.test.js @@ -2,8 +2,8 @@ import { KOVAN_CHAIN_ID, KOVAN_NETWORK_ID, MAINNET_CHAIN_ID, -} from '../../../shared/constants/network'; -import { TRANSACTION_TYPES } from '../../../shared/constants/transaction'; +} from '../../shared/constants/network'; +import { TRANSACTION_TYPES } from '../../shared/constants/transaction'; import { unconfirmedTransactionsCountSelector, sendTokenTokenAmountAndToAddressSelector, diff --git a/ui/app/selectors/custom-gas.js b/ui/selectors/custom-gas.js similarity index 99% rename from ui/app/selectors/custom-gas.js rename to ui/selectors/custom-gas.js index 5f01e8d08..ea64bcbe6 100644 --- a/ui/app/selectors/custom-gas.js +++ b/ui/selectors/custom-gas.js @@ -1,4 +1,4 @@ -import { addHexPrefix } from '../../../app/scripts/lib/util'; +import { addHexPrefix } from '../../app/scripts/lib/util'; import { conversionUtil, conversionGreaterThan, diff --git a/ui/app/selectors/custom-gas.test.js b/ui/selectors/custom-gas.test.js similarity index 100% rename from ui/app/selectors/custom-gas.test.js rename to ui/selectors/custom-gas.test.js diff --git a/ui/app/selectors/first-time-flow.js b/ui/selectors/first-time-flow.js similarity index 100% rename from ui/app/selectors/first-time-flow.js rename to ui/selectors/first-time-flow.js diff --git a/ui/app/selectors/index.js b/ui/selectors/index.js similarity index 100% rename from ui/app/selectors/index.js rename to ui/selectors/index.js diff --git a/ui/app/selectors/permissions.js b/ui/selectors/permissions.js similarity index 99% rename from ui/app/selectors/permissions.js rename to ui/selectors/permissions.js index 8ac46cc96..788275179 100644 --- a/ui/app/selectors/permissions.js +++ b/ui/selectors/permissions.js @@ -1,5 +1,5 @@ import { forOwn } from 'lodash'; -import { CAVEAT_NAMES } from '../../../shared/constants/permissions'; +import { CAVEAT_NAMES } from '../../shared/constants/permissions'; import { getMetaMaskAccountsOrdered, getOriginOfCurrentTab, diff --git a/ui/app/selectors/permissions.test.js b/ui/selectors/permissions.test.js similarity index 99% rename from ui/app/selectors/permissions.test.js rename to ui/selectors/permissions.test.js index 3cebfd1a5..16d3057fc 100644 --- a/ui/app/selectors/permissions.test.js +++ b/ui/selectors/permissions.test.js @@ -1,4 +1,4 @@ -import { KOVAN_CHAIN_ID } from '../../../shared/constants/network'; +import { KOVAN_CHAIN_ID } from '../../shared/constants/network'; import { getConnectedDomainsForSelectedAddress, getOrderedConnectedAccountsForActiveTab, diff --git a/ui/app/selectors/selectors.js b/ui/selectors/selectors.js similarity index 98% rename from ui/app/selectors/selectors.js rename to ui/selectors/selectors.js index eed91f858..a4d1e5d89 100644 --- a/ui/app/selectors/selectors.js +++ b/ui/selectors/selectors.js @@ -1,17 +1,17 @@ import { stripHexPrefix } from 'ethereumjs-util'; import { createSelector } from 'reselect'; -import { addHexPrefix } from '../../../app/scripts/lib/util'; +import { addHexPrefix } from '../../app/scripts/lib/util'; import { MAINNET_CHAIN_ID, TEST_CHAINS, NETWORK_TYPE_RPC, NATIVE_CURRENCY_TOKEN_IMAGE_MAP, -} from '../../../shared/constants/network'; +} from '../../shared/constants/network'; import { SWAPS_CHAINID_DEFAULT_TOKEN_MAP, ALLOWED_SWAPS_CHAIN_IDS, -} from '../../../shared/constants/swaps'; +} from '../../shared/constants/swaps'; import { shortenAddress, getAccountByAddress } from '../helpers/utils/util'; import { @@ -21,7 +21,7 @@ import { import { TEMPLATED_CONFIRMATION_MESSAGE_TYPES } from '../pages/confirmation/templates'; -import { toChecksumHexAddress } from '../../../shared/modules/hexstring-utils'; +import { toChecksumHexAddress } from '../../shared/modules/hexstring-utils'; import { getNativeCurrency } from './send'; /** diff --git a/ui/app/selectors/selectors.test.js b/ui/selectors/selectors.test.js similarity index 98% rename from ui/app/selectors/selectors.test.js rename to ui/selectors/selectors.test.js index 0b476f727..c0abf115c 100644 --- a/ui/app/selectors/selectors.test.js +++ b/ui/selectors/selectors.test.js @@ -1,4 +1,4 @@ -import mockState from '../../../test/data/mock-state.json'; +import mockState from '../../test/data/mock-state.json'; import * as selectors from './selectors'; describe('Selectors', () => { diff --git a/ui/app/selectors/send-selectors-test-data.js b/ui/selectors/send-selectors-test-data.js similarity index 98% rename from ui/app/selectors/send-selectors-test-data.js rename to ui/selectors/send-selectors-test-data.js index f6c077798..e6c0d230c 100644 --- a/ui/app/selectors/send-selectors-test-data.js +++ b/ui/selectors/send-selectors-test-data.js @@ -1,4 +1,4 @@ -import { TRANSACTION_STATUSES } from '../../../shared/constants/transaction'; +import { TRANSACTION_STATUSES } from '../../shared/constants/transaction'; const state = { metamask: { diff --git a/ui/app/selectors/send.js b/ui/selectors/send.js similarity index 100% rename from ui/app/selectors/send.js rename to ui/selectors/send.js diff --git a/ui/app/selectors/send.test.js b/ui/selectors/send.test.js similarity index 99% rename from ui/app/selectors/send.test.js rename to ui/selectors/send.test.js index b4f94c56b..bab7b63fe 100644 --- a/ui/app/selectors/send.test.js +++ b/ui/selectors/send.test.js @@ -1,5 +1,5 @@ import sinon from 'sinon'; -import { TRANSACTION_STATUSES } from '../../../shared/constants/transaction'; +import { TRANSACTION_STATUSES } from '../../shared/constants/transaction'; import { getBlockGasLimit, getConversionRate, diff --git a/ui/app/selectors/transactions.js b/ui/selectors/transactions.js similarity index 98% rename from ui/app/selectors/transactions.js rename to ui/selectors/transactions.js index 628b856f0..e05d7f3fa 100644 --- a/ui/app/selectors/transactions.js +++ b/ui/selectors/transactions.js @@ -4,12 +4,12 @@ import { PENDING_STATUS_HASH, } from '../helpers/constants/transactions'; import { hexToDecimal } from '../helpers/utils/conversions.util'; -import txHelper from '../../lib/tx-helper'; +import txHelper from '../helpers/utils/tx-helper'; import { TRANSACTION_STATUSES, TRANSACTION_TYPES, -} from '../../../shared/constants/transaction'; -import { transactionMatchesNetwork } from '../../../shared/modules/transaction.utils'; +} from '../../shared/constants/transaction'; +import { transactionMatchesNetwork } from '../../shared/modules/transaction.utils'; import { getCurrentChainId, deprecatedGetCurrentNetworkId } from './selectors'; import { getSelectedAddress } from '.'; diff --git a/ui/app/selectors/transactions.test.js b/ui/selectors/transactions.test.js similarity index 98% rename from ui/app/selectors/transactions.test.js rename to ui/selectors/transactions.test.js index 4493c3e96..4f538e232 100644 --- a/ui/app/selectors/transactions.test.js +++ b/ui/selectors/transactions.test.js @@ -1,8 +1,8 @@ import { KOVAN_CHAIN_ID, MAINNET_CHAIN_ID, -} from '../../../shared/constants/network'; -import { TRANSACTION_STATUSES } from '../../../shared/constants/transaction'; +} from '../../shared/constants/network'; +import { TRANSACTION_STATUSES } from '../../shared/constants/transaction'; import { unapprovedMessagesSelector, transactionsSelector, diff --git a/ui/app/store/actionConstants.js b/ui/store/actionConstants.js similarity index 100% rename from ui/app/store/actionConstants.js rename to ui/store/actionConstants.js diff --git a/ui/app/store/actionConstants.test.js b/ui/store/actionConstants.test.js similarity index 96% rename from ui/app/store/actionConstants.test.js rename to ui/store/actionConstants.test.js index 306704aea..7cfef827f 100644 --- a/ui/app/store/actionConstants.test.js +++ b/ui/store/actionConstants.test.js @@ -1,6 +1,6 @@ import freeze from 'deep-freeze-strict'; import reducers from '../ducks'; -import { NETWORK_TYPE_RPC } from '../../../shared/constants/network'; +import { NETWORK_TYPE_RPC } from '../../shared/constants/network'; import * as actionConstants from './actionConstants'; describe('Redux actionConstants', () => { diff --git a/ui/app/store/actions.js b/ui/store/actions.js similarity index 98% rename from ui/app/store/actions.js rename to ui/store/actions.js index f3c2c03ea..42102d1f0 100644 --- a/ui/app/store/actions.js +++ b/ui/store/actions.js @@ -2,7 +2,7 @@ import abi from 'human-standard-token-abi'; import pify from 'pify'; import log from 'loglevel'; import { capitalize } from 'lodash'; -import getBuyEthUrl from '../../../app/scripts/lib/buy-eth-url'; +import getBuyEthUrl from '../../app/scripts/lib/buy-eth-url'; import { calcTokenBalance, estimateGasForSend } from '../pages/send/send.utils'; import { fetchLocale, @@ -11,22 +11,19 @@ import { import { getMethodDataAsync } from '../helpers/utils/transactions.util'; import { fetchSymbolAndDecimals } from '../helpers/utils/token-util'; import switchDirection from '../helpers/utils/switch-direction'; -import { ENVIRONMENT_TYPE_NOTIFICATION } from '../../../shared/constants/app'; +import { ENVIRONMENT_TYPE_NOTIFICATION } from '../../shared/constants/app'; import { hasUnconfirmedTransactions } from '../helpers/utils/confirm-tx.util'; import { setCustomGasLimit } from '../ducks/gas/gas.duck'; -import txHelper from '../../lib/tx-helper'; -import { - getEnvironmentType, - addHexPrefix, -} from '../../../app/scripts/lib/util'; +import txHelper from '../helpers/utils/tx-helper'; +import { getEnvironmentType, addHexPrefix } from '../../app/scripts/lib/util'; import { getPermittedAccountsForCurrentTab, getSelectedAddress, } from '../selectors'; import { switchedToUnconnectedAccount } from '../ducks/alerts/unconnected-account'; import { getUnconnectedAccountAlertEnabledness } from '../ducks/metamask/metamask'; -import { LISTED_CONTRACT_ADDRESSES } from '../../../shared/constants/tokens'; -import { toChecksumHexAddress } from '../../../shared/modules/hexstring-utils'; +import { toChecksumHexAddress } from '../../shared/modules/hexstring-utils'; +import { LISTED_CONTRACT_ADDRESSES } from '../../shared/constants/tokens'; import * as actionConstants from './actionConstants'; let background = null; @@ -2855,10 +2852,10 @@ export function setLedgerLivePreference(value) { // MetaMetrics /** - * @typedef {import('../../../shared/constants/metametrics').MetaMetricsEventPayload} MetaMetricsEventPayload - * @typedef {import('../../../shared/constants/metametrics').MetaMetricsEventOptions} MetaMetricsEventOptions - * @typedef {import('../../../shared/constants/metametrics').MetaMetricsPagePayload} MetaMetricsPagePayload - * @typedef {import('../../../shared/constants/metametrics').MetaMetricsPageOptions} MetaMetricsPageOptions + * @typedef {import('../../shared/constants/metametrics').MetaMetricsEventPayload} MetaMetricsEventPayload + * @typedef {import('../../shared/constants/metametrics').MetaMetricsEventOptions} MetaMetricsEventOptions + * @typedef {import('../../shared/constants/metametrics').MetaMetricsPagePayload} MetaMetricsPagePayload + * @typedef {import('../../shared/constants/metametrics').MetaMetricsPageOptions} MetaMetricsPageOptions */ /** diff --git a/ui/app/store/actions.test.js b/ui/store/actions.test.js similarity index 99% rename from ui/app/store/actions.test.js rename to ui/store/actions.test.js index d3281701e..378284301 100644 --- a/ui/app/store/actions.test.js +++ b/ui/store/actions.test.js @@ -2,9 +2,9 @@ import sinon from 'sinon'; import configureStore from 'redux-mock-store'; import thunk from 'redux-thunk'; import EthQuery from 'eth-query'; -import enLocale from '../../../app/_locales/en/messages.json'; -import MetaMaskController from '../../../app/scripts/metamask-controller'; -import { TRANSACTION_STATUSES } from '../../../shared/constants/transaction'; +import enLocale from '../../app/_locales/en/messages.json'; +import MetaMaskController from '../../app/scripts/metamask-controller'; +import { TRANSACTION_STATUSES } from '../../shared/constants/transaction'; import * as actions from './actions'; const middleware = [thunk]; diff --git a/ui/app/store/store.js b/ui/store/store.js similarity index 100% rename from ui/app/store/store.js rename to ui/store/store.js