diff --git a/app/scripts/controllers/transactions/tx-gas-utils.js b/app/scripts/controllers/transactions/tx-gas-utils.js index b296dc5eb..765551167 100644 --- a/app/scripts/controllers/transactions/tx-gas-utils.js +++ b/app/scripts/controllers/transactions/tx-gas-utils.js @@ -7,7 +7,7 @@ const { const { addHexPrefix } = require('ethereumjs-util') const SIMPLE_GAS_COST = '0x5208' // Hex for 21000, cost of a simple send. -import { TRANSACTION_NO_CONTRACT_ERROR_KEY } from '../../../../ui/app/constants/error-keys' +import { TRANSACTION_NO_CONTRACT_ERROR_KEY } from '../../../../ui/app/helpers/constants/error-keys' /** tx-gas-utils are gas utility methods for Transaction manager diff --git a/development/mock-dev.js b/development/mock-dev.js index 1af10a131..4a3217a06 100644 --- a/development/mock-dev.js +++ b/development/mock-dev.js @@ -14,9 +14,9 @@ const render = require('react-dom').render const h = require('react-hyperscript') -const Root = require('../ui/app/root') -const configureStore = require('../ui/app/store') -const actions = require('../ui/app/actions') +const Root = require('../ui/app/pages') +const configureStore = require('../ui/app/store/store') +const actions = require('../ui/app/store/actions') const states = require('./states') const backGroundConnectionModifiers = require('./backGroundConnectionModifiers') const Selector = require('./selector') diff --git a/development/ui-dev.js b/development/ui-dev.js index bae0ce50e..70f513972 100644 --- a/development/ui-dev.js +++ b/development/ui-dev.js @@ -17,7 +17,7 @@ const render = require('react-dom').render const h = require('react-hyperscript') -const Root = require('../ui/app/root') +const Root = require('../ui/app/pages') const configureStore = require('./uiStore') const states = require('./states') const Selector = require('./selector') diff --git a/development/uiStore.js b/development/uiStore.js index c71d66d3b..bfec8f5e4 100644 --- a/development/uiStore.js +++ b/development/uiStore.js @@ -2,7 +2,7 @@ const createStore = require('redux').createStore const applyMiddleware = require('redux').applyMiddleware const thunkMiddleware = require('redux-thunk').default const createLogger = require('redux-logger').createLogger -const rootReducer = require('../ui/app/reducers') +const rootReducer = require('../ui/app/ducks') module.exports = configureStore diff --git a/docs/adding-new-networks.md b/docs/adding-new-networks.md index b74233fa6..40925f135 100644 --- a/docs/adding-new-networks.md +++ b/docs/adding-new-networks.md @@ -5,7 +5,7 @@ To add another network to our dropdown menu, make sure the following files are a ``` app/scripts/config.js app/scripts/lib/buy-eth-url.js -ui/app/app.js +ui/app/index.js ui/app/components/buy-button-subview.js ui/app/components/drop-menu-item.js ui/app/components/network.js diff --git a/mascara/src/app/buy-ether-widget/index.js b/mascara/src/app/buy-ether-widget/index.js index c8530ba4c..d0d6ff343 100644 --- a/mascara/src/app/buy-ether-widget/index.js +++ b/mascara/src/app/buy-ether-widget/index.js @@ -5,7 +5,7 @@ import {connect} from 'react-redux' import {qrcode} from 'qrcode-generator' import copyToClipboard from 'copy-to-clipboard' import ShapeShiftForm from '../shapeshift-form' -import {buyEth, showAccountDetail} from '../../../../ui/app/actions' +import {buyEth, showAccountDetail} from '../../../../ui/app/store/actions' const OPTION_VALUES = { COINBASE: 'coinbase', diff --git a/mascara/src/app/shapeshift-form/index.js b/mascara/src/app/shapeshift-form/index.js index fe7f7ffcb..c044f9ecc 100644 --- a/mascara/src/app/shapeshift-form/index.js +++ b/mascara/src/app/shapeshift-form/index.js @@ -3,8 +3,8 @@ import PropTypes from 'prop-types' import classnames from 'classnames' import qrcode from 'qrcode-generator' import {connect} from 'react-redux' -import {shapeShiftSubview, pairUpdate, buyWithShapeShift} from '../../../../ui/app/actions' -import {isValidAddress} from '../../../../ui/app/util' +import {shapeShiftSubview, pairUpdate, buyWithShapeShift} from '../../../../ui/app/store/actions' +import {isValidAddress} from '../../../../ui/app/helpers/utils/util' export class ShapeShiftForm extends Component { static propTypes = { diff --git a/test/unit/actions/config_test.js b/test/unit/actions/config_test.js index 648f456fb..9127474a8 100644 --- a/test/unit/actions/config_test.js +++ b/test/unit/actions/config_test.js @@ -3,8 +3,8 @@ var assert = require('assert') var freeze = require('deep-freeze-strict') var path = require('path') -var actions = require(path.join(__dirname, '..', '..', '..', 'ui', 'app', 'actions.js')) -var reducers = require(path.join(__dirname, '..', '..', '..', 'ui', 'app', 'reducers.js')) +var actions = require(path.join(__dirname, '..', '..', '..', 'ui', 'app', 'store', 'actions.js')) +var reducers = require(path.join(__dirname, '..', '..', '..', 'ui', 'app', 'ducks', 'index.js')) describe('config view actions', function () { var initialState = { diff --git a/test/unit/actions/set_account_label_test.js b/test/unit/actions/set_account_label_test.js index 53ea1d130..1601d6383 100644 --- a/test/unit/actions/set_account_label_test.js +++ b/test/unit/actions/set_account_label_test.js @@ -2,8 +2,8 @@ const assert = require('assert') const freeze = require('deep-freeze-strict') const path = require('path') -const actions = require(path.join(__dirname, '..', '..', '..', 'ui', 'app', 'actions.js')) -const reducers = require(path.join(__dirname, '..', '..', '..', 'ui', 'app', 'reducers.js')) +const actions = require(path.join(__dirname, '..', '..', '..', 'ui', 'app', 'store', 'actions.js')) +const reducers = require(path.join(__dirname, '..', '..', '..', 'ui', 'app', 'ducks', 'index.js')) describe('SET_ACCOUNT_LABEL', function () { it('updates the state.metamask.identities[:i].name property of the state to the action.value.label', function () { diff --git a/test/unit/actions/set_selected_account_test.js b/test/unit/actions/set_selected_account_test.js index 28b47d09d..36d312d7b 100644 --- a/test/unit/actions/set_selected_account_test.js +++ b/test/unit/actions/set_selected_account_test.js @@ -3,8 +3,8 @@ var assert = require('assert') var freeze = require('deep-freeze-strict') var path = require('path') -var actions = require(path.join(__dirname, '..', '..', '..', 'ui', 'app', 'actions.js')) -var reducers = require(path.join(__dirname, '..', '..', '..', 'ui', 'app', 'reducers.js')) +var actions = require(path.join(__dirname, '..', '..', '..', 'ui', 'app', 'store', 'actions.js')) +var reducers = require(path.join(__dirname, '..', '..', '..', 'ui', 'app', 'ducks', 'index.js')) describe('SET_SELECTED_ACCOUNT', function () { it('sets the state.appState.activeAddress property of the state to the action.value', function () { diff --git a/test/unit/actions/tx_test.js b/test/unit/actions/tx_test.js index 160cd4552..8c64d844f 100644 --- a/test/unit/actions/tx_test.js +++ b/test/unit/actions/tx_test.js @@ -4,7 +4,7 @@ var path = require('path') import configureMockStore from 'redux-mock-store' import thunk from 'redux-thunk' -const actions = require(path.join(__dirname, '../../../ui/app/actions.js')) +const actions = require(path.join(__dirname, '../../../ui/app/store/actions.js')) const middlewares = [thunk] const mockStore = configureMockStore(middlewares) diff --git a/test/unit/actions/view_info_test.js b/test/unit/actions/view_info_test.js index 69895d801..5785a368c 100644 --- a/test/unit/actions/view_info_test.js +++ b/test/unit/actions/view_info_test.js @@ -3,8 +3,8 @@ var assert = require('assert') var freeze = require('deep-freeze-strict') var path = require('path') -var actions = require(path.join(__dirname, '..', '..', '..', 'ui', 'app', 'actions.js')) -var reducers = require(path.join(__dirname, '..', '..', '..', 'ui', 'app', 'reducers.js')) +var actions = require(path.join(__dirname, '..', '..', '..', 'ui', 'app', 'store', 'actions.js')) +var reducers = require(path.join(__dirname, '..', '..', '..', 'ui', 'app', 'ducks', 'index.js')) describe('SHOW_INFO_PAGE', function () { it('sets the state.appState.currentView.name property to info', function () { diff --git a/test/unit/actions/warning_test.js b/test/unit/actions/warning_test.js index 28b565499..e57374cda 100644 --- a/test/unit/actions/warning_test.js +++ b/test/unit/actions/warning_test.js @@ -3,8 +3,8 @@ var assert = require('assert') var freeze = require('deep-freeze-strict') var path = require('path') -var actions = require(path.join(__dirname, '..', '..', '..', 'ui', 'app', 'actions.js')) -var reducers = require(path.join(__dirname, '..', '..', '..', 'ui', 'app', 'reducers.js')) +var actions = require(path.join(__dirname, '..', '..', '..', 'ui', 'app', 'store', 'actions.js')) +var reducers = require(path.join(__dirname, '..', '..', '..', 'ui', 'app', 'ducks', 'index.js')) describe('action DISPLAY_WARNING', function () { it('sets appState.warning to provided value', function () { diff --git a/test/unit/balance-formatter-test.js b/test/unit/balance-formatter-test.js index ab6daa19c..bd0eb5008 100644 --- a/test/unit/balance-formatter-test.js +++ b/test/unit/balance-formatter-test.js @@ -1,6 +1,6 @@ const assert = require('assert') const currencyFormatter = require('currency-formatter') -const infuraConversion = require('../../ui/app/infura-conversion.json') +const infuraConversion = require('../../ui/app/helpers/constants/infura-conversion.json') describe('currencyFormatting', function () { it('be able to format any infura currency', function (done) { diff --git a/test/unit/reducers/unlock_vault_test.js b/test/unit/reducers/unlock_vault_test.js index d66e8edbb..d66891a63 100644 --- a/test/unit/reducers/unlock_vault_test.js +++ b/test/unit/reducers/unlock_vault_test.js @@ -4,8 +4,8 @@ var assert = require('assert') var path = require('path') var sinon = require('sinon') -var actions = require(path.join(__dirname, '..', '..', '..', 'ui', 'app', 'actions.js')) -var reducers = require(path.join(__dirname, '..', '..', '..', 'ui', 'app', 'reducers.js')) +var actions = require(path.join(__dirname, '..', '..', '..', 'ui', 'app', 'store', 'actions.js')) +var reducers = require(path.join(__dirname, '..', '..', '..', 'ui', 'app', 'ducks', 'index.js')) describe('#unlockMetamask(selectedAccount)', function () { beforeEach(function () { diff --git a/test/unit/responsive/components/dropdown-test.js b/test/unit/responsive/components/dropdown-test.js index f3f236d90..1fadbfb60 100644 --- a/test/unit/responsive/components/dropdown-test.js +++ b/test/unit/responsive/components/dropdown-test.js @@ -3,7 +3,7 @@ const assert = require('assert') const h = require('react-hyperscript') const sinon = require('sinon') const path = require('path') -const Dropdown = require(path.join(__dirname, '..', '..', '..', '..', 'ui', 'app', 'components', 'dropdowns', 'index.js')).Dropdown +const Dropdown = require(path.join(__dirname, '..', '..', '..', '..', 'ui', 'app', 'components', 'app', 'dropdowns', 'index.js')).Dropdown const { createMockStore } = require('redux-test-utils') const { mountWithStore } = require('../../../lib/render-helpers') diff --git a/test/unit/ui/app/actions.spec.js b/test/unit/ui/app/actions.spec.js index 8d7de8b02..46e94bb32 100644 --- a/test/unit/ui/app/actions.spec.js +++ b/test/unit/ui/app/actions.spec.js @@ -16,7 +16,7 @@ const { createTestProviderTools } = require('../../../stub/provider') const provider = createTestProviderTools({ scaffold: {}}).provider const enLocale = require('../../../../app/_locales/en/messages.json') -const actions = require('../../../../ui/app/actions') +const actions = require('../../../../ui/app/store/actions') const MetaMaskController = require('../../../../app/scripts/metamask-controller') const firstTimeState = require('../../../unit/localhostState') diff --git a/test/unit/ui/app/components/token-cell.spec.js b/test/unit/ui/app/components/token-cell.spec.js index 6145c6924..23e76c418 100644 --- a/test/unit/ui/app/components/token-cell.spec.js +++ b/test/unit/ui/app/components/token-cell.spec.js @@ -5,8 +5,8 @@ import { Provider } from 'react-redux' import configureMockStore from 'redux-mock-store' import { mount } from 'enzyme' -import TokenCell from '../../../../../ui/app/components/token-cell' -import Identicon from '../../../../../ui/app/components/identicon' +import TokenCell from '../../../../../ui/app/components/app/token-cell' +import Identicon from '../../../../../ui/app/components/ui/identicon' describe('Token Cell', () => { let wrapper diff --git a/test/unit/ui/app/reducers/app.spec.js b/test/unit/ui/app/reducers/app.spec.js index bee4963e5..6c77e0ef9 100644 --- a/test/unit/ui/app/reducers/app.spec.js +++ b/test/unit/ui/app/reducers/app.spec.js @@ -1,6 +1,6 @@ import assert from 'assert' -import reduceApp from '../../../../../ui/app/reducers/app' -import * as actions from '../../../../../ui/app/actions' +import reduceApp from '../../../../../ui/app/ducks/app/app' +import * as actions from '../../../../../ui/app/store/actions' describe('App State', () => { diff --git a/test/unit/ui/app/reducers/metamask.spec.js b/test/unit/ui/app/reducers/metamask.spec.js index 8cdb780fe..388c67c76 100644 --- a/test/unit/ui/app/reducers/metamask.spec.js +++ b/test/unit/ui/app/reducers/metamask.spec.js @@ -1,6 +1,6 @@ import assert from 'assert' -import reduceMetamask from '../../../../../ui/app/reducers/metamask' -import * as actions from '../../../../../ui/app/actions' +import reduceMetamask from '../../../../../ui/app/ducks/metamask/metamask' +import * as actions from '../../../../../ui/app/store/actions' describe('MetaMask Reducers', () => { diff --git a/test/unit/ui/app/selectors.spec.js b/test/unit/ui/app/selectors.spec.js index 070de0bcd..b4aa8e272 100644 --- a/test/unit/ui/app/selectors.spec.js +++ b/test/unit/ui/app/selectors.spec.js @@ -1,5 +1,5 @@ const assert = require('assert') -const selectors = require('../../../../ui/app/selectors') +const selectors = require('../../../../ui/app/selectors/selectors') const mockState = require('../../../data/mock-state.json') const Eth = require('ethjs') diff --git a/test/unit/util_test.js b/test/unit/util_test.js index 39473854f..87f57b218 100644 --- a/test/unit/util_test.js +++ b/test/unit/util_test.js @@ -3,7 +3,7 @@ var sinon = require('sinon') const ethUtil = require('ethereumjs-util') var path = require('path') -var util = require(path.join(__dirname, '..', '..', 'ui', 'app', 'util.js')) +var util = require(path.join(__dirname, '..', '..', 'ui', 'app', 'helpers', 'utils', 'util.js')) describe('util', function () { var ethInWei = '1' diff --git a/ui/.gitignore b/ui/.gitignore deleted file mode 100644 index c6b1254b5..000000000 --- a/ui/.gitignore +++ /dev/null @@ -1,66 +0,0 @@ - -# Created by https://www.gitignore.io/api/osx,node - -### OSX ### -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - - -### Node ### -# Logs -logs -*.log -npm-debug.log* - -# Runtime data -pids -*.pid -*.seed - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (http://nodejs.org/api/addons.html) -build/Release - -# Dependency directory -# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git -node_modules - -# Optional npm cache directory -.npm - -# Optional REPL history -.node_repl_history - diff --git a/ui/app/accounts/new-account/index.js b/ui/app/accounts/new-account/index.js deleted file mode 100644 index 795bd7ce6..000000000 --- a/ui/app/accounts/new-account/index.js +++ /dev/null @@ -1,87 +0,0 @@ -const Component = require('react').Component -const h = require('react-hyperscript') -const PropTypes = require('prop-types') -const inherits = require('util').inherits -const connect = require('react-redux').connect -const actions = require('../../actions') -const { getCurrentViewContext } = require('../../selectors') -const classnames = require('classnames') - -const NewAccountCreateForm = require('./create-form') -const NewAccountImportForm = require('../import') - -function mapStateToProps (state) { - return { - displayedForm: getCurrentViewContext(state), - } -} - -function mapDispatchToProps (dispatch) { - return { - displayForm: form => dispatch(actions.setNewAccountForm(form)), - showQrView: (selected, identity) => dispatch(actions.showQrView(selected, identity)), - showExportPrivateKeyModal: () => { - dispatch(actions.showModal({ name: 'EXPORT_PRIVATE_KEY' })) - }, - hideModal: () => dispatch(actions.hideModal()), - setAccountLabel: (address, label) => dispatch(actions.setAccountLabel(address, label)), - } -} - -inherits(AccountDetailsModal, Component) -function AccountDetailsModal (props) { - Component.call(this) - - this.state = { - displayedForm: props.displayedForm, - } -} - -AccountDetailsModal.contextTypes = { - t: PropTypes.func, -} - -module.exports = connect(mapStateToProps, mapDispatchToProps)(AccountDetailsModal) - - -AccountDetailsModal.prototype.render = function () { - const { displayedForm, displayForm } = this.props - - return h('div.new-account', {}, [ - - h('div.new-account__header', [ - - h('div.new-account__title', this.context.t('newAccount')), - - h('div.new-account__tabs', [ - - h('div.new-account__tabs__tab', { - className: classnames('new-account__tabs__tab', { - 'new-account__tabs__selected': displayedForm === 'CREATE', - 'new-account__tabs__unselected cursor-pointer': displayedForm !== 'CREATE', - }), - onClick: () => displayForm('CREATE'), - }, this.context.t('createDen')), - - h('div.new-account__tabs__tab', { - className: classnames('new-account__tabs__tab', { - 'new-account__tabs__selected': displayedForm === 'IMPORT', - 'new-account__tabs__unselected cursor-pointer': displayedForm !== 'IMPORT', - }), - onClick: () => displayForm('IMPORT'), - }, this.context.t('import')), - - ]), - - ]), - - h('div.new-account__form', [ - - displayedForm === 'CREATE' - ? h(NewAccountCreateForm) - : h(NewAccountImportForm), - - ]), - - ]) -} diff --git a/ui/app/components/account-dropdowns.js b/ui/app/components/app/account-dropdowns.js similarity index 98% rename from ui/app/components/account-dropdowns.js rename to ui/app/components/app/account-dropdowns.js index b05ba219c..e02d17e54 100644 --- a/ui/app/components/account-dropdowns.js +++ b/ui/app/components/app/account-dropdowns.js @@ -1,15 +1,15 @@ const Component = require('react').Component const PropTypes = require('prop-types') const h = require('react-hyperscript') -const actions = require('../actions') +const actions = require('../../store/actions') const genAccountLink = require('etherscan-link').createAccountLink const connect = require('react-redux').connect const Dropdown = require('./dropdown').Dropdown const DropdownMenuItem = require('./dropdown').DropdownMenuItem const copyToClipboard = require('copy-to-clipboard') -const { checksumAddress } = require('../util') +const { checksumAddress } = require('../../helpers/utils/util') -import Identicon from './identicon' +import Identicon from '../ui/identicon' class AccountDropdowns extends Component { constructor (props) { diff --git a/ui/app/components/account-menu/account-menu.component.js b/ui/app/components/app/account-menu/account-menu.component.js similarity index 96% rename from ui/app/components/account-menu/account-menu.component.js rename to ui/app/components/app/account-menu/account-menu.component.js index f7c962874..972ea492e 100644 --- a/ui/app/components/account-menu/account-menu.component.js +++ b/ui/app/components/app/account-menu/account-menu.component.js @@ -2,12 +2,12 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' import debounce from 'lodash.debounce' import { Menu, Item, Divider, CloseArea } from '../dropdowns/components/menu' -import { ENVIRONMENT_TYPE_POPUP } from '../../../../app/scripts/lib/enums' -import { getEnvironmentType } from '../../../../app/scripts/lib/util' -import Tooltip from '../tooltip' -import Identicon from '../identicon' +import { ENVIRONMENT_TYPE_POPUP } from '../../../../../app/scripts/lib/enums' +import { getEnvironmentType } from '../../../../../app/scripts/lib/util' +import Tooltip from '../../ui/tooltip' +import Identicon from '../../ui/identicon' import UserPreferencedCurrencyDisplay from '../user-preferenced-currency-display' -import { PRIMARY } from '../../constants/common' +import { PRIMARY } from '../../../helpers/constants/common' import { SETTINGS_ROUTE, INFO_ROUTE, @@ -15,7 +15,7 @@ import { IMPORT_ACCOUNT_ROUTE, CONNECT_HARDWARE_ROUTE, DEFAULT_ROUTE, -} from '../../routes' +} from '../../../helpers/constants/routes' export default class AccountMenu extends PureComponent { static contextTypes = { diff --git a/ui/app/components/account-menu/account-menu.container.js b/ui/app/components/app/account-menu/account-menu.container.js similarity index 93% rename from ui/app/components/account-menu/account-menu.container.js rename to ui/app/components/app/account-menu/account-menu.container.js index 93246ec72..ae2e28e76 100644 --- a/ui/app/components/account-menu/account-menu.container.js +++ b/ui/app/components/app/account-menu/account-menu.container.js @@ -10,8 +10,8 @@ import { showConfigPage, showInfoPage, showModal, -} from '../../actions' -import { getMetaMaskAccounts } from '../../selectors' +} from '../../../store/actions' +import { getMetaMaskAccounts } from '../../../selectors/selectors' import AccountMenu from './account-menu.component' function mapStateToProps (state) { diff --git a/ui/app/components/account-menu/index.js b/ui/app/components/app/account-menu/index.js similarity index 100% rename from ui/app/components/account-menu/index.js rename to ui/app/components/app/account-menu/index.js diff --git a/ui/app/components/account-menu/index.scss b/ui/app/components/app/account-menu/index.scss similarity index 100% rename from ui/app/components/account-menu/index.scss rename to ui/app/components/app/account-menu/index.scss diff --git a/ui/app/components/account-panel.js b/ui/app/components/app/account-panel.js similarity index 91% rename from ui/app/components/account-panel.js rename to ui/app/components/app/account-panel.js index a379ed3ac..79882f34a 100644 --- a/ui/app/components/account-panel.js +++ b/ui/app/components/app/account-panel.js @@ -1,9 +1,9 @@ const inherits = require('util').inherits const Component = require('react').Component const h = require('react-hyperscript') -import Identicon from './identicon' -const formatBalance = require('../util').formatBalance -const addressSummary = require('../util').addressSummary +import Identicon from '../ui/identicon' +const formatBalance = require('../../helpers/utils/util').formatBalance +const addressSummary = require('../../helpers/utils/util').addressSummary module.exports = AccountPanel diff --git a/ui/app/components/add-token-button/add-token-button.component.js b/ui/app/components/app/add-token-button/add-token-button.component.js similarity index 100% rename from ui/app/components/add-token-button/add-token-button.component.js rename to ui/app/components/app/add-token-button/add-token-button.component.js diff --git a/ui/app/components/add-token-button/index.js b/ui/app/components/app/add-token-button/index.js similarity index 100% rename from ui/app/components/add-token-button/index.js rename to ui/app/components/app/add-token-button/index.js diff --git a/ui/app/components/add-token-button/index.scss b/ui/app/components/app/add-token-button/index.scss similarity index 100% rename from ui/app/components/add-token-button/index.scss rename to ui/app/components/app/add-token-button/index.scss diff --git a/ui/app/components/app-header/app-header.component.js b/ui/app/components/app/app-header/app-header.component.js similarity index 96% rename from ui/app/components/app-header/app-header.component.js rename to ui/app/components/app/app-header/app-header.component.js index 14f8b9f30..343e0daab 100644 --- a/ui/app/components/app-header/app-header.component.js +++ b/ui/app/components/app/app-header/app-header.component.js @@ -1,8 +1,8 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' -import Identicon from '../identicon' -import { DEFAULT_ROUTE } from '../../routes' +import Identicon from '../../ui/identicon' +import { DEFAULT_ROUTE } from '../../../helpers/constants/routes' const NetworkIndicator = require('../network') export default class AppHeader extends PureComponent { diff --git a/ui/app/components/app-header/app-header.container.js b/ui/app/components/app/app-header/app-header.container.js similarity index 94% rename from ui/app/components/app-header/app-header.container.js rename to ui/app/components/app/app-header/app-header.container.js index 1abc2afeb..b67338245 100644 --- a/ui/app/components/app-header/app-header.container.js +++ b/ui/app/components/app/app-header/app-header.container.js @@ -3,7 +3,7 @@ import { withRouter } from 'react-router-dom' import { compose } from 'recompose' import AppHeader from './app-header.component' -const actions = require('../../actions') +const actions = require('../../../store/actions') const mapStateToProps = state => { const { appState, metamask } = state diff --git a/ui/app/components/app-header/index.js b/ui/app/components/app/app-header/index.js similarity index 100% rename from ui/app/components/app-header/index.js rename to ui/app/components/app/app-header/index.js diff --git a/ui/app/components/app-header/index.scss b/ui/app/components/app/app-header/index.scss similarity index 100% rename from ui/app/components/app-header/index.scss rename to ui/app/components/app/app-header/index.scss diff --git a/ui/app/components/bn-as-decimal-input.js b/ui/app/components/app/bn-as-decimal-input.js similarity index 100% rename from ui/app/components/bn-as-decimal-input.js rename to ui/app/components/app/bn-as-decimal-input.js diff --git a/ui/app/components/coinbase-form.js b/ui/app/components/app/coinbase-form.js similarity index 96% rename from ui/app/components/coinbase-form.js rename to ui/app/components/app/coinbase-form.js index d5915292e..24d287604 100644 --- a/ui/app/components/coinbase-form.js +++ b/ui/app/components/app/coinbase-form.js @@ -3,7 +3,7 @@ const PropTypes = require('prop-types') const h = require('react-hyperscript') const inherits = require('util').inherits const connect = require('react-redux').connect -const actions = require('../actions') +const actions = require('../../store/actions') CoinbaseForm.contextTypes = { t: PropTypes.func, diff --git a/ui/app/components/confirm-page-container/confirm-detail-row/confirm-detail-row.component.js b/ui/app/components/app/confirm-page-container/confirm-detail-row/confirm-detail-row.component.js similarity index 96% rename from ui/app/components/confirm-page-container/confirm-detail-row/confirm-detail-row.component.js rename to ui/app/components/app/confirm-page-container/confirm-detail-row/confirm-detail-row.component.js index c7262d2a9..18571eccb 100644 --- a/ui/app/components/confirm-page-container/confirm-detail-row/confirm-detail-row.component.js +++ b/ui/app/components/app/confirm-page-container/confirm-detail-row/confirm-detail-row.component.js @@ -2,7 +2,7 @@ import React from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' import UserPreferencedCurrencyDisplay from '../../user-preferenced-currency-display' -import { PRIMARY, SECONDARY } from '../../../constants/common' +import { PRIMARY, SECONDARY } from '../../../../helpers/constants/common' const ConfirmDetailRow = props => { const { diff --git a/ui/app/components/confirm-page-container/confirm-detail-row/index.js b/ui/app/components/app/confirm-page-container/confirm-detail-row/index.js similarity index 100% rename from ui/app/components/confirm-page-container/confirm-detail-row/index.js rename to ui/app/components/app/confirm-page-container/confirm-detail-row/index.js diff --git a/ui/app/components/confirm-page-container/confirm-detail-row/index.scss b/ui/app/components/app/confirm-page-container/confirm-detail-row/index.scss similarity index 100% rename from ui/app/components/confirm-page-container/confirm-detail-row/index.scss rename to ui/app/components/app/confirm-page-container/confirm-detail-row/index.scss diff --git a/ui/app/components/confirm-page-container/confirm-detail-row/tests/confirm-detail-row.component.test.js b/ui/app/components/app/confirm-page-container/confirm-detail-row/tests/confirm-detail-row.component.test.js similarity index 100% rename from ui/app/components/confirm-page-container/confirm-detail-row/tests/confirm-detail-row.component.test.js rename to ui/app/components/app/confirm-page-container/confirm-detail-row/tests/confirm-detail-row.component.test.js diff --git a/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js b/ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js similarity index 96% rename from ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js rename to ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js index 1dca81560..8a5f90c76 100644 --- a/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js +++ b/ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js @@ -1,9 +1,9 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' -import { Tabs, Tab } from '../../tabs' -import { ConfirmPageContainerSummary, ConfirmPageContainerWarning } from './' -import ErrorMessage from '../../error-message' +import { Tabs, Tab } from '../../../ui/tabs' +import { ConfirmPageContainerSummary, ConfirmPageContainerWarning } from '.' +import ErrorMessage from '../../../ui/error-message' export default class ConfirmPageContainerContent extends Component { static propTypes = { diff --git a/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/confirm-page-container-summary.component.js b/ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/confirm-page-container-summary.component.js similarity index 97% rename from ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/confirm-page-container-summary.component.js rename to ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/confirm-page-container-summary.component.js index 89ceb015f..0cc4d8262 100644 --- a/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/confirm-page-container-summary.component.js +++ b/ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/confirm-page-container-summary.component.js @@ -1,7 +1,7 @@ import React from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' -import Identicon from '../../../identicon' +import Identicon from '../../../../ui/identicon' const ConfirmPageContainerSummary = props => { const { diff --git a/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/index.js b/ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/index.js similarity index 100% rename from ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/index.js rename to ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/index.js diff --git a/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/index.scss b/ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/index.scss similarity index 100% rename from ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/index.scss rename to ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/index.scss diff --git a/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/confirm-page-container-warning.component.js b/ui/app/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/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/confirm-page-container-warning.component.js rename to ui/app/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/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.js b/ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.js similarity index 100% rename from ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.js rename to ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.js diff --git a/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.scss b/ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.scss similarity index 100% rename from ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.scss rename to ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.scss diff --git a/ui/app/components/confirm-page-container/confirm-page-container-content/index.js b/ui/app/components/app/confirm-page-container/confirm-page-container-content/index.js similarity index 100% rename from ui/app/components/confirm-page-container/confirm-page-container-content/index.js rename to ui/app/components/app/confirm-page-container/confirm-page-container-content/index.js diff --git a/ui/app/components/confirm-page-container/confirm-page-container-content/index.scss b/ui/app/components/app/confirm-page-container/confirm-page-container-content/index.scss similarity index 91% rename from ui/app/components/confirm-page-container/confirm-page-container-content/index.scss rename to ui/app/components/app/confirm-page-container/confirm-page-container-content/index.scss index 78639a435..602a46848 100644 --- a/ui/app/components/confirm-page-container/confirm-page-container-content/index.scss +++ b/ui/app/components/app/confirm-page-container/confirm-page-container-content/index.scss @@ -1,6 +1,6 @@ -@import './confirm-page-container-warning/index'; +@import 'confirm-page-container-warning/index'; -@import './confirm-page-container-summary/index'; +@import 'confirm-page-container-summary/index'; .confirm-page-container-content { overflow-y: auto; diff --git a/ui/app/components/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.js b/ui/app/components/app/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.js similarity index 96% rename from ui/app/components/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.js rename to ui/app/components/app/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.js index e6fe8f82c..84ca40da5 100644 --- a/ui/app/components/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.js +++ b/ui/app/components/app/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types' import { ENVIRONMENT_TYPE_POPUP, ENVIRONMENT_TYPE_NOTIFICATION, -} from '../../../../../app/scripts/lib/enums' +} from '../../../../../../app/scripts/lib/enums' import NetworkDisplay from '../../network-display' export default class ConfirmPageContainer extends Component { diff --git a/ui/app/components/confirm-page-container/confirm-page-container-header/index.js b/ui/app/components/app/confirm-page-container/confirm-page-container-header/index.js similarity index 100% rename from ui/app/components/confirm-page-container/confirm-page-container-header/index.js rename to ui/app/components/app/confirm-page-container/confirm-page-container-header/index.js diff --git a/ui/app/components/confirm-page-container/confirm-page-container-header/index.scss b/ui/app/components/app/confirm-page-container/confirm-page-container-header/index.scss similarity index 100% rename from ui/app/components/confirm-page-container/confirm-page-container-header/index.scss rename to ui/app/components/app/confirm-page-container/confirm-page-container-header/index.scss diff --git a/ui/app/components/confirm-page-container/confirm-page-container-navigation/confirm-page-container-navigation.component.js b/ui/app/components/app/confirm-page-container/confirm-page-container-navigation/confirm-page-container-navigation.component.js similarity index 100% rename from ui/app/components/confirm-page-container/confirm-page-container-navigation/confirm-page-container-navigation.component.js rename to ui/app/components/app/confirm-page-container/confirm-page-container-navigation/confirm-page-container-navigation.component.js diff --git a/ui/app/components/confirm-page-container/confirm-page-container-navigation/index.js b/ui/app/components/app/confirm-page-container/confirm-page-container-navigation/index.js similarity index 100% rename from ui/app/components/confirm-page-container/confirm-page-container-navigation/index.js rename to ui/app/components/app/confirm-page-container/confirm-page-container-navigation/index.js diff --git a/ui/app/components/confirm-page-container/confirm-page-container-navigation/index.scss b/ui/app/components/app/confirm-page-container/confirm-page-container-navigation/index.scss similarity index 100% rename from ui/app/components/confirm-page-container/confirm-page-container-navigation/index.scss rename to ui/app/components/app/confirm-page-container/confirm-page-container-navigation/index.scss diff --git a/ui/app/components/confirm-page-container/confirm-page-container.component.js b/ui/app/components/app/confirm-page-container/confirm-page-container.component.js similarity index 96% rename from ui/app/components/confirm-page-container/confirm-page-container.component.js rename to ui/app/components/app/confirm-page-container/confirm-page-container.component.js index 10edf3b16..326e4f83e 100644 --- a/ui/app/components/confirm-page-container/confirm-page-container.component.js +++ b/ui/app/components/app/confirm-page-container/confirm-page-container.component.js @@ -1,8 +1,8 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' -import SenderToRecipient from '../sender-to-recipient' -import { PageContainerFooter } from '../page-container' -import { ConfirmPageContainerHeader, ConfirmPageContainerContent, ConfirmPageContainerNavigation } from './' +import SenderToRecipient from '../../ui/sender-to-recipient' +import { PageContainerFooter } from '../../ui/page-container' +import { ConfirmPageContainerHeader, ConfirmPageContainerContent, ConfirmPageContainerNavigation } from '.' export default class ConfirmPageContainer extends Component { static contextTypes = { diff --git a/ui/app/components/confirm-page-container/index.js b/ui/app/components/app/confirm-page-container/index.js similarity index 100% rename from ui/app/components/confirm-page-container/index.js rename to ui/app/components/app/confirm-page-container/index.js diff --git a/ui/app/components/app/confirm-page-container/index.scss b/ui/app/components/app/confirm-page-container/index.scss new file mode 100644 index 000000000..c0277eff5 --- /dev/null +++ b/ui/app/components/app/confirm-page-container/index.scss @@ -0,0 +1,7 @@ +@import 'confirm-page-container-content/index'; + +@import 'confirm-page-container-header/index'; + +@import 'confirm-detail-row/index'; + +@import 'confirm-page-container-navigation/index'; diff --git a/ui/app/components/copyable.js b/ui/app/components/app/copyable.js similarity index 96% rename from ui/app/components/copyable.js rename to ui/app/components/app/copyable.js index ad504deb8..6869d674d 100644 --- a/ui/app/components/copyable.js +++ b/ui/app/components/app/copyable.js @@ -3,7 +3,7 @@ const PropTypes = require('prop-types') const h = require('react-hyperscript') const inherits = require('util').inherits -const Tooltip = require('./tooltip') +const Tooltip = require('../ui/tooltip') const copyToClipboard = require('copy-to-clipboard') const connect = require('react-redux').connect diff --git a/ui/app/components/customize-gas-modal/gas-modal-card.js b/ui/app/components/app/customize-gas-modal/gas-modal-card.js similarity index 100% rename from ui/app/components/customize-gas-modal/gas-modal-card.js rename to ui/app/components/app/customize-gas-modal/gas-modal-card.js diff --git a/ui/app/components/customize-gas-modal/gas-slider.js b/ui/app/components/app/customize-gas-modal/gas-slider.js similarity index 100% rename from ui/app/components/customize-gas-modal/gas-slider.js rename to ui/app/components/app/customize-gas-modal/gas-slider.js diff --git a/ui/app/components/customize-gas-modal/index.js b/ui/app/components/app/customize-gas-modal/index.js similarity index 97% rename from ui/app/components/customize-gas-modal/index.js rename to ui/app/components/app/customize-gas-modal/index.js index fd660ead2..dca77bb00 100644 --- a/ui/app/components/customize-gas-modal/index.js +++ b/ui/app/components/app/customize-gas-modal/index.js @@ -4,15 +4,15 @@ const h = require('react-hyperscript') const inherits = require('util').inherits const connect = require('react-redux').connect const BigNumber = require('bignumber.js') -const actions = require('../../actions') +const actions = require('../../../store/actions') const GasModalCard = require('./gas-modal-card') -import Button from '../button' +import Button from '../../ui/button' const ethUtil = require('ethereumjs-util') import { updateSendErrors, -} from '../../ducks/send.duck' +} from '../../../ducks/send/send.duck' const { MIN_GAS_PRICE_DEC, @@ -30,7 +30,7 @@ const { conversionGreaterThan, conversionMax, subtractCurrencies, -} = require('../../conversion-util') +} = require('../../../helpers/utils/conversion-util') const { getGasIsLoading, @@ -42,7 +42,7 @@ const { getCurrentAccountWithSendEtherInfo, getSelectedTokenToFiatRate, getSendMaxModeState, -} = require('../../selectors') +} = require('../../../selectors/selectors') const { getGasPrice, diff --git a/ui/app/components/dropdowns/account-details-dropdown.js b/ui/app/components/app/dropdowns/account-details-dropdown.js similarity index 95% rename from ui/app/components/dropdowns/account-details-dropdown.js rename to ui/app/components/app/dropdowns/account-details-dropdown.js index bda8b9517..3d4598946 100644 --- a/ui/app/components/dropdowns/account-details-dropdown.js +++ b/ui/app/components/app/dropdowns/account-details-dropdown.js @@ -3,9 +3,9 @@ const PropTypes = require('prop-types') const h = require('react-hyperscript') const inherits = require('util').inherits const connect = require('react-redux').connect -const actions = require('../../actions') -const { getSelectedIdentity } = require('../../selectors') -const genAccountLink = require('../../../lib/account-link.js') +const actions = require('../../../store/actions') +const { getSelectedIdentity } = require('../../../selectors/selectors') +const genAccountLink = require('../../../../lib/account-link.js') const { Menu, Item, CloseArea } = require('./components/menu') AccountDetailsDropdown.contextTypes = { diff --git a/ui/app/components/dropdowns/components/account-dropdowns.js b/ui/app/components/app/dropdowns/components/account-dropdowns.js similarity index 97% rename from ui/app/components/dropdowns/components/account-dropdowns.js rename to ui/app/components/app/dropdowns/components/account-dropdowns.js index e6b3e0c0c..c603a9a9f 100644 --- a/ui/app/components/dropdowns/components/account-dropdowns.js +++ b/ui/app/components/app/dropdowns/components/account-dropdowns.js @@ -1,15 +1,15 @@ const Component = require('react').Component const PropTypes = require('prop-types') const h = require('react-hyperscript') -const actions = require('../../../actions') -const genAccountLink = require('../../../../lib/account-link.js') +const actions = require('../../../../store/actions') +const genAccountLink = require('../../../../../lib/account-link.js') const connect = require('react-redux').connect const Dropdown = require('./dropdown').Dropdown const DropdownMenuItem = require('./dropdown').DropdownMenuItem -import Identicon from '../../identicon' -const { checksumAddress } = require('../../../util') +import Identicon from '../../../ui/identicon' +const { checksumAddress } = require('../../../../helpers/utils/util') const copyToClipboard = require('copy-to-clipboard') -const { formatBalance } = require('../../../util') +const { formatBalance } = require('../../../../helpers/utils/util') class AccountDropdowns extends Component { diff --git a/ui/app/components/dropdowns/components/dropdown.js b/ui/app/components/app/dropdowns/components/dropdown.js similarity index 100% rename from ui/app/components/dropdowns/components/dropdown.js rename to ui/app/components/app/dropdowns/components/dropdown.js diff --git a/ui/app/components/dropdowns/components/menu.js b/ui/app/components/app/dropdowns/components/menu.js similarity index 100% rename from ui/app/components/dropdowns/components/menu.js rename to ui/app/components/app/dropdowns/components/menu.js diff --git a/ui/app/components/dropdowns/components/network-dropdown-icon.js b/ui/app/components/app/dropdowns/components/network-dropdown-icon.js similarity index 100% rename from ui/app/components/dropdowns/components/network-dropdown-icon.js rename to ui/app/components/app/dropdowns/components/network-dropdown-icon.js diff --git a/ui/app/components/dropdowns/index.js b/ui/app/components/app/dropdowns/index.js similarity index 100% rename from ui/app/components/dropdowns/index.js rename to ui/app/components/app/dropdowns/index.js diff --git a/ui/app/components/dropdowns/network-dropdown.js b/ui/app/components/app/dropdowns/network-dropdown.js similarity index 98% rename from ui/app/components/dropdowns/network-dropdown.js rename to ui/app/components/app/dropdowns/network-dropdown.js index 90355a97c..fcc7a8681 100644 --- a/ui/app/components/dropdowns/network-dropdown.js +++ b/ui/app/components/app/dropdowns/network-dropdown.js @@ -5,12 +5,12 @@ const inherits = require('util').inherits const connect = require('react-redux').connect const { withRouter } = require('react-router-dom') const { compose } = require('recompose') -const actions = require('../../actions') +const actions = require('../../../store/actions') const Dropdown = require('./components/dropdown').Dropdown const DropdownMenuItem = require('./components/dropdown').DropdownMenuItem const NetworkDropdownIcon = require('./components/network-dropdown-icon') const R = require('ramda') -const { SETTINGS_ROUTE } = require('../../routes') +const { SETTINGS_ROUTE } = require('../../../helpers/constants/routes') // classes from nodes of the toggle element. const notToggleElementClassnames = [ diff --git a/ui/app/components/dropdowns/simple-dropdown.js b/ui/app/components/app/dropdowns/simple-dropdown.js similarity index 100% rename from ui/app/components/dropdowns/simple-dropdown.js rename to ui/app/components/app/dropdowns/simple-dropdown.js diff --git a/ui/app/components/dropdowns/tests/dropdown.test.js b/ui/app/components/app/dropdowns/tests/dropdown.test.js similarity index 100% rename from ui/app/components/dropdowns/tests/dropdown.test.js rename to ui/app/components/app/dropdowns/tests/dropdown.test.js diff --git a/ui/app/components/dropdowns/tests/menu.test.js b/ui/app/components/app/dropdowns/tests/menu.test.js similarity index 100% rename from ui/app/components/dropdowns/tests/menu.test.js rename to ui/app/components/app/dropdowns/tests/menu.test.js diff --git a/ui/app/components/dropdowns/tests/network-dropdown-icon.test.js b/ui/app/components/app/dropdowns/tests/network-dropdown-icon.test.js similarity index 100% rename from ui/app/components/dropdowns/tests/network-dropdown-icon.test.js rename to ui/app/components/app/dropdowns/tests/network-dropdown-icon.test.js diff --git a/ui/app/components/dropdowns/tests/network-dropdown.test.js b/ui/app/components/app/dropdowns/tests/network-dropdown.test.js similarity index 97% rename from ui/app/components/dropdowns/tests/network-dropdown.test.js rename to ui/app/components/app/dropdowns/tests/network-dropdown.test.js index 88ad56851..91e7899a7 100644 --- a/ui/app/components/dropdowns/tests/network-dropdown.test.js +++ b/ui/app/components/app/dropdowns/tests/network-dropdown.test.js @@ -1,7 +1,7 @@ import React from 'react' import assert from 'assert' import { createMockStore } from 'redux-test-utils' -import { mountWithRouter } from '../../../../../test/lib/render-helpers' +import { mountWithRouter } from '../../../../../../test/lib/render-helpers' import NetworkDropdown from '../network-dropdown' import { DropdownMenuItem } from '../components/dropdown' import NetworkDropdownIcon from '../components/network-dropdown-icon' diff --git a/ui/app/components/dropdowns/token-menu-dropdown.js b/ui/app/components/app/dropdowns/token-menu-dropdown.js similarity index 97% rename from ui/app/components/dropdowns/token-menu-dropdown.js rename to ui/app/components/app/dropdowns/token-menu-dropdown.js index 8a072b1bc..e2730aea2 100644 --- a/ui/app/components/dropdowns/token-menu-dropdown.js +++ b/ui/app/components/app/dropdowns/token-menu-dropdown.js @@ -3,7 +3,7 @@ const PropTypes = require('prop-types') const h = require('react-hyperscript') const inherits = require('util').inherits const connect = require('react-redux').connect -const actions = require('../../actions') +const actions = require('../../../store/actions') const genAccountLink = require('etherscan-link').createAccountLink const { Menu, Item, CloseArea } = require('./components/menu') diff --git a/ui/app/components/ens-input.js b/ui/app/components/app/ens-input.js similarity index 98% rename from ui/app/components/ens-input.js rename to ui/app/components/app/ens-input.js index a9167e3b2..274058a1b 100644 --- a/ui/app/components/ens-input.js +++ b/ui/app/components/app/ens-input.js @@ -12,7 +12,7 @@ const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000' const connect = require('react-redux').connect const ToAutoComplete = require('./send/to-autocomplete').default const log = require('loglevel') -const { isValidENSAddress } = require('../util') +const { isValidENSAddress } = require('../../helpers/utils/util') EnsInput.contextTypes = { t: PropTypes.func, diff --git a/ui/app/components/gas-customization/advanced-gas-inputs/advanced-gas-inputs.component.js b/ui/app/components/app/gas-customization/advanced-gas-inputs/advanced-gas-inputs.component.js similarity index 100% rename from ui/app/components/gas-customization/advanced-gas-inputs/advanced-gas-inputs.component.js rename to ui/app/components/app/gas-customization/advanced-gas-inputs/advanced-gas-inputs.component.js diff --git a/ui/app/components/gas-customization/advanced-gas-inputs/advanced-gas-inputs.container.js b/ui/app/components/app/gas-customization/advanced-gas-inputs/advanced-gas-inputs.container.js similarity index 92% rename from ui/app/components/gas-customization/advanced-gas-inputs/advanced-gas-inputs.container.js rename to ui/app/components/app/gas-customization/advanced-gas-inputs/advanced-gas-inputs.container.js index a71d37b43..90fef1a1b 100644 --- a/ui/app/components/gas-customization/advanced-gas-inputs/advanced-gas-inputs.container.js +++ b/ui/app/components/app/gas-customization/advanced-gas-inputs/advanced-gas-inputs.container.js @@ -1,10 +1,10 @@ import { connect } from 'react-redux' -import { showModal } from '../../../actions' +import { showModal } from '../../../../store/actions' import { decGWEIToHexWEI, decimalToHex, hexWEIToDecGWEI, -} from '../../../helpers/conversions.util' +} from '../../../../helpers/utils/conversions.util' import AdvancedGasInputs from './advanced-gas-inputs.component' function convertGasPriceForInputs (gasPriceInHexWEI) { diff --git a/ui/app/components/gas-customization/advanced-gas-inputs/index.js b/ui/app/components/app/gas-customization/advanced-gas-inputs/index.js similarity index 100% rename from ui/app/components/gas-customization/advanced-gas-inputs/index.js rename to ui/app/components/app/gas-customization/advanced-gas-inputs/index.js diff --git a/ui/app/components/gas-customization/advanced-gas-inputs/index.scss b/ui/app/components/app/gas-customization/advanced-gas-inputs/index.scss similarity index 100% rename from ui/app/components/gas-customization/advanced-gas-inputs/index.scss rename to ui/app/components/app/gas-customization/advanced-gas-inputs/index.scss diff --git a/ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content.component.js b/ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content.component.js similarity index 99% rename from ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content.component.js rename to ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content.component.js index a3a3f96d8..7fbf8f0bd 100644 --- a/ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content.component.js +++ b/ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content.component.js @@ -1,7 +1,7 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' -import Loading from '../../../loading-screen' +import Loading from '../../../../ui/loading-screen' import GasPriceChart from '../../gas-price-chart' import debounce from 'lodash.debounce' diff --git a/ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/index.js b/ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/index.js similarity index 100% rename from ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/index.js rename to ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/index.js diff --git a/ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/index.scss b/ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/index.scss similarity index 100% rename from ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/index.scss rename to ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/index.scss diff --git a/ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/tests/advanced-tab-content-component.test.js b/ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/tests/advanced-tab-content-component.test.js similarity index 99% rename from ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/tests/advanced-tab-content-component.test.js rename to ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/tests/advanced-tab-content-component.test.js index 2500ee267..a6b81d2ce 100644 --- a/ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/tests/advanced-tab-content-component.test.js +++ b/ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/tests/advanced-tab-content-component.test.js @@ -1,11 +1,11 @@ import React from 'react' import assert from 'assert' -import shallow from '../../../../../../lib/shallow-with-context' +import shallow from '../../../../../../../lib/shallow-with-context' import sinon from 'sinon' import AdvancedTabContent from '../advanced-tab-content.component.js' import GasPriceChart from '../../../gas-price-chart' -import Loading from '../../../../loading-screen' +import Loading from '../../../../../ui/loading-screen' const propsMethodSpies = { updateCustomGasPrice: sinon.spy(), diff --git a/ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/time-remaining/index.js b/ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/time-remaining/index.js similarity index 100% rename from ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/time-remaining/index.js rename to ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/time-remaining/index.js diff --git a/ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/time-remaining/index.scss b/ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/time-remaining/index.scss similarity index 100% rename from ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/time-remaining/index.scss rename to ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/time-remaining/index.scss diff --git a/ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/time-remaining/tests/time-remaining-component.test.js b/ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/time-remaining/tests/time-remaining-component.test.js similarity index 92% rename from ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/time-remaining/tests/time-remaining-component.test.js rename to ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/time-remaining/tests/time-remaining-component.test.js index d8490272f..17f0345d5 100644 --- a/ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/time-remaining/tests/time-remaining-component.test.js +++ b/ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/time-remaining/tests/time-remaining-component.test.js @@ -1,6 +1,6 @@ import React from 'react' import assert from 'assert' -import shallow from '../../../../../../../lib/shallow-with-context' +import shallow from '../../../../../../../../lib/shallow-with-context' import TimeRemaining from '../time-remaining.component.js' describe('TimeRemaining Component', function () { diff --git a/ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/time-remaining/time-remaining.component.js b/ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/time-remaining/time-remaining.component.js similarity index 100% rename from ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/time-remaining/time-remaining.component.js rename to ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/time-remaining/time-remaining.component.js diff --git a/ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/time-remaining/time-remaining.utils.js b/ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/time-remaining/time-remaining.utils.js similarity index 100% rename from ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/time-remaining/time-remaining.utils.js rename to ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/time-remaining/time-remaining.utils.js diff --git a/ui/app/components/gas-customization/gas-modal-page-container/basic-tab-content/basic-tab-content.component.js b/ui/app/components/app/gas-customization/gas-modal-page-container/basic-tab-content/basic-tab-content.component.js similarity index 95% rename from ui/app/components/gas-customization/gas-modal-page-container/basic-tab-content/basic-tab-content.component.js rename to ui/app/components/app/gas-customization/gas-modal-page-container/basic-tab-content/basic-tab-content.component.js index 05b8f700b..5f3925fa5 100644 --- a/ui/app/components/gas-customization/gas-modal-page-container/basic-tab-content/basic-tab-content.component.js +++ b/ui/app/components/app/gas-customization/gas-modal-page-container/basic-tab-content/basic-tab-content.component.js @@ -1,6 +1,6 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' -import Loading from '../../../loading-screen' +import Loading from '../../../../ui/loading-screen' import GasPriceButtonGroup from '../../gas-price-button-group' export default class BasicTabContent extends Component { diff --git a/ui/app/components/gas-customization/gas-modal-page-container/basic-tab-content/index.js b/ui/app/components/app/gas-customization/gas-modal-page-container/basic-tab-content/index.js similarity index 100% rename from ui/app/components/gas-customization/gas-modal-page-container/basic-tab-content/index.js rename to ui/app/components/app/gas-customization/gas-modal-page-container/basic-tab-content/index.js diff --git a/ui/app/components/gas-customization/gas-modal-page-container/basic-tab-content/index.scss b/ui/app/components/app/gas-customization/gas-modal-page-container/basic-tab-content/index.scss similarity index 100% rename from ui/app/components/gas-customization/gas-modal-page-container/basic-tab-content/index.scss rename to ui/app/components/app/gas-customization/gas-modal-page-container/basic-tab-content/index.scss diff --git a/ui/app/components/gas-customization/gas-modal-page-container/basic-tab-content/tests/basic-tab-content-component.test.js b/ui/app/components/app/gas-customization/gas-modal-page-container/basic-tab-content/tests/basic-tab-content-component.test.js similarity index 95% rename from ui/app/components/gas-customization/gas-modal-page-container/basic-tab-content/tests/basic-tab-content-component.test.js rename to ui/app/components/app/gas-customization/gas-modal-page-container/basic-tab-content/tests/basic-tab-content-component.test.js index 47864fcab..0989ac677 100644 --- a/ui/app/components/gas-customization/gas-modal-page-container/basic-tab-content/tests/basic-tab-content-component.test.js +++ b/ui/app/components/app/gas-customization/gas-modal-page-container/basic-tab-content/tests/basic-tab-content-component.test.js @@ -1,10 +1,10 @@ import React from 'react' import assert from 'assert' -import shallow from '../../../../../../lib/shallow-with-context' +import shallow from '../../../../../../../lib/shallow-with-context' import BasicTabContent from '../basic-tab-content.component' -import GasPriceButtonGroup from '../../../gas-price-button-group/' -import Loading from '../../../../loading-screen' +import GasPriceButtonGroup from '../../../gas-price-button-group' +import Loading from '../../../../../ui/loading-screen' const mockGasPriceButtonGroupProps = { buttonDataLoading: false, diff --git a/ui/app/components/gas-customization/gas-modal-page-container/gas-modal-page-container.component.js b/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.component.js similarity index 98% rename from ui/app/components/gas-customization/gas-modal-page-container/gas-modal-page-container.component.js rename to ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.component.js index 174bd8ea8..76edbc334 100644 --- a/ui/app/components/gas-customization/gas-modal-page-container/gas-modal-page-container.component.js +++ b/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.component.js @@ -1,7 +1,7 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' -import PageContainer from '../../page-container' -import { Tabs, Tab } from '../../tabs' +import PageContainer from '../../../ui/page-container' +import { Tabs, Tab } from '../../../ui/tabs' import AdvancedTabContent from './advanced-tab-content' import BasicTabContent from './basic-tab-content' diff --git a/ui/app/components/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js b/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js similarity index 94% rename from ui/app/components/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js rename to ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js index 6692fb363..cbc1e3e96 100644 --- a/ui/app/components/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js +++ b/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js @@ -7,7 +7,7 @@ import { setGasPrice, createSpeedUpTransaction, hideSidebar, -} from '../../../actions' +} from '../../../../store/actions' import { setCustomGasPrice, setCustomGasLimit, @@ -15,19 +15,19 @@ import { setCustomTimeEstimate, fetchGasEstimates, fetchBasicGasAndTimeEstimates, -} from '../../../ducks/gas.duck' +} from '../../../../ducks/gas/gas.duck' import { hideGasButtonGroup, -} from '../../../ducks/send.duck' +} from '../../../../ducks/send/send.duck' import { updateGasAndCalculate, -} from '../../../ducks/confirm-transaction.duck' +} from '../../../../ducks/confirm-transaction/confirm-transaction.duck' import { getCurrentCurrency, conversionRateSelector as getConversionRate, getSelectedToken, getCurrentEthBalance, -} from '../../../selectors.js' +} from '../../../../selectors/selectors.js' import { formatTimeEstimate, getFastPriceEstimateInHexWEI, @@ -41,29 +41,29 @@ import { getRenderableBasicEstimateData, getBasicGasEstimateBlockTime, isCustomPriceSafe, -} from '../../../selectors/custom-gas' +} from '../../../../selectors/custom-gas' import { submittedPendingTransactionsSelector, -} from '../../../selectors/transactions' +} from '../../../../selectors/transactions' import { formatCurrency, -} from '../../../helpers/confirm-transaction/util' +} from '../../../../helpers/utils/confirm-tx.util' import { addHexWEIsToDec, decEthToConvertedCurrency as ethTotalToConvertedCurrency, decGWEIToHexWEI, hexWEIToDecGWEI, -} from '../../../helpers/conversions.util' +} from '../../../../helpers/utils/conversions.util' import { formatETHFee, -} from '../../../helpers/formatters' +} from '../../../../helpers/utils/formatters' import { calcGasTotal, isBalanceSufficient, } from '../../send/send.utils' import { addHexPrefix } from 'ethereumjs-util' import { getAdjacentGasPrices, extrapolateY } from '../gas-price-chart/gas-price-chart.utils' -import {getIsMainnet, preferencesSelector} from '../../../selectors' +import {getIsMainnet, preferencesSelector} from '../../../../selectors/selectors' const mapStateToProps = (state, ownProps) => { const { transaction = {} } = ownProps diff --git a/ui/app/components/gas-customization/gas-modal-page-container/index.js b/ui/app/components/app/gas-customization/gas-modal-page-container/index.js similarity index 100% rename from ui/app/components/gas-customization/gas-modal-page-container/index.js rename to ui/app/components/app/gas-customization/gas-modal-page-container/index.js diff --git a/ui/app/components/gas-customization/gas-modal-page-container/index.scss b/ui/app/components/app/gas-customization/gas-modal-page-container/index.scss similarity index 100% rename from ui/app/components/gas-customization/gas-modal-page-container/index.scss rename to ui/app/components/app/gas-customization/gas-modal-page-container/index.scss diff --git a/ui/app/components/gas-customization/gas-modal-page-container/tests/gas-modal-page-container-component.test.js b/ui/app/components/app/gas-customization/gas-modal-page-container/tests/gas-modal-page-container-component.test.js similarity index 97% rename from ui/app/components/gas-customization/gas-modal-page-container/tests/gas-modal-page-container-component.test.js rename to ui/app/components/app/gas-customization/gas-modal-page-container/tests/gas-modal-page-container-component.test.js index 1761ad2b0..7557eefe5 100644 --- a/ui/app/components/gas-customization/gas-modal-page-container/tests/gas-modal-page-container-component.test.js +++ b/ui/app/components/app/gas-customization/gas-modal-page-container/tests/gas-modal-page-container-component.test.js @@ -1,13 +1,13 @@ import React from 'react' import assert from 'assert' -import shallow from '../../../../../lib/shallow-with-context' +import shallow from '../../../../../../lib/shallow-with-context' import sinon from 'sinon' import GasModalPageContainer from '../gas-modal-page-container.component.js' -import timeout from '../../../../../lib/test-timeout' +import timeout from '../../../../../../lib/test-timeout' -import PageContainer from '../../../page-container' +import PageContainer from '../../../../ui/page-container' -import { Tab } from '../../../tabs' +import { Tab } from '../../../../ui/tabs' const mockBasicGasEstimates = { blockTime: 'mockBlockTime', diff --git a/ui/app/components/gas-customization/gas-modal-page-container/tests/gas-modal-page-container-container.test.js b/ui/app/components/app/gas-customization/gas-modal-page-container/tests/gas-modal-page-container-container.test.js similarity index 97% rename from ui/app/components/gas-customization/gas-modal-page-container/tests/gas-modal-page-container-container.test.js rename to ui/app/components/app/gas-customization/gas-modal-page-container/tests/gas-modal-page-container-container.test.js index fb6a01fff..aaa4f1c41 100644 --- a/ui/app/components/gas-customization/gas-modal-page-container/tests/gas-modal-page-container-container.test.js +++ b/ui/app/components/app/gas-customization/gas-modal-page-container/tests/gas-modal-page-container-container.test.js @@ -35,16 +35,16 @@ proxyquire('../gas-modal-page-container.container.js', { return () => ({}) }, }, - '../../../selectors/custom-gas': { + '../../../../selectors/custom-gas': { getBasicGasEstimateLoadingStatus: (s) => `mockBasicGasEstimateLoadingStatus:${Object.keys(s).length}`, getRenderableBasicEstimateData: (s) => `mockRenderableBasicEstimateData:${Object.keys(s).length}`, getDefaultActiveButtonIndex: (a, b) => a + b, }, - '../../../actions': actionSpies, - '../../../ducks/gas.duck': gasActionSpies, - '../../../ducks/confirm-transaction.duck': confirmTransactionActionSpies, - '../../../ducks/send.duck': sendActionSpies, - '../../../selectors.js': { + '../../../../store/actions': actionSpies, + '../../../../ducks/gas/gas.duck': gasActionSpies, + '../../../../ducks/confirm-transaction/confirm-transaction.duck': confirmTransactionActionSpies, + '../../../../ducks/send/send.duck': sendActionSpies, + '../../../../selectors/selectors.js': { getCurrentEthBalance: (state) => state.metamask.balance || '0x0', }, }) diff --git a/ui/app/components/gas-customization/gas-price-button-group/gas-price-button-group.component.js b/ui/app/components/app/gas-customization/gas-price-button-group/gas-price-button-group.component.js similarity index 96% rename from ui/app/components/gas-customization/gas-price-button-group/gas-price-button-group.component.js rename to ui/app/components/app/gas-customization/gas-price-button-group/gas-price-button-group.component.js index 8ad063b21..0456f5262 100644 --- a/ui/app/components/gas-customization/gas-price-button-group/gas-price-button-group.component.js +++ b/ui/app/components/app/gas-customization/gas-price-button-group/gas-price-button-group.component.js @@ -1,7 +1,7 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' -import ButtonGroup from '../../button-group' -import Button from '../../button' +import ButtonGroup from '../../../ui/button-group' +import Button from '../../../ui/button' const GAS_OBJECT_PROPTYPES_SHAPE = { label: PropTypes.string, diff --git a/ui/app/components/gas-customization/gas-price-button-group/index.js b/ui/app/components/app/gas-customization/gas-price-button-group/index.js similarity index 100% rename from ui/app/components/gas-customization/gas-price-button-group/index.js rename to ui/app/components/app/gas-customization/gas-price-button-group/index.js diff --git a/ui/app/components/gas-customization/gas-price-button-group/index.scss b/ui/app/components/app/gas-customization/gas-price-button-group/index.scss similarity index 100% rename from ui/app/components/gas-customization/gas-price-button-group/index.scss rename to ui/app/components/app/gas-customization/gas-price-button-group/index.scss diff --git a/ui/app/components/gas-customization/gas-price-button-group/tests/gas-price-button-group-component.test.js b/ui/app/components/app/gas-customization/gas-price-button-group/tests/gas-price-button-group-component.test.js similarity index 98% rename from ui/app/components/gas-customization/gas-price-button-group/tests/gas-price-button-group-component.test.js rename to ui/app/components/app/gas-customization/gas-price-button-group/tests/gas-price-button-group-component.test.js index 79f74f8e4..37840a8a5 100644 --- a/ui/app/components/gas-customization/gas-price-button-group/tests/gas-price-button-group-component.test.js +++ b/ui/app/components/app/gas-customization/gas-price-button-group/tests/gas-price-button-group-component.test.js @@ -1,10 +1,10 @@ import React from 'react' import assert from 'assert' -import shallow from '../../../../../lib/shallow-with-context' +import shallow from '../../../../../../lib/shallow-with-context' import sinon from 'sinon' import GasPriceButtonGroup from '../gas-price-button-group.component' -import ButtonGroup from '../../../button-group/' +import ButtonGroup from '../../../../ui/button-group' const mockGasPriceButtonGroupProps = { buttonDataLoading: false, diff --git a/ui/app/components/gas-customization/gas-price-chart/gas-price-chart.component.js b/ui/app/components/app/gas-customization/gas-price-chart/gas-price-chart.component.js similarity index 100% rename from ui/app/components/gas-customization/gas-price-chart/gas-price-chart.component.js rename to ui/app/components/app/gas-customization/gas-price-chart/gas-price-chart.component.js diff --git a/ui/app/components/gas-customization/gas-price-chart/gas-price-chart.utils.js b/ui/app/components/app/gas-customization/gas-price-chart/gas-price-chart.utils.js similarity index 100% rename from ui/app/components/gas-customization/gas-price-chart/gas-price-chart.utils.js rename to ui/app/components/app/gas-customization/gas-price-chart/gas-price-chart.utils.js diff --git a/ui/app/components/gas-customization/gas-price-chart/index.js b/ui/app/components/app/gas-customization/gas-price-chart/index.js similarity index 100% rename from ui/app/components/gas-customization/gas-price-chart/index.js rename to ui/app/components/app/gas-customization/gas-price-chart/index.js diff --git a/ui/app/components/gas-customization/gas-price-chart/index.scss b/ui/app/components/app/gas-customization/gas-price-chart/index.scss similarity index 100% rename from ui/app/components/gas-customization/gas-price-chart/index.scss rename to ui/app/components/app/gas-customization/gas-price-chart/index.scss diff --git a/ui/app/components/gas-customization/gas-price-chart/tests/gas-price-chart.component.test.js b/ui/app/components/app/gas-customization/gas-price-chart/tests/gas-price-chart.component.test.js similarity index 99% rename from ui/app/components/gas-customization/gas-price-chart/tests/gas-price-chart.component.test.js rename to ui/app/components/app/gas-customization/gas-price-chart/tests/gas-price-chart.component.test.js index 74eddae42..7dec7a85f 100644 --- a/ui/app/components/gas-customization/gas-price-chart/tests/gas-price-chart.component.test.js +++ b/ui/app/components/app/gas-customization/gas-price-chart/tests/gas-price-chart.component.test.js @@ -2,7 +2,7 @@ import React from 'react' import assert from 'assert' import proxyquire from 'proxyquire' import sinon from 'sinon' -import shallow from '../../../../../lib/shallow-with-context' +import shallow from '../../../../../../lib/shallow-with-context' import * as d3 from 'd3' function timeout (time) { diff --git a/ui/app/components/gas-customization/gas-slider/gas-slider.component.js b/ui/app/components/app/gas-customization/gas-slider/gas-slider.component.js similarity index 100% rename from ui/app/components/gas-customization/gas-slider/gas-slider.component.js rename to ui/app/components/app/gas-customization/gas-slider/gas-slider.component.js diff --git a/ui/app/components/gas-customization/gas-slider/index.js b/ui/app/components/app/gas-customization/gas-slider/index.js similarity index 100% rename from ui/app/components/gas-customization/gas-slider/index.js rename to ui/app/components/app/gas-customization/gas-slider/index.js diff --git a/ui/app/components/gas-customization/gas-slider/index.scss b/ui/app/components/app/gas-customization/gas-slider/index.scss similarity index 100% rename from ui/app/components/gas-customization/gas-slider/index.scss rename to ui/app/components/app/gas-customization/gas-slider/index.scss diff --git a/ui/app/components/gas-customization/gas.selectors.js b/ui/app/components/app/gas-customization/gas.selectors.js similarity index 100% rename from ui/app/components/gas-customization/gas.selectors.js rename to ui/app/components/app/gas-customization/gas.selectors.js diff --git a/ui/app/components/gas-customization/index.scss b/ui/app/components/app/gas-customization/index.scss similarity index 100% rename from ui/app/components/gas-customization/index.scss rename to ui/app/components/app/gas-customization/index.scss diff --git a/ui/app/components/app/index.scss b/ui/app/components/app/index.scss new file mode 100644 index 000000000..e9bb4ac9f --- /dev/null +++ b/ui/app/components/app/index.scss @@ -0,0 +1,81 @@ +@import 'account-menu/index'; + +@import 'add-token-button/index'; + +@import 'app-header/index'; + +@import '../ui/breadcrumbs/index'; + +@import '../ui/button-group/index'; + +@import '../ui/card/index'; + +@import 'confirm-page-container/index'; + +@import '../ui/currency-input/index'; + +@import '../ui/currency-display/index'; + +@import '../ui/error-message/index'; + +@import '../ui/export-text-container/index'; + +@import '../ui/identicon/index'; + +@import 'info-box/index'; + +@import 'menu-bar/index'; + +@import 'modal/index'; + +@import 'modals/index'; + +@import 'network-display/index'; + +@import '../ui/page-container/index'; + +@import '../../pages/index'; + +@import 'provider-page-container/index'; + +@import 'selected-account/index'; + +@import '../ui/sender-to-recipient/index'; + +@import '../ui/tabs/index'; + +@import '../ui/token-balance/index'; + +@import 'transaction-activity-log/index'; + +@import 'transaction-breakdown/index'; + +@import 'transaction-view/index'; + +@import 'transaction-view-balance/index'; + +@import 'transaction-list/index'; + +@import 'transaction-list-item/index'; + +@import 'transaction-list-item-details/index'; + +@import 'transaction-status/index'; + +@import 'app-header/index'; + +@import 'sidebars/index'; + +@import '../ui/unit-input/index'; + +@import 'gas-customization/gas-modal-page-container/index'; + +@import 'gas-customization/gas-modal-page-container/index'; + +@import 'gas-customization/gas-modal-page-container/index'; + +@import 'gas-customization/index'; + +@import 'gas-customization/gas-price-button-group/index'; + +@import 'ui-migration-annoucement/index'; diff --git a/ui/app/components/info-box/index.js b/ui/app/components/app/info-box/index.js similarity index 100% rename from ui/app/components/info-box/index.js rename to ui/app/components/app/info-box/index.js diff --git a/ui/app/components/info-box/index.scss b/ui/app/components/app/info-box/index.scss similarity index 100% rename from ui/app/components/info-box/index.scss rename to ui/app/components/app/info-box/index.scss diff --git a/ui/app/components/info-box/info-box.component.js b/ui/app/components/app/info-box/info-box.component.js similarity index 100% rename from ui/app/components/info-box/info-box.component.js rename to ui/app/components/app/info-box/info-box.component.js diff --git a/ui/app/components/input-number.js b/ui/app/components/app/input-number.js similarity index 97% rename from ui/app/components/input-number.js rename to ui/app/components/app/input-number.js index eec5e3740..8a6ec725c 100644 --- a/ui/app/components/input-number.js +++ b/ui/app/components/app/input-number.js @@ -6,7 +6,7 @@ const { conversionGTE, conversionLTE, subtractCurrencies, -} = require('../conversion-util') +} = require('../../helpers/utils/conversion-util') module.exports = InputNumber diff --git a/ui/app/components/loading-network-screen/index.js b/ui/app/components/app/loading-network-screen/index.js similarity index 100% rename from ui/app/components/loading-network-screen/index.js rename to ui/app/components/app/loading-network-screen/index.js diff --git a/ui/app/components/loading-network-screen/loading-network-screen.component.js b/ui/app/components/app/loading-network-screen/loading-network-screen.component.js similarity index 98% rename from ui/app/components/loading-network-screen/loading-network-screen.component.js rename to ui/app/components/app/loading-network-screen/loading-network-screen.component.js index bf1c141e0..348a997c8 100644 --- a/ui/app/components/loading-network-screen/loading-network-screen.component.js +++ b/ui/app/components/app/loading-network-screen/loading-network-screen.component.js @@ -1,7 +1,7 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' -import Spinner from '../spinner' -import Button from '../button' +import Spinner from '../../ui/spinner' +import Button from '../../ui/button' export default class LoadingNetworkScreen extends PureComponent { state = { diff --git a/ui/app/components/loading-network-screen/loading-network-screen.container.js b/ui/app/components/app/loading-network-screen/loading-network-screen.container.js similarity index 89% rename from ui/app/components/loading-network-screen/loading-network-screen.container.js rename to ui/app/components/app/loading-network-screen/loading-network-screen.container.js index d0623e574..87f1397ce 100644 --- a/ui/app/components/loading-network-screen/loading-network-screen.container.js +++ b/ui/app/components/app/loading-network-screen/loading-network-screen.container.js @@ -1,7 +1,7 @@ import { connect } from 'react-redux' import LoadingNetworkScreen from './loading-network-screen.component' -import actions from '../../actions' -import { getNetworkIdentifier } from '../../selectors' +import actions from '../../../store/actions' +import { getNetworkIdentifier } from '../../../selectors/selectors' const mapStateToProps = state => { const { diff --git a/ui/app/components/menu-bar/index.js b/ui/app/components/app/menu-bar/index.js similarity index 100% rename from ui/app/components/menu-bar/index.js rename to ui/app/components/app/menu-bar/index.js diff --git a/ui/app/components/menu-bar/index.scss b/ui/app/components/app/menu-bar/index.scss similarity index 100% rename from ui/app/components/menu-bar/index.scss rename to ui/app/components/app/menu-bar/index.scss diff --git a/ui/app/components/menu-bar/menu-bar.component.js b/ui/app/components/app/menu-bar/menu-bar.component.js similarity index 98% rename from ui/app/components/menu-bar/menu-bar.component.js rename to ui/app/components/app/menu-bar/menu-bar.component.js index 29c56953d..e37fddda4 100644 --- a/ui/app/components/menu-bar/menu-bar.component.js +++ b/ui/app/components/app/menu-bar/menu-bar.component.js @@ -1,6 +1,6 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' -import Tooltip from '../tooltip' +import Tooltip from '../../ui/tooltip' import SelectedAccount from '../selected-account' import AccountDetailsDropdown from '../dropdowns/account-details-dropdown.js' diff --git a/ui/app/components/menu-bar/menu-bar.container.js b/ui/app/components/app/menu-bar/menu-bar.container.js similarity index 90% rename from ui/app/components/menu-bar/menu-bar.container.js rename to ui/app/components/app/menu-bar/menu-bar.container.js index 0305f17d3..059263ff3 100644 --- a/ui/app/components/menu-bar/menu-bar.container.js +++ b/ui/app/components/app/menu-bar/menu-bar.container.js @@ -1,7 +1,7 @@ import { connect } from 'react-redux' import { WALLET_VIEW_SIDEBAR } from '../sidebars/sidebar.constants' import MenuBar from './menu-bar.component' -import { showSidebar, hideSidebar } from '../../actions' +import { showSidebar, hideSidebar } from '../../../store/actions' const mapStateToProps = state => { const { appState: { sidebar: { isOpen } } } = state diff --git a/ui/app/components/menu-droppo.js b/ui/app/components/app/menu-droppo.js similarity index 100% rename from ui/app/components/menu-droppo.js rename to ui/app/components/app/menu-droppo.js diff --git a/ui/app/components/modal/index.js b/ui/app/components/app/modal/index.js similarity index 100% rename from ui/app/components/modal/index.js rename to ui/app/components/app/modal/index.js diff --git a/ui/app/components/modal/index.scss b/ui/app/components/app/modal/index.scss similarity index 96% rename from ui/app/components/modal/index.scss rename to ui/app/components/app/modal/index.scss index 2beb14633..ec67d15fd 100644 --- a/ui/app/components/modal/index.scss +++ b/ui/app/components/app/modal/index.scss @@ -1,4 +1,4 @@ -@import './modal-content/index'; +@import 'modal-content/index'; .modal-container { width: 100%; diff --git a/ui/app/components/modal/modal-content/index.js b/ui/app/components/app/modal/modal-content/index.js similarity index 100% rename from ui/app/components/modal/modal-content/index.js rename to ui/app/components/app/modal/modal-content/index.js diff --git a/ui/app/components/modal/modal-content/index.scss b/ui/app/components/app/modal/modal-content/index.scss similarity index 100% rename from ui/app/components/modal/modal-content/index.scss rename to ui/app/components/app/modal/modal-content/index.scss diff --git a/ui/app/components/modal/modal-content/modal-content.component.js b/ui/app/components/app/modal/modal-content/modal-content.component.js similarity index 100% rename from ui/app/components/modal/modal-content/modal-content.component.js rename to ui/app/components/app/modal/modal-content/modal-content.component.js diff --git a/ui/app/components/modal/modal-content/tests/modal-content.component.test.js b/ui/app/components/app/modal/modal-content/tests/modal-content.component.test.js similarity index 100% rename from ui/app/components/modal/modal-content/tests/modal-content.component.test.js rename to ui/app/components/app/modal/modal-content/tests/modal-content.component.test.js diff --git a/ui/app/components/modal/modal.component.js b/ui/app/components/app/modal/modal.component.js similarity index 98% rename from ui/app/components/modal/modal.component.js rename to ui/app/components/app/modal/modal.component.js index c73f8d903..49e131b3c 100644 --- a/ui/app/components/modal/modal.component.js +++ b/ui/app/components/app/modal/modal.component.js @@ -1,6 +1,6 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' -import Button from '../button' +import Button from '../../ui/button' export default class Modal extends PureComponent { static propTypes = { diff --git a/ui/app/components/modal/tests/modal.component.test.js b/ui/app/components/app/modal/tests/modal.component.test.js similarity index 98% rename from ui/app/components/modal/tests/modal.component.test.js rename to ui/app/components/app/modal/tests/modal.component.test.js index 2ced3f32d..a13d7c06a 100644 --- a/ui/app/components/modal/tests/modal.component.test.js +++ b/ui/app/components/app/modal/tests/modal.component.test.js @@ -3,7 +3,7 @@ import assert from 'assert' import { mount, shallow } from 'enzyme' import sinon from 'sinon' import Modal from '../modal.component' -import Button from '../../button' +import Button from '../../../ui/button' describe('Modal Component', () => { it('should render a modal with a submit button', () => { diff --git a/ui/app/components/modals/account-details-modal.js b/ui/app/components/app/modals/account-details-modal.js similarity index 88% rename from ui/app/components/modals/account-details-modal.js rename to ui/app/components/app/modals/account-details-modal.js index 67d8eb0fd..94ed04df9 100644 --- a/ui/app/components/modals/account-details-modal.js +++ b/ui/app/components/app/modals/account-details-modal.js @@ -3,14 +3,14 @@ const PropTypes = require('prop-types') const h = require('react-hyperscript') const inherits = require('util').inherits const connect = require('react-redux').connect -const actions = require('../../actions') +const actions = require('../../../store/actions') const AccountModalContainer = require('./account-modal-container') -const { getSelectedIdentity } = require('../../selectors') -const genAccountLink = require('../../../lib/account-link.js') -const QrView = require('../qr-code') -const EditableLabel = require('../editable-label') +const { getSelectedIdentity } = require('../../../selectors/selectors') +const genAccountLink = require('../../../../lib/account-link.js') +const QrView = require('../../ui/qr-code') +const EditableLabel = require('../../ui/editable-label') -import Button from '../button' +import Button from '../../ui/button' function mapStateToProps (state) { return { diff --git a/ui/app/components/modals/account-modal-container.js b/ui/app/components/app/modals/account-modal-container.js similarity index 90% rename from ui/app/components/modals/account-modal-container.js rename to ui/app/components/app/modals/account-modal-container.js index 2a6c655e1..b7ae0b5b8 100644 --- a/ui/app/components/modals/account-modal-container.js +++ b/ui/app/components/app/modals/account-modal-container.js @@ -3,9 +3,9 @@ const PropTypes = require('prop-types') const h = require('react-hyperscript') const inherits = require('util').inherits const connect = require('react-redux').connect -const actions = require('../../actions') -const { getSelectedIdentity } = require('../../selectors') -import Identicon from '../identicon' +const actions = require('../../../store/actions') +const { getSelectedIdentity } = require('../../../selectors/selectors') +import Identicon from '../../ui/identicon' function mapStateToProps (state, ownProps) { return { diff --git a/ui/app/components/modals/buy-options-modal.js b/ui/app/components/app/modals/buy-options-modal.js similarity index 95% rename from ui/app/components/modals/buy-options-modal.js rename to ui/app/components/app/modals/buy-options-modal.js index c70510b5f..2df20e65c 100644 --- a/ui/app/components/modals/buy-options-modal.js +++ b/ui/app/components/app/modals/buy-options-modal.js @@ -3,8 +3,8 @@ const PropTypes = require('prop-types') const h = require('react-hyperscript') const inherits = require('util').inherits const connect = require('react-redux').connect -const actions = require('../../actions') -const { getNetworkDisplayName } = require('../../../../app/scripts/controllers/network/util') +const actions = require('../../../store/actions') +const { getNetworkDisplayName } = require('../../../../../app/scripts/controllers/network/util') function mapStateToProps (state) { return { diff --git a/ui/app/components/modals/cancel-transaction/cancel-transaction-gas-fee/cancel-transaction-gas-fee.component.js b/ui/app/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/cancel-transaction-gas-fee.component.js similarity index 90% rename from ui/app/components/modals/cancel-transaction/cancel-transaction-gas-fee/cancel-transaction-gas-fee.component.js rename to ui/app/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/cancel-transaction-gas-fee.component.js index b973f221c..beebb7ed7 100644 --- a/ui/app/components/modals/cancel-transaction/cancel-transaction-gas-fee/cancel-transaction-gas-fee.component.js +++ b/ui/app/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/cancel-transaction-gas-fee.component.js @@ -1,7 +1,7 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' import UserPreferencedCurrencyDisplay from '../../../user-preferenced-currency-display' -import { PRIMARY, SECONDARY } from '../../../../constants/common' +import { PRIMARY, SECONDARY } from '../../../../../helpers/constants/common' export default class CancelTransaction extends PureComponent { static propTypes = { diff --git a/ui/app/components/modals/cancel-transaction/cancel-transaction-gas-fee/index.js b/ui/app/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/index.js similarity index 100% rename from ui/app/components/modals/cancel-transaction/cancel-transaction-gas-fee/index.js rename to ui/app/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/index.js diff --git a/ui/app/components/modals/cancel-transaction/cancel-transaction-gas-fee/index.scss b/ui/app/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/index.scss similarity index 100% rename from ui/app/components/modals/cancel-transaction/cancel-transaction-gas-fee/index.scss rename to ui/app/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/index.scss diff --git a/ui/app/components/modals/cancel-transaction/cancel-transaction-gas-fee/tests/cancel-transaction-gas-fee.component.test.js b/ui/app/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/tests/cancel-transaction-gas-fee.component.test.js similarity index 100% rename from ui/app/components/modals/cancel-transaction/cancel-transaction-gas-fee/tests/cancel-transaction-gas-fee.component.test.js rename to ui/app/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/tests/cancel-transaction-gas-fee.component.test.js diff --git a/ui/app/components/modals/cancel-transaction/cancel-transaction.component.js b/ui/app/components/app/modals/cancel-transaction/cancel-transaction.component.js similarity index 96% rename from ui/app/components/modals/cancel-transaction/cancel-transaction.component.js rename to ui/app/components/app/modals/cancel-transaction/cancel-transaction.component.js index 8fd7b2679..6bab5ec1f 100644 --- a/ui/app/components/modals/cancel-transaction/cancel-transaction.component.js +++ b/ui/app/components/app/modals/cancel-transaction/cancel-transaction.component.js @@ -2,7 +2,7 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' import Modal from '../../modal' import CancelTransactionGasFee from './cancel-transaction-gas-fee' -import { SUBMITTED_STATUS } from '../../../constants/transactions' +import { SUBMITTED_STATUS } from '../../../../helpers/constants/transactions' export default class CancelTransaction extends PureComponent { static contextTypes = { diff --git a/ui/app/components/modals/cancel-transaction/cancel-transaction.container.js b/ui/app/components/app/modals/cancel-transaction/cancel-transaction.container.js similarity index 84% rename from ui/app/components/modals/cancel-transaction/cancel-transaction.container.js rename to ui/app/components/app/modals/cancel-transaction/cancel-transaction.container.js index 10931a001..6959889d9 100644 --- a/ui/app/components/modals/cancel-transaction/cancel-transaction.container.js +++ b/ui/app/components/app/modals/cancel-transaction/cancel-transaction.container.js @@ -1,11 +1,11 @@ import { connect } from 'react-redux' import { compose } from 'recompose' import ethUtil from 'ethereumjs-util' -import { multiplyCurrencies } from '../../../conversion-util' -import withModalProps from '../../../higher-order-components/with-modal-props' +import { multiplyCurrencies } from '../../../../helpers/utils/conversion-util' +import withModalProps from '../../../../helpers/higher-order-components/with-modal-props' import CancelTransaction from './cancel-transaction.component' -import { showModal, createCancelTransaction } from '../../../actions' -import { getHexGasTotal } from '../../../helpers/confirm-transaction/util' +import { showModal, createCancelTransaction } from '../../../../store/actions' +import { getHexGasTotal } from '../../../../helpers/utils/confirm-tx.util' const mapStateToProps = (state, ownProps) => { const { metamask } = state diff --git a/ui/app/components/modals/cancel-transaction/index.js b/ui/app/components/app/modals/cancel-transaction/index.js similarity index 100% rename from ui/app/components/modals/cancel-transaction/index.js rename to ui/app/components/app/modals/cancel-transaction/index.js diff --git a/ui/app/components/modals/cancel-transaction/index.scss b/ui/app/components/app/modals/cancel-transaction/index.scss similarity index 84% rename from ui/app/components/modals/cancel-transaction/index.scss rename to ui/app/components/app/modals/cancel-transaction/index.scss index 62e8e36fd..4ffb5a0f8 100644 --- a/ui/app/components/modals/cancel-transaction/index.scss +++ b/ui/app/components/app/modals/cancel-transaction/index.scss @@ -1,4 +1,4 @@ -@import './cancel-transaction-gas-fee/index'; +@import 'cancel-transaction-gas-fee/index'; .cancel-transaction { &__title { @@ -15,4 +15,4 @@ &__cancel-transaction-gas-fee-container { margin-bottom: 16px; } -} \ No newline at end of file +} diff --git a/ui/app/components/modals/cancel-transaction/tests/cancel-transaction.component.test.js b/ui/app/components/app/modals/cancel-transaction/tests/cancel-transaction.component.test.js similarity index 100% rename from ui/app/components/modals/cancel-transaction/tests/cancel-transaction.component.test.js rename to ui/app/components/app/modals/cancel-transaction/tests/cancel-transaction.component.test.js diff --git a/ui/app/components/modals/clear-approved-origins/clear-approved-origins.component.js b/ui/app/components/app/modals/clear-approved-origins/clear-approved-origins.component.js similarity index 100% rename from ui/app/components/modals/clear-approved-origins/clear-approved-origins.component.js rename to ui/app/components/app/modals/clear-approved-origins/clear-approved-origins.component.js diff --git a/ui/app/components/modals/clear-approved-origins/clear-approved-origins.container.js b/ui/app/components/app/modals/clear-approved-origins/clear-approved-origins.container.js similarity index 71% rename from ui/app/components/modals/clear-approved-origins/clear-approved-origins.container.js rename to ui/app/components/app/modals/clear-approved-origins/clear-approved-origins.container.js index 3a801a062..2276bc7e7 100644 --- a/ui/app/components/modals/clear-approved-origins/clear-approved-origins.container.js +++ b/ui/app/components/app/modals/clear-approved-origins/clear-approved-origins.container.js @@ -1,8 +1,8 @@ import { connect } from 'react-redux' import { compose } from 'recompose' -import withModalProps from '../../../higher-order-components/with-modal-props' +import withModalProps from '../../../../helpers/higher-order-components/with-modal-props' import ClearApprovedOriginsComponent from './clear-approved-origins.component' -import { clearApprovedOrigins } from '../../../actions' +import { clearApprovedOrigins } from '../../../../store/actions' const mapDispatchToProps = dispatch => { return { diff --git a/ui/app/components/modals/clear-approved-origins/index.js b/ui/app/components/app/modals/clear-approved-origins/index.js similarity index 100% rename from ui/app/components/modals/clear-approved-origins/index.js rename to ui/app/components/app/modals/clear-approved-origins/index.js diff --git a/ui/app/components/modals/confirm-remove-account/confirm-remove-account.component.js b/ui/app/components/app/modals/confirm-remove-account/confirm-remove-account.component.js similarity index 93% rename from ui/app/components/modals/confirm-remove-account/confirm-remove-account.component.js rename to ui/app/components/app/modals/confirm-remove-account/confirm-remove-account.component.js index 195c55421..f35fb85a0 100644 --- a/ui/app/components/modals/confirm-remove-account/confirm-remove-account.component.js +++ b/ui/app/components/app/modals/confirm-remove-account/confirm-remove-account.component.js @@ -1,9 +1,9 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' import Modal from '../../modal' -import { addressSummary } from '../../../util' -import Identicon from '../../identicon' -import genAccountLink from '../../../../lib/account-link' +import { addressSummary } from '../../../../helpers/utils/util' +import Identicon from '../../../ui/identicon' +import genAccountLink from '../../../../../lib/account-link' export default class ConfirmRemoveAccount extends Component { static propTypes = { diff --git a/ui/app/components/modals/confirm-remove-account/confirm-remove-account.container.js b/ui/app/components/app/modals/confirm-remove-account/confirm-remove-account.container.js similarity index 76% rename from ui/app/components/modals/confirm-remove-account/confirm-remove-account.container.js rename to ui/app/components/app/modals/confirm-remove-account/confirm-remove-account.container.js index 45c6654ab..0a3cda5b6 100644 --- a/ui/app/components/modals/confirm-remove-account/confirm-remove-account.container.js +++ b/ui/app/components/app/modals/confirm-remove-account/confirm-remove-account.container.js @@ -1,8 +1,8 @@ import { connect } from 'react-redux' import { compose } from 'recompose' import ConfirmRemoveAccount from './confirm-remove-account.component' -import withModalProps from '../../../higher-order-components/with-modal-props' -import { removeAccount } from '../../../actions' +import withModalProps from '../../../../helpers/higher-order-components/with-modal-props' +import { removeAccount } from '../../../../store/actions' const mapStateToProps = state => { return { diff --git a/ui/app/components/modals/confirm-remove-account/index.js b/ui/app/components/app/modals/confirm-remove-account/index.js similarity index 100% rename from ui/app/components/modals/confirm-remove-account/index.js rename to ui/app/components/app/modals/confirm-remove-account/index.js diff --git a/ui/app/components/modals/confirm-remove-account/index.scss b/ui/app/components/app/modals/confirm-remove-account/index.scss similarity index 100% rename from ui/app/components/modals/confirm-remove-account/index.scss rename to ui/app/components/app/modals/confirm-remove-account/index.scss diff --git a/ui/app/components/modals/confirm-reset-account/confirm-reset-account.component.js b/ui/app/components/app/modals/confirm-reset-account/confirm-reset-account.component.js similarity index 100% rename from ui/app/components/modals/confirm-reset-account/confirm-reset-account.component.js rename to ui/app/components/app/modals/confirm-reset-account/confirm-reset-account.component.js diff --git a/ui/app/components/modals/confirm-reset-account/confirm-reset-account.container.js b/ui/app/components/app/modals/confirm-reset-account/confirm-reset-account.container.js similarity index 70% rename from ui/app/components/modals/confirm-reset-account/confirm-reset-account.container.js rename to ui/app/components/app/modals/confirm-reset-account/confirm-reset-account.container.js index c8a7b8478..ffbd40d9d 100644 --- a/ui/app/components/modals/confirm-reset-account/confirm-reset-account.container.js +++ b/ui/app/components/app/modals/confirm-reset-account/confirm-reset-account.container.js @@ -1,8 +1,8 @@ import { connect } from 'react-redux' import { compose } from 'recompose' -import withModalProps from '../../../higher-order-components/with-modal-props' +import withModalProps from '../../../../helpers/higher-order-components/with-modal-props' import ConfirmResetAccount from './confirm-reset-account.component' -import { resetAccount } from '../../../actions' +import { resetAccount } from '../../../../store/actions' const mapDispatchToProps = dispatch => { return { diff --git a/ui/app/components/modals/confirm-reset-account/index.js b/ui/app/components/app/modals/confirm-reset-account/index.js similarity index 100% rename from ui/app/components/modals/confirm-reset-account/index.js rename to ui/app/components/app/modals/confirm-reset-account/index.js diff --git a/ui/app/components/modals/customize-gas/customize-gas.component.js b/ui/app/components/app/modals/customize-gas/customize-gas.component.js similarity index 99% rename from ui/app/components/modals/customize-gas/customize-gas.component.js rename to ui/app/components/app/modals/customize-gas/customize-gas.component.js index 4e2e20660..5db5c79e7 100644 --- a/ui/app/components/modals/customize-gas/customize-gas.component.js +++ b/ui/app/components/app/modals/customize-gas/customize-gas.component.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types' import BigNumber from 'bignumber.js' import GasModalCard from '../../customize-gas-modal/gas-modal-card' import { MIN_GAS_PRICE_GWEI } from '../../send/send.constants' -import Button from '../../button' +import Button from '../../../ui/button' import { getDecimalGasLimit, diff --git a/ui/app/components/modals/customize-gas/customize-gas.container.js b/ui/app/components/app/modals/customize-gas/customize-gas.container.js similarity index 89% rename from ui/app/components/modals/customize-gas/customize-gas.container.js rename to ui/app/components/app/modals/customize-gas/customize-gas.container.js index 46a799795..221881a8a 100644 --- a/ui/app/components/modals/customize-gas/customize-gas.container.js +++ b/ui/app/components/app/modals/customize-gas/customize-gas.container.js @@ -1,6 +1,6 @@ import { connect } from 'react-redux' import CustomizeGas from './customize-gas.component' -import { hideModal } from '../../../actions' +import { hideModal } from '../../../../store/actions' const mapStateToProps = state => { const { appState: { modal: { modalState: { props } } } } = state diff --git a/ui/app/components/modals/customize-gas/customize-gas.util.js b/ui/app/components/app/modals/customize-gas/customize-gas.util.js similarity index 91% rename from ui/app/components/modals/customize-gas/customize-gas.util.js rename to ui/app/components/app/modals/customize-gas/customize-gas.util.js index 6ba4a7705..e686183bd 100644 --- a/ui/app/components/modals/customize-gas/customize-gas.util.js +++ b/ui/app/components/app/modals/customize-gas/customize-gas.util.js @@ -1,5 +1,5 @@ import ethUtil from 'ethereumjs-util' -import { conversionUtil } from '../../../conversion-util' +import { conversionUtil } from '../../../../helpers/utils/conversion-util' export function getDecimalGasLimit (hexGasLimit) { return conversionUtil(hexGasLimit, { diff --git a/ui/app/components/modals/customize-gas/index.js b/ui/app/components/app/modals/customize-gas/index.js similarity index 100% rename from ui/app/components/modals/customize-gas/index.js rename to ui/app/components/app/modals/customize-gas/index.js diff --git a/ui/app/components/modals/customize-gas/index.scss b/ui/app/components/app/modals/customize-gas/index.scss similarity index 100% rename from ui/app/components/modals/customize-gas/index.scss rename to ui/app/components/app/modals/customize-gas/index.scss diff --git a/ui/app/components/modals/deposit-ether-modal.js b/ui/app/components/app/modals/deposit-ether-modal.js similarity index 97% rename from ui/app/components/modals/deposit-ether-modal.js rename to ui/app/components/app/modals/deposit-ether-modal.js index 09137d39a..72bb1df89 100644 --- a/ui/app/components/modals/deposit-ether-modal.js +++ b/ui/app/components/app/modals/deposit-ether-modal.js @@ -3,11 +3,11 @@ const PropTypes = require('prop-types') const h = require('react-hyperscript') const inherits = require('util').inherits const connect = require('react-redux').connect -const actions = require('../../actions') -const { getNetworkDisplayName } = require('../../../../app/scripts/controllers/network/util') +const actions = require('../../../store/actions') +const { getNetworkDisplayName } = require('../../../../../app/scripts/controllers/network/util') const ShapeshiftForm = require('../shapeshift-form') -import Button from '../button' +import Button from '../../ui/button' let DIRECT_DEPOSIT_ROW_TITLE let DIRECT_DEPOSIT_ROW_TEXT diff --git a/ui/app/components/modals/edit-account-name-modal.js b/ui/app/components/app/modals/edit-account-name-modal.js similarity index 94% rename from ui/app/components/modals/edit-account-name-modal.js rename to ui/app/components/app/modals/edit-account-name-modal.js index edced8725..41a9862e9 100644 --- a/ui/app/components/modals/edit-account-name-modal.js +++ b/ui/app/components/app/modals/edit-account-name-modal.js @@ -3,8 +3,8 @@ const PropTypes = require('prop-types') const h = require('react-hyperscript') const inherits = require('util').inherits const connect = require('react-redux').connect -const actions = require('../../actions') -const { getSelectedAccount } = require('../../selectors') +const actions = require('../../../store/actions') +const { getSelectedAccount } = require('../../../selectors/selectors') function mapStateToProps (state) { return { diff --git a/ui/app/components/modals/export-private-key-modal.js b/ui/app/components/app/modals/export-private-key-modal.js similarity index 94% rename from ui/app/components/modals/export-private-key-modal.js rename to ui/app/components/app/modals/export-private-key-modal.js index d3e3c9a56..639887d4c 100644 --- a/ui/app/components/modals/export-private-key-modal.js +++ b/ui/app/components/app/modals/export-private-key-modal.js @@ -5,13 +5,13 @@ const h = require('react-hyperscript') const inherits = require('util').inherits const connect = require('react-redux').connect const { stripHexPrefix } = require('ethereumjs-util') -const actions = require('../../actions') +const actions = require('../../../store/actions') const AccountModalContainer = require('./account-modal-container') -const { getSelectedIdentity } = require('../../selectors') -const ReadOnlyInput = require('../readonly-input') +const { getSelectedIdentity } = require('../../../selectors/selectors') +const ReadOnlyInput = require('../../ui/readonly-input') const copyToClipboard = require('copy-to-clipboard') -const { checksumAddress } = require('../../util') -import Button from '../button' +const { checksumAddress } = require('../../../helpers/utils/util') +import Button from '../../ui/button' function mapStateToPropsFactory () { let selectedIdentity = null diff --git a/ui/app/components/modals/hide-token-confirmation-modal.js b/ui/app/components/app/modals/hide-token-confirmation-modal.js similarity index 95% rename from ui/app/components/modals/hide-token-confirmation-modal.js rename to ui/app/components/app/modals/hide-token-confirmation-modal.js index 43f3009a5..8a9a48fd2 100644 --- a/ui/app/components/modals/hide-token-confirmation-modal.js +++ b/ui/app/components/app/modals/hide-token-confirmation-modal.js @@ -3,8 +3,8 @@ const PropTypes = require('prop-types') const h = require('react-hyperscript') const inherits = require('util').inherits const connect = require('react-redux').connect -const actions = require('../../actions') -import Identicon from '../identicon' +const actions = require('../../../store/actions') +import Identicon from '../../ui/identicon' function mapStateToProps (state) { return { diff --git a/ui/app/components/modals/index.js b/ui/app/components/app/modals/index.js similarity index 100% rename from ui/app/components/modals/index.js rename to ui/app/components/app/modals/index.js diff --git a/ui/app/components/app/modals/index.scss b/ui/app/components/app/modals/index.scss new file mode 100644 index 000000000..09b0bb73c --- /dev/null +++ b/ui/app/components/app/modals/index.scss @@ -0,0 +1,11 @@ +@import 'cancel-transaction/index'; + +@import 'confirm-remove-account/index'; + +@import 'customize-gas/index'; + +@import 'qr-scanner/index'; + +@import 'transaction-confirmed/index'; + +@import 'metametrics-opt-in-modal/index'; diff --git a/ui/app/components/modals/loading-network-error/index.js b/ui/app/components/app/modals/loading-network-error/index.js similarity index 100% rename from ui/app/components/modals/loading-network-error/index.js rename to ui/app/components/app/modals/loading-network-error/index.js diff --git a/ui/app/components/modals/loading-network-error/loading-network-error.component.js b/ui/app/components/app/modals/loading-network-error/loading-network-error.component.js similarity index 100% rename from ui/app/components/modals/loading-network-error/loading-network-error.component.js rename to ui/app/components/app/modals/loading-network-error/loading-network-error.component.js diff --git a/ui/app/components/modals/loading-network-error/loading-network-error.container.js b/ui/app/components/app/modals/loading-network-error/loading-network-error.container.js similarity index 57% rename from ui/app/components/modals/loading-network-error/loading-network-error.container.js rename to ui/app/components/app/modals/loading-network-error/loading-network-error.container.js index 3fcba20aa..38ea9b2ab 100644 --- a/ui/app/components/modals/loading-network-error/loading-network-error.container.js +++ b/ui/app/components/app/modals/loading-network-error/loading-network-error.container.js @@ -1,4 +1,4 @@ import LoadingNetworkError from './loading-network-error.component' -import withModalProps from '../../../higher-order-components/with-modal-props' +import withModalProps from '../../../../helpers/higher-order-components/with-modal-props' export default withModalProps(LoadingNetworkError) diff --git a/ui/app/components/modals/metametrics-opt-in-modal/index.js b/ui/app/components/app/modals/metametrics-opt-in-modal/index.js similarity index 100% rename from ui/app/components/modals/metametrics-opt-in-modal/index.js rename to ui/app/components/app/modals/metametrics-opt-in-modal/index.js diff --git a/ui/app/components/modals/metametrics-opt-in-modal/index.scss b/ui/app/components/app/modals/metametrics-opt-in-modal/index.scss similarity index 100% rename from ui/app/components/modals/metametrics-opt-in-modal/index.scss rename to ui/app/components/app/modals/metametrics-opt-in-modal/index.scss diff --git a/ui/app/components/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.component.js b/ui/app/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.component.js similarity index 98% rename from ui/app/components/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.component.js rename to ui/app/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.component.js index 1a224eb12..0335991fc 100644 --- a/ui/app/components/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.component.js +++ b/ui/app/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.component.js @@ -1,6 +1,6 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' -import PageContainerFooter from '../../page-container/page-container-footer' +import PageContainerFooter from '../../../ui/page-container/page-container-footer' export default class MetaMetricsOptInModal extends Component { static propTypes = { diff --git a/ui/app/components/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.container.js b/ui/app/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.container.js similarity index 76% rename from ui/app/components/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.container.js rename to ui/app/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.container.js index 525806b75..83595281f 100644 --- a/ui/app/components/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.container.js +++ b/ui/app/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.container.js @@ -1,8 +1,8 @@ import { connect } from 'react-redux' import { compose } from 'recompose' import MetaMetricsOptInModal from './metametrics-opt-in-modal.component' -import withModalProps from '../../../higher-order-components/with-modal-props' -import { setParticipateInMetaMetrics } from '../../../actions' +import withModalProps from '../../../../helpers/higher-order-components/with-modal-props' +import { setParticipateInMetaMetrics } from '../../../../store/actions' const mapStateToProps = (state, ownProps) => { const { unapprovedTxCount } = ownProps diff --git a/ui/app/components/modals/modal.js b/ui/app/components/app/modals/modal.js similarity index 96% rename from ui/app/components/modals/modal.js rename to ui/app/components/app/modals/modal.js index 8ab599a71..717f623af 100644 --- a/ui/app/components/modals/modal.js +++ b/ui/app/components/app/modals/modal.js @@ -3,11 +3,11 @@ const h = require('react-hyperscript') const inherits = require('util').inherits const connect = require('react-redux').connect const FadeModal = require('boron').FadeModal -const actions = require('../../actions') -const { resetCustomData: resetCustomGasData } = require('../../ducks/gas.duck') -const isMobileView = require('../../../lib/is-mobile-view') -const { getEnvironmentType } = require('../../../../app/scripts/lib/util') -const { ENVIRONMENT_TYPE_POPUP } = require('../../../../app/scripts/lib/enums') +const actions = require('../../../store/actions') +const { resetCustomData: resetCustomGasData } = require('../../../ducks/gas/gas.duck') +const isMobileView = require('../../../../lib/is-mobile-view') +const { getEnvironmentType } = require('../../../../../app/scripts/lib/util') +const { ENVIRONMENT_TYPE_POPUP } = require('../../../../../app/scripts/lib/enums') // Modal Components const BuyOptions = require('./buy-options-modal') diff --git a/ui/app/components/modals/new-account-modal.js b/ui/app/components/app/modals/new-account-modal.js similarity index 98% rename from ui/app/components/modals/new-account-modal.js rename to ui/app/components/app/modals/new-account-modal.js index a66a3ed4a..27c81a701 100644 --- a/ui/app/components/modals/new-account-modal.js +++ b/ui/app/components/app/modals/new-account-modal.js @@ -2,7 +2,7 @@ const { Component } = require('react') const PropTypes = require('prop-types') const h = require('react-hyperscript') const connect = require('react-redux').connect -const actions = require('../../actions') +const actions = require('../../../store/actions') class NewAccountModal extends Component { constructor (props) { diff --git a/ui/app/components/modals/notification-modal.js b/ui/app/components/app/modals/notification-modal.js similarity index 97% rename from ui/app/components/modals/notification-modal.js rename to ui/app/components/app/modals/notification-modal.js index 46a4c8a21..2d73b2cfa 100644 --- a/ui/app/components/modals/notification-modal.js +++ b/ui/app/components/app/modals/notification-modal.js @@ -2,7 +2,7 @@ const { Component } = require('react') const PropTypes = require('prop-types') const h = require('react-hyperscript') const connect = require('react-redux').connect -const actions = require('../../actions') +const actions = require('../../../store/actions') class NotificationModal extends Component { render () { diff --git a/ui/app/components/modals/qr-scanner/index.js b/ui/app/components/app/modals/qr-scanner/index.js similarity index 100% rename from ui/app/components/modals/qr-scanner/index.js rename to ui/app/components/app/modals/qr-scanner/index.js diff --git a/ui/app/components/modals/qr-scanner/index.scss b/ui/app/components/app/modals/qr-scanner/index.scss similarity index 100% rename from ui/app/components/modals/qr-scanner/index.scss rename to ui/app/components/app/modals/qr-scanner/index.scss diff --git a/ui/app/components/modals/qr-scanner/qr-scanner.component.js b/ui/app/components/app/modals/qr-scanner/qr-scanner.component.js similarity index 96% rename from ui/app/components/modals/qr-scanner/qr-scanner.component.js rename to ui/app/components/app/modals/qr-scanner/qr-scanner.component.js index cb8d07d83..20915b5f9 100644 --- a/ui/app/components/modals/qr-scanner/qr-scanner.component.js +++ b/ui/app/components/app/modals/qr-scanner/qr-scanner.component.js @@ -2,9 +2,9 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' import { BrowserQRCodeReader } from '@zxing/library' import adapter from 'webrtc-adapter' // eslint-disable-line import/no-nodejs-modules, no-unused-vars -import Spinner from '../../spinner' -import WebcamUtils from '../../../../lib/webcam-utils' -import PageContainerFooter from '../../page-container/page-container-footer/page-container-footer.component' +import Spinner from '../../../ui/spinner' +import WebcamUtils from '../../../../../lib/webcam-utils' +import PageContainerFooter from '../../../ui/page-container/page-container-footer/page-container-footer.component' export default class QrScanner extends Component { static propTypes = { diff --git a/ui/app/components/modals/qr-scanner/qr-scanner.container.js b/ui/app/components/app/modals/qr-scanner/qr-scanner.container.js similarity index 89% rename from ui/app/components/modals/qr-scanner/qr-scanner.container.js rename to ui/app/components/app/modals/qr-scanner/qr-scanner.container.js index d0a35e03b..2210fbed2 100644 --- a/ui/app/components/modals/qr-scanner/qr-scanner.container.js +++ b/ui/app/components/app/modals/qr-scanner/qr-scanner.container.js @@ -1,10 +1,10 @@ import { connect } from 'react-redux' import QrScanner from './qr-scanner.component' -const { hideModal, qrCodeDetected, showQrScanner } = require('../../../actions') +const { hideModal, qrCodeDetected, showQrScanner } = require('../../../../store/actions') import { SEND_ROUTE, -} from '../../../routes' +} from '../../../../helpers/constants/routes' const mapStateToProps = state => { return { diff --git a/ui/app/components/modals/reject-transactions/index.js b/ui/app/components/app/modals/reject-transactions/index.js similarity index 100% rename from ui/app/components/modals/reject-transactions/index.js rename to ui/app/components/app/modals/reject-transactions/index.js diff --git a/ui/app/components/modals/reject-transactions/index.scss b/ui/app/components/app/modals/reject-transactions/index.scss similarity index 100% rename from ui/app/components/modals/reject-transactions/index.scss rename to ui/app/components/app/modals/reject-transactions/index.scss diff --git a/ui/app/components/modals/reject-transactions/reject-transactions.component.js b/ui/app/components/app/modals/reject-transactions/reject-transactions.component.js similarity index 100% rename from ui/app/components/modals/reject-transactions/reject-transactions.component.js rename to ui/app/components/app/modals/reject-transactions/reject-transactions.component.js diff --git a/ui/app/components/modals/reject-transactions/reject-transactions.container.js b/ui/app/components/app/modals/reject-transactions/reject-transactions.container.js similarity index 80% rename from ui/app/components/modals/reject-transactions/reject-transactions.container.js rename to ui/app/components/app/modals/reject-transactions/reject-transactions.container.js index 81e98d3ff..d2af05573 100644 --- a/ui/app/components/modals/reject-transactions/reject-transactions.container.js +++ b/ui/app/components/app/modals/reject-transactions/reject-transactions.container.js @@ -1,7 +1,7 @@ import { connect } from 'react-redux' import { compose } from 'recompose' import RejectTransactionsModal from './reject-transactions.component' -import withModalProps from '../../../higher-order-components/with-modal-props' +import withModalProps from '../../../../helpers/higher-order-components/with-modal-props' const mapStateToProps = (state, ownProps) => { const { unapprovedTxCount } = ownProps diff --git a/ui/app/components/modals/shapeshift-deposit-tx-modal.js b/ui/app/components/app/modals/shapeshift-deposit-tx-modal.js similarity index 90% rename from ui/app/components/modals/shapeshift-deposit-tx-modal.js rename to ui/app/components/app/modals/shapeshift-deposit-tx-modal.js index 242c7b89d..ada9430f7 100644 --- a/ui/app/components/modals/shapeshift-deposit-tx-modal.js +++ b/ui/app/components/app/modals/shapeshift-deposit-tx-modal.js @@ -2,8 +2,8 @@ const Component = require('react').Component const h = require('react-hyperscript') const inherits = require('util').inherits const connect = require('react-redux').connect -const actions = require('../../actions') -const QrView = require('../qr-code') +const actions = require('../../../store/actions') +const QrView = require('../../ui/qr-code') const AccountModalContainer = require('./account-modal-container') function mapStateToProps (state) { diff --git a/ui/app/components/modals/transaction-confirmed/index.js b/ui/app/components/app/modals/transaction-confirmed/index.js similarity index 100% rename from ui/app/components/modals/transaction-confirmed/index.js rename to ui/app/components/app/modals/transaction-confirmed/index.js diff --git a/ui/app/components/modals/transaction-confirmed/index.scss b/ui/app/components/app/modals/transaction-confirmed/index.scss similarity index 100% rename from ui/app/components/modals/transaction-confirmed/index.scss rename to ui/app/components/app/modals/transaction-confirmed/index.scss diff --git a/ui/app/components/modals/transaction-confirmed/transaction-confirmed.component.js b/ui/app/components/app/modals/transaction-confirmed/transaction-confirmed.component.js similarity index 100% rename from ui/app/components/modals/transaction-confirmed/transaction-confirmed.component.js rename to ui/app/components/app/modals/transaction-confirmed/transaction-confirmed.component.js diff --git a/ui/app/components/modals/transaction-confirmed/transaction-confirmed.container.js b/ui/app/components/app/modals/transaction-confirmed/transaction-confirmed.container.js similarity index 57% rename from ui/app/components/modals/transaction-confirmed/transaction-confirmed.container.js rename to ui/app/components/app/modals/transaction-confirmed/transaction-confirmed.container.js index d4e39681a..9089ec158 100644 --- a/ui/app/components/modals/transaction-confirmed/transaction-confirmed.container.js +++ b/ui/app/components/app/modals/transaction-confirmed/transaction-confirmed.container.js @@ -1,4 +1,4 @@ import TransactionConfirmed from './transaction-confirmed.component' -import withModalProps from '../../../higher-order-components/with-modal-props' +import withModalProps from '../../../../helpers/higher-order-components/with-modal-props' export default withModalProps(TransactionConfirmed) diff --git a/ui/app/components/network-display/index.js b/ui/app/components/app/network-display/index.js similarity index 100% rename from ui/app/components/network-display/index.js rename to ui/app/components/app/network-display/index.js diff --git a/ui/app/components/network-display/index.scss b/ui/app/components/app/network-display/index.scss similarity index 100% rename from ui/app/components/network-display/index.scss rename to ui/app/components/app/network-display/index.scss diff --git a/ui/app/components/network-display/network-display.component.js b/ui/app/components/app/network-display/network-display.component.js similarity index 96% rename from ui/app/components/network-display/network-display.component.js rename to ui/app/components/app/network-display/network-display.component.js index 22d617099..1142e8606 100644 --- a/ui/app/components/network-display/network-display.component.js +++ b/ui/app/components/app/network-display/network-display.component.js @@ -6,7 +6,7 @@ import { ROPSTEN_CODE, RINKEYBY_CODE, KOVAN_CODE, -} from '../../../../app/scripts/controllers/network/enums' +} from '../../../../../app/scripts/controllers/network/enums' const networkToClassHash = { [MAINNET_CODE]: 'mainnet', diff --git a/ui/app/components/network-display/network-display.container.js b/ui/app/components/app/network-display/network-display.container.js similarity index 100% rename from ui/app/components/network-display/network-display.container.js rename to ui/app/components/app/network-display/network-display.container.js diff --git a/ui/app/components/network.js b/ui/app/components/app/network.js similarity index 100% rename from ui/app/components/network.js rename to ui/app/components/app/network.js diff --git a/ui/app/components/notice.js b/ui/app/components/app/notice.js similarity index 100% rename from ui/app/components/notice.js rename to ui/app/components/app/notice.js diff --git a/ui/app/components/provider-page-container/index.js b/ui/app/components/app/provider-page-container/index.js similarity index 100% rename from ui/app/components/provider-page-container/index.js rename to ui/app/components/app/provider-page-container/index.js diff --git a/ui/app/components/provider-page-container/index.scss b/ui/app/components/app/provider-page-container/index.scss similarity index 100% rename from ui/app/components/provider-page-container/index.scss rename to ui/app/components/app/provider-page-container/index.scss diff --git a/ui/app/components/provider-page-container/provider-page-container-content/index.js b/ui/app/components/app/provider-page-container/provider-page-container-content/index.js similarity index 100% rename from ui/app/components/provider-page-container/provider-page-container-content/index.js rename to ui/app/components/app/provider-page-container/provider-page-container-content/index.js diff --git a/ui/app/components/provider-page-container/provider-page-container-content/provider-page-container-content.component.js b/ui/app/components/app/provider-page-container/provider-page-container-content/provider-page-container-content.component.js similarity index 97% rename from ui/app/components/provider-page-container/provider-page-container-content/provider-page-container-content.component.js rename to ui/app/components/app/provider-page-container/provider-page-container-content/provider-page-container-content.component.js index 268db613f..0eb1d616a 100644 --- a/ui/app/components/provider-page-container/provider-page-container-content/provider-page-container-content.component.js +++ b/ui/app/components/app/provider-page-container/provider-page-container-content/provider-page-container-content.component.js @@ -1,6 +1,6 @@ import PropTypes from 'prop-types' import React, {PureComponent} from 'react' -import Identicon from '../../identicon' +import Identicon from '../../../ui/identicon' export default class ProviderPageContainerContent extends PureComponent { static propTypes = { diff --git a/ui/app/components/provider-page-container/provider-page-container-content/provider-page-container-content.container.js b/ui/app/components/app/provider-page-container/provider-page-container-content/provider-page-container-content.container.js similarity index 81% rename from ui/app/components/provider-page-container/provider-page-container-content/provider-page-container-content.container.js rename to ui/app/components/app/provider-page-container/provider-page-container-content/provider-page-container-content.container.js index 3ea1ce20e..4dbdddd16 100644 --- a/ui/app/components/provider-page-container/provider-page-container-content/provider-page-container-content.container.js +++ b/ui/app/components/app/provider-page-container/provider-page-container-content/provider-page-container-content.container.js @@ -1,6 +1,6 @@ import { connect } from 'react-redux' import ProviderPageContainerContent from './provider-page-container-content.component' -import { getSelectedIdentity } from '../../../selectors' +import { getSelectedIdentity } from '../../../../selectors/selectors' const mapStateToProps = (state) => { return { diff --git a/ui/app/components/provider-page-container/provider-page-container-header/index.js b/ui/app/components/app/provider-page-container/provider-page-container-header/index.js similarity index 100% rename from ui/app/components/provider-page-container/provider-page-container-header/index.js rename to ui/app/components/app/provider-page-container/provider-page-container-header/index.js diff --git a/ui/app/components/provider-page-container/provider-page-container-header/provider-page-container-header.component.js b/ui/app/components/app/provider-page-container/provider-page-container-header/provider-page-container-header.component.js similarity index 100% rename from ui/app/components/provider-page-container/provider-page-container-header/provider-page-container-header.component.js rename to ui/app/components/app/provider-page-container/provider-page-container-header/provider-page-container-header.component.js diff --git a/ui/app/components/provider-page-container/provider-page-container.component.js b/ui/app/components/app/provider-page-container/provider-page-container.component.js similarity index 96% rename from ui/app/components/provider-page-container/provider-page-container.component.js rename to ui/app/components/app/provider-page-container/provider-page-container.component.js index ff063166d..910def2a3 100644 --- a/ui/app/components/provider-page-container/provider-page-container.component.js +++ b/ui/app/components/app/provider-page-container/provider-page-container.component.js @@ -1,7 +1,7 @@ import PropTypes from 'prop-types' import React, {PureComponent} from 'react' -import { ProviderPageContainerContent, ProviderPageContainerHeader } from './' -import { PageContainerFooter } from '../page-container' +import { ProviderPageContainerContent, ProviderPageContainerHeader } from '.' +import { PageContainerFooter } from '../../ui/page-container' export default class ProviderPageContainer extends PureComponent { static propTypes = { diff --git a/ui/app/components/selected-account/index.js b/ui/app/components/app/selected-account/index.js similarity index 100% rename from ui/app/components/selected-account/index.js rename to ui/app/components/app/selected-account/index.js diff --git a/ui/app/components/selected-account/index.scss b/ui/app/components/app/selected-account/index.scss similarity index 100% rename from ui/app/components/selected-account/index.scss rename to ui/app/components/app/selected-account/index.scss diff --git a/ui/app/components/selected-account/selected-account.component.js b/ui/app/components/app/selected-account/selected-account.component.js similarity index 91% rename from ui/app/components/selected-account/selected-account.component.js rename to ui/app/components/app/selected-account/selected-account.component.js index 47c56e312..5a3fa815f 100644 --- a/ui/app/components/selected-account/selected-account.component.js +++ b/ui/app/components/app/selected-account/selected-account.component.js @@ -1,9 +1,9 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' import copyToClipboard from 'copy-to-clipboard' -import { addressSlicer, checksumAddress } from '../../util' +import { addressSlicer, checksumAddress } from '../../../helpers/utils/util' -const Tooltip = require('../tooltip-v2.js').default +const Tooltip = require('../../ui/tooltip-v2.js').default class SelectedAccount extends Component { state = { diff --git a/ui/app/components/selected-account/selected-account.container.js b/ui/app/components/app/selected-account/selected-account.container.js similarity index 86% rename from ui/app/components/selected-account/selected-account.container.js rename to ui/app/components/app/selected-account/selected-account.container.js index 1c8d17d8d..b5dbe74f3 100644 --- a/ui/app/components/selected-account/selected-account.container.js +++ b/ui/app/components/app/selected-account/selected-account.container.js @@ -1,7 +1,7 @@ import { connect } from 'react-redux' import SelectedAccount from './selected-account.component' -const selectors = require('../../selectors') +const selectors = require('../../../selectors/selectors') const mapStateToProps = state => { return { diff --git a/ui/app/components/selected-account/tests/selected-account-component.test.js b/ui/app/components/app/selected-account/tests/selected-account-component.test.js similarity index 100% rename from ui/app/components/selected-account/tests/selected-account-component.test.js rename to ui/app/components/app/selected-account/tests/selected-account-component.test.js diff --git a/ui/app/components/send/README.md b/ui/app/components/app/send/README.md similarity index 100% rename from ui/app/components/send/README.md rename to ui/app/components/app/send/README.md diff --git a/ui/app/components/send/account-list-item/account-list-item-README.md b/ui/app/components/app/send/account-list-item/account-list-item-README.md similarity index 100% rename from ui/app/components/send/account-list-item/account-list-item-README.md rename to ui/app/components/app/send/account-list-item/account-list-item-README.md diff --git a/ui/app/components/send/account-list-item/account-list-item.component.js b/ui/app/components/app/send/account-list-item/account-list-item.component.js similarity index 92% rename from ui/app/components/send/account-list-item/account-list-item.component.js rename to ui/app/components/app/send/account-list-item/account-list-item.component.js index 0420af46b..18e77b4f9 100644 --- a/ui/app/components/send/account-list-item/account-list-item.component.js +++ b/ui/app/components/app/send/account-list-item/account-list-item.component.js @@ -1,11 +1,11 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' -import { checksumAddress } from '../../../util' -import Identicon from '../../identicon' +import { checksumAddress } from '../../../../helpers/utils/util' +import Identicon from '../../../ui/identicon' import UserPreferencedCurrencyDisplay from '../../user-preferenced-currency-display' -import { PRIMARY, SECONDARY } from '../../../constants/common' -import Tooltip from '../../tooltip-v2' +import { PRIMARY, SECONDARY } from '../../../../helpers/constants/common' +import Tooltip from '../../../ui/tooltip-v2' export default class AccountListItem extends Component { diff --git a/ui/app/components/send/account-list-item/account-list-item.container.js b/ui/app/components/app/send/account-list-item/account-list-item.container.js similarity index 94% rename from ui/app/components/send/account-list-item/account-list-item.container.js rename to ui/app/components/app/send/account-list-item/account-list-item.container.js index c045ef14f..bc9a60f49 100644 --- a/ui/app/components/send/account-list-item/account-list-item.container.js +++ b/ui/app/components/app/send/account-list-item/account-list-item.container.js @@ -8,7 +8,7 @@ import { getIsMainnet, isBalanceCached, preferencesSelector, -} from '../../../selectors' +} from '../../../../selectors/selectors' import AccountListItem from './account-list-item.component' export default connect(mapStateToProps)(AccountListItem) diff --git a/ui/app/components/send/account-list-item/index.js b/ui/app/components/app/send/account-list-item/index.js similarity index 100% rename from ui/app/components/send/account-list-item/index.js rename to ui/app/components/app/send/account-list-item/index.js diff --git a/ui/app/components/send/account-list-item/tests/account-list-item-component.test.js b/ui/app/components/app/send/account-list-item/tests/account-list-item-component.test.js similarity index 98% rename from ui/app/components/send/account-list-item/tests/account-list-item-component.test.js rename to ui/app/components/app/send/account-list-item/tests/account-list-item-component.test.js index 2bd2ce0c5..5df9f77d6 100644 --- a/ui/app/components/send/account-list-item/tests/account-list-item-component.test.js +++ b/ui/app/components/app/send/account-list-item/tests/account-list-item-component.test.js @@ -3,7 +3,7 @@ import assert from 'assert' import { shallow } from 'enzyme' import sinon from 'sinon' import proxyquire from 'proxyquire' -import Identicon from '../../../identicon' +import Identicon from '../../../../ui/identicon' import UserPreferencedCurrencyDisplay from '../../../user-preferenced-currency-display' const utilsMethodStubs = { @@ -11,7 +11,7 @@ const utilsMethodStubs = { } const AccountListItem = proxyquire('../account-list-item.component.js', { - '../../../util': utilsMethodStubs, + '../../../../helpers/utils/util': utilsMethodStubs, }).default diff --git a/ui/app/components/send/account-list-item/tests/account-list-item-container.test.js b/ui/app/components/app/send/account-list-item/tests/account-list-item-container.test.js similarity index 98% rename from ui/app/components/send/account-list-item/tests/account-list-item-container.test.js rename to ui/app/components/app/send/account-list-item/tests/account-list-item-container.test.js index 662880aa0..19a9a02d0 100644 --- a/ui/app/components/send/account-list-item/tests/account-list-item-container.test.js +++ b/ui/app/components/app/send/account-list-item/tests/account-list-item-container.test.js @@ -15,7 +15,7 @@ proxyquire('../account-list-item.container.js', { getCurrentCurrency: () => `mockCurrentCurrency`, getNativeCurrency: () => `mockNativeCurrency`, }, - '../../../selectors.js': { + '../../../../selectors/selectors': { isBalanceCached: () => `mockBalanceIsCached`, preferencesSelector: ({ showFiatInTestnets }) => ({ showFiatInTestnets, diff --git a/ui/app/components/send/index.js b/ui/app/components/app/send/index.js similarity index 100% rename from ui/app/components/send/index.js rename to ui/app/components/app/send/index.js diff --git a/ui/app/components/send/send-content/index.js b/ui/app/components/app/send/send-content/index.js similarity index 100% rename from ui/app/components/send/send-content/index.js rename to ui/app/components/app/send/send-content/index.js diff --git a/ui/app/components/send/send-content/send-amount-row/README.md b/ui/app/components/app/send/send-content/send-amount-row/README.md similarity index 100% rename from ui/app/components/send/send-content/send-amount-row/README.md rename to ui/app/components/app/send/send-content/send-amount-row/README.md diff --git a/ui/app/components/send/send-content/send-amount-row/amount-max-button/amount-max-button.component.js b/ui/app/components/app/send/send-content/send-amount-row/amount-max-button/amount-max-button.component.js similarity index 100% rename from ui/app/components/send/send-content/send-amount-row/amount-max-button/amount-max-button.component.js rename to ui/app/components/app/send/send-content/send-amount-row/amount-max-button/amount-max-button.component.js diff --git a/ui/app/components/send/send-content/send-amount-row/amount-max-button/amount-max-button.container.js b/ui/app/components/app/send/send-content/send-amount-row/amount-max-button/amount-max-button.container.js similarity index 92% rename from ui/app/components/send/send-content/send-amount-row/amount-max-button/amount-max-button.container.js rename to ui/app/components/app/send/send-content/send-amount-row/amount-max-button/amount-max-button.container.js index 2d2ec42f7..16c5a0db5 100644 --- a/ui/app/components/send/send-content/send-amount-row/amount-max-button/amount-max-button.container.js +++ b/ui/app/components/app/send/send-content/send-amount-row/amount-max-button/amount-max-button.container.js @@ -10,11 +10,11 @@ import { calcMaxAmount } from './amount-max-button.utils.js' import { updateSendAmount, setMaxModeTo, -} from '../../../../../actions' +} from '../../../../../../store/actions' import AmountMaxButton from './amount-max-button.component' import { updateSendErrors, -} from '../../../../../ducks/send.duck' +} from '../../../../../../ducks/send/send.duck' export default connect(mapStateToProps, mapDispatchToProps)(AmountMaxButton) diff --git a/ui/app/components/send/send-content/send-amount-row/amount-max-button/amount-max-button.selectors.js b/ui/app/components/app/send/send-content/send-amount-row/amount-max-button/amount-max-button.selectors.js similarity index 100% rename from ui/app/components/send/send-content/send-amount-row/amount-max-button/amount-max-button.selectors.js rename to ui/app/components/app/send/send-content/send-amount-row/amount-max-button/amount-max-button.selectors.js diff --git a/ui/app/components/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils.js b/ui/app/components/app/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils.js similarity index 90% rename from ui/app/components/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils.js rename to ui/app/components/app/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils.js index 27181d2f5..f4c8fad8a 100644 --- a/ui/app/components/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils.js +++ b/ui/app/components/app/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils.js @@ -1,7 +1,7 @@ const { multiplyCurrencies, subtractCurrencies, -} = require('../../../../../conversion-util') +} = require('../../../../../../helpers/utils/conversion-util') const ethUtil = require('ethereumjs-util') function calcMaxAmount ({ balance, gasTotal, selectedToken, tokenBalance }) { diff --git a/ui/app/components/send/send-content/send-amount-row/amount-max-button/index.js b/ui/app/components/app/send/send-content/send-amount-row/amount-max-button/index.js similarity index 100% rename from ui/app/components/send/send-content/send-amount-row/amount-max-button/index.js rename to ui/app/components/app/send/send-content/send-amount-row/amount-max-button/index.js diff --git a/ui/app/components/send/send-content/send-amount-row/amount-max-button/tests/amount-max-button-component.test.js b/ui/app/components/app/send/send-content/send-amount-row/amount-max-button/tests/amount-max-button-component.test.js similarity index 100% rename from ui/app/components/send/send-content/send-amount-row/amount-max-button/tests/amount-max-button-component.test.js rename to ui/app/components/app/send/send-content/send-amount-row/amount-max-button/tests/amount-max-button-component.test.js diff --git a/ui/app/components/send/send-content/send-amount-row/amount-max-button/tests/amount-max-button-container.test.js b/ui/app/components/app/send/send-content/send-amount-row/amount-max-button/tests/amount-max-button-container.test.js similarity index 95% rename from ui/app/components/send/send-content/send-amount-row/amount-max-button/tests/amount-max-button-container.test.js rename to ui/app/components/app/send/send-content/send-amount-row/amount-max-button/tests/amount-max-button-container.test.js index 2cc00d6d6..f446e330c 100644 --- a/ui/app/components/send/send-content/send-amount-row/amount-max-button/tests/amount-max-button-container.test.js +++ b/ui/app/components/app/send/send-content/send-amount-row/amount-max-button/tests/amount-max-button-container.test.js @@ -29,8 +29,8 @@ proxyquire('../amount-max-button.container.js', { }, './amount-max-button.selectors.js': { getMaxModeOn: (s) => `mockMaxModeOn:${s}` }, './amount-max-button.utils.js': { calcMaxAmount: (mockObj) => mockObj.val + 1 }, - '../../../../../actions': actionSpies, - '../../../../../ducks/send.duck': duckActionSpies, + '../../../../../../store/actions': actionSpies, + '../../../../../../ducks/send/send.duck': duckActionSpies, }) describe('amount-max-button container', () => { diff --git a/ui/app/components/send/send-content/send-amount-row/amount-max-button/tests/amount-max-button-selectors.test.js b/ui/app/components/app/send/send-content/send-amount-row/amount-max-button/tests/amount-max-button-selectors.test.js similarity index 100% rename from ui/app/components/send/send-content/send-amount-row/amount-max-button/tests/amount-max-button-selectors.test.js rename to ui/app/components/app/send/send-content/send-amount-row/amount-max-button/tests/amount-max-button-selectors.test.js diff --git a/ui/app/components/send/send-content/send-amount-row/amount-max-button/tests/amount-max-button-utils.test.js b/ui/app/components/app/send/send-content/send-amount-row/amount-max-button/tests/amount-max-button-utils.test.js similarity index 100% rename from ui/app/components/send/send-content/send-amount-row/amount-max-button/tests/amount-max-button-utils.test.js rename to ui/app/components/app/send/send-content/send-amount-row/amount-max-button/tests/amount-max-button-utils.test.js diff --git a/ui/app/components/send/send-content/send-amount-row/index.js b/ui/app/components/app/send/send-content/send-amount-row/index.js similarity index 100% rename from ui/app/components/send/send-content/send-amount-row/index.js rename to ui/app/components/app/send/send-content/send-amount-row/index.js diff --git a/ui/app/components/send/send-content/send-amount-row/send-amount-row.component.js b/ui/app/components/app/send/send-content/send-amount-row/send-amount-row.component.js similarity index 96% rename from ui/app/components/send/send-content/send-amount-row/send-amount-row.component.js rename to ui/app/components/app/send/send-content/send-amount-row/send-amount-row.component.js index 4df1e0ffa..e725e7eda 100644 --- a/ui/app/components/send/send-content/send-amount-row/send-amount-row.component.js +++ b/ui/app/components/app/send/send-content/send-amount-row/send-amount-row.component.js @@ -1,7 +1,7 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' -import SendRowWrapper from '../send-row-wrapper/' -import AmountMaxButton from './amount-max-button/' +import SendRowWrapper from '../send-row-wrapper' +import AmountMaxButton from './amount-max-button' import UserPreferencedCurrencyInput from '../../../user-preferenced-currency-input' import UserPreferencedTokenInput from '../../../user-preferenced-token-input' diff --git a/ui/app/components/send/send-content/send-amount-row/send-amount-row.container.js b/ui/app/components/app/send/send-content/send-amount-row/send-amount-row.container.js similarity index 94% rename from ui/app/components/send/send-content/send-amount-row/send-amount-row.container.js rename to ui/app/components/app/send/send-content/send-amount-row/send-amount-row.container.js index 2b6fe0f6c..0646355ab 100644 --- a/ui/app/components/send/send-content/send-amount-row/send-amount-row.container.js +++ b/ui/app/components/app/send/send-content/send-amount-row/send-amount-row.container.js @@ -17,10 +17,10 @@ import { getAmountErrorObject, getGasFeeErrorObject } from '../../send.utils' import { setMaxModeTo, updateSendAmount, -} from '../../../../actions' +} from '../../../../../store/actions' import { updateSendErrors, -} from '../../../../ducks/send.duck' +} from '../../../../../ducks/send/send.duck' import SendAmountRow from './send-amount-row.component' export default connect(mapStateToProps, mapDispatchToProps)(SendAmountRow) diff --git a/ui/app/components/send/send-content/send-amount-row/send-amount-row.scss b/ui/app/components/app/send/send-content/send-amount-row/send-amount-row.scss similarity index 100% rename from ui/app/components/send/send-content/send-amount-row/send-amount-row.scss rename to ui/app/components/app/send/send-content/send-amount-row/send-amount-row.scss diff --git a/ui/app/components/send/send-content/send-amount-row/send-amount-row.selectors.js b/ui/app/components/app/send/send-content/send-amount-row/send-amount-row.selectors.js similarity index 100% rename from ui/app/components/send/send-content/send-amount-row/send-amount-row.selectors.js rename to ui/app/components/app/send/send-content/send-amount-row/send-amount-row.selectors.js diff --git a/ui/app/components/send/send-content/send-amount-row/tests/send-amount-row-component.test.js b/ui/app/components/app/send/send-content/send-amount-row/tests/send-amount-row-component.test.js similarity index 100% rename from ui/app/components/send/send-content/send-amount-row/tests/send-amount-row-component.test.js rename to ui/app/components/app/send/send-content/send-amount-row/tests/send-amount-row-component.test.js diff --git a/ui/app/components/send/send-content/send-amount-row/tests/send-amount-row-container.test.js b/ui/app/components/app/send/send-content/send-amount-row/tests/send-amount-row-container.test.js similarity index 97% rename from ui/app/components/send/send-content/send-amount-row/tests/send-amount-row-container.test.js rename to ui/app/components/app/send/send-content/send-amount-row/tests/send-amount-row-container.test.js index 52e351aee..6d20202b0 100644 --- a/ui/app/components/send/send-content/send-amount-row/tests/send-amount-row-container.test.js +++ b/ui/app/components/app/send/send-content/send-amount-row/tests/send-amount-row-container.test.js @@ -37,8 +37,8 @@ proxyquire('../send-amount-row.container.js', { getAmountErrorObject: (mockDataObject) => ({ ...mockDataObject, mockChange: true }), getGasFeeErrorObject: (mockDataObject) => ({ ...mockDataObject, mockGasFeeErrorChange: true }), }, - '../../../../actions': actionSpies, - '../../../../ducks/send.duck': duckActionSpies, + '../../../../../store/actions': actionSpies, + '../../../../../ducks/send/send.duck': duckActionSpies, }) describe('send-amount-row container', () => { diff --git a/ui/app/components/send/send-content/send-amount-row/tests/send-amount-row-selectors.test.js b/ui/app/components/app/send/send-content/send-amount-row/tests/send-amount-row-selectors.test.js similarity index 100% rename from ui/app/components/send/send-content/send-amount-row/tests/send-amount-row-selectors.test.js rename to ui/app/components/app/send/send-content/send-amount-row/tests/send-amount-row-selectors.test.js diff --git a/ui/app/components/send/send-content/send-content.component.js b/ui/app/components/app/send/send-content/send-content.component.js similarity index 77% rename from ui/app/components/send/send-content/send-content.component.js rename to ui/app/components/app/send/send-content/send-content.component.js index c780c88f5..2c09ceb19 100644 --- a/ui/app/components/send/send-content/send-content.component.js +++ b/ui/app/components/app/send/send-content/send-content.component.js @@ -1,11 +1,11 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' -import PageContainerContent from '../../page-container/page-container-content.component' -import SendAmountRow from './send-amount-row/' -import SendFromRow from './send-from-row/' -import SendGasRow from './send-gas-row/' +import PageContainerContent from '../../../ui/page-container/page-container-content.component' +import SendAmountRow from './send-amount-row' +import SendFromRow from './send-from-row' +import SendGasRow from './send-gas-row' import SendHexDataRow from './send-hex-data-row' -import SendToRow from './send-to-row/' +import SendToRow from './send-to-row' export default class SendContent extends Component { diff --git a/ui/app/components/send/send-content/send-dropdown-list/index.js b/ui/app/components/app/send/send-content/send-dropdown-list/index.js similarity index 100% rename from ui/app/components/send/send-content/send-dropdown-list/index.js rename to ui/app/components/app/send/send-content/send-dropdown-list/index.js diff --git a/ui/app/components/send/send-content/send-dropdown-list/send-dropdown-list.component.js b/ui/app/components/app/send/send-content/send-dropdown-list/send-dropdown-list.component.js similarity index 95% rename from ui/app/components/send/send-content/send-dropdown-list/send-dropdown-list.component.js rename to ui/app/components/app/send/send-content/send-dropdown-list/send-dropdown-list.component.js index bedac1259..0d026bc69 100644 --- a/ui/app/components/send/send-content/send-dropdown-list/send-dropdown-list.component.js +++ b/ui/app/components/app/send/send-content/send-dropdown-list/send-dropdown-list.component.js @@ -1,6 +1,6 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' -import AccountListItem from '../../account-list-item/' +import AccountListItem from '../../account-list-item' export default class SendDropdownList extends Component { diff --git a/ui/app/components/send/send-content/send-dropdown-list/tests/send-dropdown-list-component.test.js b/ui/app/components/app/send/send-content/send-dropdown-list/tests/send-dropdown-list-component.test.js similarity index 100% rename from ui/app/components/send/send-content/send-dropdown-list/tests/send-dropdown-list-component.test.js rename to ui/app/components/app/send/send-content/send-dropdown-list/tests/send-dropdown-list-component.test.js diff --git a/ui/app/components/send/send-content/send-from-row/index.js b/ui/app/components/app/send/send-content/send-from-row/index.js similarity index 100% rename from ui/app/components/send/send-content/send-from-row/index.js rename to ui/app/components/app/send/send-content/send-from-row/index.js diff --git a/ui/app/components/send/send-content/send-from-row/send-from-row.component.js b/ui/app/components/app/send/send-content/send-from-row/send-from-row.component.js similarity index 92% rename from ui/app/components/send/send-content/send-from-row/send-from-row.component.js rename to ui/app/components/app/send/send-content/send-from-row/send-from-row.component.js index f8aa084d8..dfa53e970 100644 --- a/ui/app/components/send/send-content/send-from-row/send-from-row.component.js +++ b/ui/app/components/app/send/send-content/send-from-row/send-from-row.component.js @@ -1,6 +1,6 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' -import SendRowWrapper from '../send-row-wrapper/' +import SendRowWrapper from '../send-row-wrapper' import AccountListItem from '../../account-list-item' export default class SendFromRow extends Component { diff --git a/ui/app/components/send/send-content/send-from-row/send-from-row.container.js b/ui/app/components/app/send/send-content/send-from-row/send-from-row.container.js similarity index 100% rename from ui/app/components/send/send-content/send-from-row/send-from-row.container.js rename to ui/app/components/app/send/send-content/send-from-row/send-from-row.container.js diff --git a/ui/app/components/send/send-content/send-from-row/send-from-row.selectors.js b/ui/app/components/app/send/send-content/send-from-row/send-from-row.selectors.js similarity index 100% rename from ui/app/components/send/send-content/send-from-row/send-from-row.selectors.js rename to ui/app/components/app/send/send-content/send-from-row/send-from-row.selectors.js diff --git a/ui/app/components/send/send-content/send-from-row/tests/send-from-row-component.test.js b/ui/app/components/app/send/send-content/send-from-row/tests/send-from-row-component.test.js similarity index 100% rename from ui/app/components/send/send-content/send-from-row/tests/send-from-row-component.test.js rename to ui/app/components/app/send/send-content/send-from-row/tests/send-from-row-component.test.js diff --git a/ui/app/components/send/send-content/send-from-row/tests/send-from-row-container.test.js b/ui/app/components/app/send/send-content/send-from-row/tests/send-from-row-container.test.js similarity index 100% rename from ui/app/components/send/send-content/send-from-row/tests/send-from-row-container.test.js rename to ui/app/components/app/send/send-content/send-from-row/tests/send-from-row-container.test.js diff --git a/ui/app/components/send/send-content/send-from-row/tests/send-from-row-selectors.test.js b/ui/app/components/app/send/send-content/send-from-row/tests/send-from-row-selectors.test.js similarity index 100% rename from ui/app/components/send/send-content/send-from-row/tests/send-from-row-selectors.test.js rename to ui/app/components/app/send/send-content/send-from-row/tests/send-from-row-selectors.test.js diff --git a/ui/app/components/send/send-content/send-gas-row/README.md b/ui/app/components/app/send/send-content/send-gas-row/README.md similarity index 100% rename from ui/app/components/send/send-content/send-gas-row/README.md rename to ui/app/components/app/send/send-content/send-gas-row/README.md diff --git a/ui/app/components/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js b/ui/app/components/app/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js similarity index 95% rename from ui/app/components/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js rename to ui/app/components/app/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js index b667aa037..48088607a 100644 --- a/ui/app/components/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js +++ b/ui/app/components/app/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js @@ -1,7 +1,7 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import UserPreferencedCurrencyDisplay from '../../../../user-preferenced-currency-display' -import { PRIMARY, SECONDARY } from '../../../../../constants/common' +import { PRIMARY, SECONDARY } from '../../../../../../helpers/constants/common' export default class GasFeeDisplay extends Component { diff --git a/ui/app/components/send/send-content/send-gas-row/gas-fee-display/index.js b/ui/app/components/app/send/send-content/send-gas-row/gas-fee-display/index.js similarity index 100% rename from ui/app/components/send/send-content/send-gas-row/gas-fee-display/index.js rename to ui/app/components/app/send/send-content/send-gas-row/gas-fee-display/index.js diff --git a/ui/app/components/send/send-content/send-gas-row/gas-fee-display/test/gas-fee-display.component.test.js b/ui/app/components/app/send/send-content/send-gas-row/gas-fee-display/test/gas-fee-display.component.test.js similarity index 100% rename from ui/app/components/send/send-content/send-gas-row/gas-fee-display/test/gas-fee-display.component.test.js rename to ui/app/components/app/send/send-content/send-gas-row/gas-fee-display/test/gas-fee-display.component.test.js diff --git a/ui/app/components/send/send-content/send-gas-row/index.js b/ui/app/components/app/send/send-content/send-gas-row/index.js similarity index 100% rename from ui/app/components/send/send-content/send-gas-row/index.js rename to ui/app/components/app/send/send-content/send-gas-row/index.js diff --git a/ui/app/components/send/send-content/send-gas-row/send-gas-row.component.js b/ui/app/components/app/send/send-content/send-gas-row/send-gas-row.component.js similarity index 98% rename from ui/app/components/send/send-content/send-gas-row/send-gas-row.component.js rename to ui/app/components/app/send/send-content/send-gas-row/send-gas-row.component.js index bf7446626..424a65b20 100644 --- a/ui/app/components/send/send-content/send-gas-row/send-gas-row.component.js +++ b/ui/app/components/app/send/send-content/send-gas-row/send-gas-row.component.js @@ -1,6 +1,6 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' -import SendRowWrapper from '../send-row-wrapper/' +import SendRowWrapper from '../send-row-wrapper' import GasFeeDisplay from './gas-fee-display/gas-fee-display.component' import GasPriceButtonGroup from '../../../gas-customization/gas-price-button-group' import AdvancedGasInputs from '../../../gas-customization/advanced-gas-inputs' diff --git a/ui/app/components/send/send-content/send-gas-row/send-gas-row.container.js b/ui/app/components/app/send/send-content/send-gas-row/send-gas-row.container.js similarity index 94% rename from ui/app/components/send/send-content/send-gas-row/send-gas-row.container.js rename to ui/app/components/app/send/send-content/send-gas-row/send-gas-row.container.js index a187d61a2..f81670c02 100644 --- a/ui/app/components/send/send-content/send-gas-row/send-gas-row.container.js +++ b/ui/app/components/app/send/send-content/send-gas-row/send-gas-row.container.js @@ -15,18 +15,18 @@ import { getBasicGasEstimateLoadingStatus, getRenderableEstimateDataForSmallButtonsFromGWEI, getDefaultActiveButtonIndex, -} from '../../../../selectors/custom-gas' +} from '../../../../../selectors/custom-gas' import { showGasButtonGroup, -} from '../../../../ducks/send.duck' +} from '../../../../../ducks/send/send.duck' import { resetCustomData, setCustomGasPrice, setCustomGasLimit, -} from '../../../../ducks/gas.duck' +} from '../../../../../ducks/gas/gas.duck' import { getGasLoadingError, gasFeeIsInError, getGasButtonGroupShown } from './send-gas-row.selectors.js' -import { showModal, setGasPrice, setGasLimit, setGasTotal } from '../../../../actions' -import { getAdvancedInlineGasShown, getCurrentEthBalance, getSelectedToken } from '../../../../selectors' +import { showModal, setGasPrice, setGasLimit, setGasTotal } from '../../../../../store/actions' +import { getAdvancedInlineGasShown, getCurrentEthBalance, getSelectedToken } from '../../../../../selectors/selectors' import SendGasRow from './send-gas-row.component' export default connect(mapStateToProps, mapDispatchToProps, mergeProps)(SendGasRow) diff --git a/ui/app/components/send/send-content/send-gas-row/send-gas-row.scss b/ui/app/components/app/send/send-content/send-gas-row/send-gas-row.scss similarity index 100% rename from ui/app/components/send/send-content/send-gas-row/send-gas-row.scss rename to ui/app/components/app/send/send-content/send-gas-row/send-gas-row.scss diff --git a/ui/app/components/send/send-content/send-gas-row/send-gas-row.selectors.js b/ui/app/components/app/send/send-content/send-gas-row/send-gas-row.selectors.js similarity index 100% rename from ui/app/components/send/send-content/send-gas-row/send-gas-row.selectors.js rename to ui/app/components/app/send/send-content/send-gas-row/send-gas-row.selectors.js diff --git a/ui/app/components/send/send-content/send-gas-row/tests/send-gas-row-component.test.js b/ui/app/components/app/send/send-content/send-gas-row/tests/send-gas-row-component.test.js similarity index 100% rename from ui/app/components/send/send-content/send-gas-row/tests/send-gas-row-component.test.js rename to ui/app/components/app/send/send-content/send-gas-row/tests/send-gas-row-component.test.js diff --git a/ui/app/components/send/send-content/send-gas-row/tests/send-gas-row-container.test.js b/ui/app/components/app/send/send-content/send-gas-row/tests/send-gas-row-container.test.js similarity index 96% rename from ui/app/components/send/send-content/send-gas-row/tests/send-gas-row-container.test.js rename to ui/app/components/app/send/send-content/send-gas-row/tests/send-gas-row-container.test.js index 12e78657b..d1f753639 100644 --- a/ui/app/components/send/send-content/send-gas-row/tests/send-gas-row-container.test.js +++ b/ui/app/components/app/send/send-content/send-gas-row/tests/send-gas-row-container.test.js @@ -32,7 +32,7 @@ proxyquire('../send-gas-row.container.js', { return () => ({}) }, }, - '../../../../selectors': { + '../../../../../selectors/selectors': { getCurrentEthBalance: (s) => `mockCurrentEthBalance:${s}`, getAdvancedInlineGasShown: (s) => `mockAdvancedInlineGasShown:${s}`, getSelectedToken: () => false, @@ -59,14 +59,14 @@ proxyquire('../send-gas-row.container.js', { gasFeeIsInError: (s) => `mockGasFeeError:${s}`, getGasButtonGroupShown: (s) => `mockGetGasButtonGroupShown:${s}`, }, - '../../../../actions': actionSpies, - '../../../../selectors/custom-gas': { + '../../../../../store/actions': actionSpies, + '../../../../../selectors/custom-gas': { getBasicGasEstimateLoadingStatus: (s) => `mockBasicGasEstimateLoadingStatus:${s}`, getRenderableEstimateDataForSmallButtonsFromGWEI: (s) => `mockGasButtonInfo:${s}`, getDefaultActiveButtonIndex: (gasButtonInfo, gasPrice) => gasButtonInfo.length + gasPrice.length, }, - '../../../../ducks/send.duck': sendDuckSpies, - '../../../../ducks/gas.duck': gasDuckSpies, + '../../../../../ducks/send/send.duck': sendDuckSpies, + '../../../../../ducks/gas/gas.duck': gasDuckSpies, }) describe('send-gas-row container', () => { diff --git a/ui/app/components/send/send-content/send-gas-row/tests/send-gas-row-selectors.test.js b/ui/app/components/app/send/send-content/send-gas-row/tests/send-gas-row-selectors.test.js similarity index 100% rename from ui/app/components/send/send-content/send-gas-row/tests/send-gas-row-selectors.test.js rename to ui/app/components/app/send/send-content/send-gas-row/tests/send-gas-row-selectors.test.js diff --git a/ui/app/components/send/send-content/send-hex-data-row/index.js b/ui/app/components/app/send/send-content/send-hex-data-row/index.js similarity index 100% rename from ui/app/components/send/send-content/send-hex-data-row/index.js rename to ui/app/components/app/send/send-content/send-hex-data-row/index.js diff --git a/ui/app/components/send/send-content/send-hex-data-row/send-hex-data-row.component.js b/ui/app/components/app/send/send-content/send-hex-data-row/send-hex-data-row.component.js similarity index 100% rename from ui/app/components/send/send-content/send-hex-data-row/send-hex-data-row.component.js rename to ui/app/components/app/send/send-content/send-hex-data-row/send-hex-data-row.component.js diff --git a/ui/app/components/send/send-content/send-hex-data-row/send-hex-data-row.container.js b/ui/app/components/app/send/send-content/send-hex-data-row/send-hex-data-row.container.js similarity index 92% rename from ui/app/components/send/send-content/send-hex-data-row/send-hex-data-row.container.js rename to ui/app/components/app/send/send-content/send-hex-data-row/send-hex-data-row.container.js index df554ca5f..76c929d08 100644 --- a/ui/app/components/send/send-content/send-hex-data-row/send-hex-data-row.container.js +++ b/ui/app/components/app/send/send-content/send-hex-data-row/send-hex-data-row.container.js @@ -1,7 +1,7 @@ import { connect } from 'react-redux' import { updateSendHexData, -} from '../../../../actions' +} from '../../../../../store/actions' import SendHexDataRow from './send-hex-data-row.component' export default connect(mapStateToProps, mapDispatchToProps)(SendHexDataRow) diff --git a/ui/app/components/send/send-content/send-row-wrapper/index.js b/ui/app/components/app/send/send-content/send-row-wrapper/index.js similarity index 100% rename from ui/app/components/send/send-content/send-row-wrapper/index.js rename to ui/app/components/app/send/send-content/send-row-wrapper/index.js diff --git a/ui/app/components/send/send-content/send-row-wrapper/send-row-error-message/index.js b/ui/app/components/app/send/send-content/send-row-wrapper/send-row-error-message/index.js similarity index 100% rename from ui/app/components/send/send-content/send-row-wrapper/send-row-error-message/index.js rename to ui/app/components/app/send/send-content/send-row-wrapper/send-row-error-message/index.js diff --git a/ui/app/components/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message-README.md b/ui/app/components/app/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message-README.md similarity index 100% rename from ui/app/components/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message-README.md rename to ui/app/components/app/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message-README.md diff --git a/ui/app/components/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.component.js b/ui/app/components/app/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.component.js similarity index 100% rename from ui/app/components/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.component.js rename to ui/app/components/app/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.component.js diff --git a/ui/app/components/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.container.js b/ui/app/components/app/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.container.js similarity index 100% rename from ui/app/components/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.container.js rename to ui/app/components/app/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.container.js diff --git a/ui/app/components/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.scss b/ui/app/components/app/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.scss similarity index 100% rename from ui/app/components/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.scss rename to ui/app/components/app/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.scss diff --git a/ui/app/components/send/send-content/send-row-wrapper/send-row-error-message/tests/send-row-error-message-component.test.js b/ui/app/components/app/send/send-content/send-row-wrapper/send-row-error-message/tests/send-row-error-message-component.test.js similarity index 100% rename from ui/app/components/send/send-content/send-row-wrapper/send-row-error-message/tests/send-row-error-message-component.test.js rename to ui/app/components/app/send/send-content/send-row-wrapper/send-row-error-message/tests/send-row-error-message-component.test.js diff --git a/ui/app/components/send/send-content/send-row-wrapper/send-row-error-message/tests/send-row-error-message-container.test.js b/ui/app/components/app/send/send-content/send-row-wrapper/send-row-error-message/tests/send-row-error-message-container.test.js similarity index 100% rename from ui/app/components/send/send-content/send-row-wrapper/send-row-error-message/tests/send-row-error-message-container.test.js rename to ui/app/components/app/send/send-content/send-row-wrapper/send-row-error-message/tests/send-row-error-message-container.test.js diff --git a/ui/app/components/send/send-content/send-row-wrapper/send-row-warning-message/index.js b/ui/app/components/app/send/send-content/send-row-wrapper/send-row-warning-message/index.js similarity index 100% rename from ui/app/components/send/send-content/send-row-wrapper/send-row-warning-message/index.js rename to ui/app/components/app/send/send-content/send-row-wrapper/send-row-warning-message/index.js diff --git a/ui/app/components/send/send-content/send-row-wrapper/send-row-warning-message/send-row-warning-message.component.js b/ui/app/components/app/send/send-content/send-row-wrapper/send-row-warning-message/send-row-warning-message.component.js similarity index 100% rename from ui/app/components/send/send-content/send-row-wrapper/send-row-warning-message/send-row-warning-message.component.js rename to ui/app/components/app/send/send-content/send-row-wrapper/send-row-warning-message/send-row-warning-message.component.js diff --git a/ui/app/components/send/send-content/send-row-wrapper/send-row-warning-message/send-row-warning-message.container.js b/ui/app/components/app/send/send-content/send-row-wrapper/send-row-warning-message/send-row-warning-message.container.js similarity index 100% rename from ui/app/components/send/send-content/send-row-wrapper/send-row-warning-message/send-row-warning-message.container.js rename to ui/app/components/app/send/send-content/send-row-wrapper/send-row-warning-message/send-row-warning-message.container.js diff --git a/ui/app/components/send/send-content/send-row-wrapper/send-row-warning-message/send-row-warning-message.scss b/ui/app/components/app/send/send-content/send-row-wrapper/send-row-warning-message/send-row-warning-message.scss similarity index 100% rename from ui/app/components/send/send-content/send-row-wrapper/send-row-warning-message/send-row-warning-message.scss rename to ui/app/components/app/send/send-content/send-row-wrapper/send-row-warning-message/send-row-warning-message.scss diff --git a/ui/app/components/send/send-content/send-row-wrapper/send-row-warning-message/tests/send-row-warning-message-component.test.js b/ui/app/components/app/send/send-content/send-row-wrapper/send-row-warning-message/tests/send-row-warning-message-component.test.js similarity index 100% rename from ui/app/components/send/send-content/send-row-wrapper/send-row-warning-message/tests/send-row-warning-message-component.test.js rename to ui/app/components/app/send/send-content/send-row-wrapper/send-row-warning-message/tests/send-row-warning-message-component.test.js diff --git a/ui/app/components/send/send-content/send-row-wrapper/send-row-warning-message/tests/send-row-warning-message-container.test.js b/ui/app/components/app/send/send-content/send-row-wrapper/send-row-warning-message/tests/send-row-warning-message-container.test.js similarity index 100% rename from ui/app/components/send/send-content/send-row-wrapper/send-row-warning-message/tests/send-row-warning-message-container.test.js rename to ui/app/components/app/send/send-content/send-row-wrapper/send-row-warning-message/tests/send-row-warning-message-container.test.js diff --git a/ui/app/components/send/send-content/send-row-wrapper/send-row-wrapper-README.md b/ui/app/components/app/send/send-content/send-row-wrapper/send-row-wrapper-README.md similarity index 100% rename from ui/app/components/send/send-content/send-row-wrapper/send-row-wrapper-README.md rename to ui/app/components/app/send/send-content/send-row-wrapper/send-row-wrapper-README.md diff --git a/ui/app/components/send/send-content/send-row-wrapper/send-row-wrapper.component.js b/ui/app/components/app/send/send-content/send-row-wrapper/send-row-wrapper.component.js similarity index 90% rename from ui/app/components/send/send-content/send-row-wrapper/send-row-wrapper.component.js rename to ui/app/components/app/send/send-content/send-row-wrapper/send-row-wrapper.component.js index 0146ce645..94309bd96 100644 --- a/ui/app/components/send/send-content/send-row-wrapper/send-row-wrapper.component.js +++ b/ui/app/components/app/send/send-content/send-row-wrapper/send-row-wrapper.component.js @@ -1,7 +1,7 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' -import SendRowErrorMessage from './send-row-error-message/' -import SendRowWarningMessage from './send-row-warning-message/' +import SendRowErrorMessage from './send-row-error-message' +import SendRowWarningMessage from './send-row-warning-message' export default class SendRowWrapper extends Component { diff --git a/ui/app/components/send/send-content/send-row-wrapper/send-row-wrapper.scss b/ui/app/components/app/send/send-content/send-row-wrapper/send-row-wrapper.scss similarity index 100% rename from ui/app/components/send/send-content/send-row-wrapper/send-row-wrapper.scss rename to ui/app/components/app/send/send-content/send-row-wrapper/send-row-wrapper.scss diff --git a/ui/app/components/send/send-content/send-row-wrapper/tests/send-row-wrapper-component.test.js b/ui/app/components/app/send/send-content/send-row-wrapper/tests/send-row-wrapper-component.test.js similarity index 100% rename from ui/app/components/send/send-content/send-row-wrapper/tests/send-row-wrapper-component.test.js rename to ui/app/components/app/send/send-content/send-row-wrapper/tests/send-row-wrapper-component.test.js diff --git a/ui/app/components/send/send-content/send-to-row/index.js b/ui/app/components/app/send/send-content/send-to-row/index.js similarity index 100% rename from ui/app/components/send/send-content/send-to-row/index.js rename to ui/app/components/app/send/send-content/send-to-row/index.js diff --git a/ui/app/components/send/send-content/send-to-row/send-to-row-README.md b/ui/app/components/app/send/send-content/send-to-row/send-to-row-README.md similarity index 100% rename from ui/app/components/send/send-content/send-to-row/send-to-row-README.md rename to ui/app/components/app/send/send-content/send-to-row/send-to-row-README.md diff --git a/ui/app/components/send/send-content/send-to-row/send-to-row.component.js b/ui/app/components/app/send/send-content/send-to-row/send-to-row.component.js similarity index 98% rename from ui/app/components/send/send-content/send-to-row/send-to-row.component.js rename to ui/app/components/app/send/send-content/send-to-row/send-to-row.component.js index 434204490..e8a55cb2a 100644 --- a/ui/app/components/send/send-content/send-to-row/send-to-row.component.js +++ b/ui/app/components/app/send/send-content/send-to-row/send-to-row.component.js @@ -1,6 +1,6 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' -import SendRowWrapper from '../send-row-wrapper/' +import SendRowWrapper from '../send-row-wrapper' import EnsInput from '../../../ens-input' import { getToErrorObject, getToWarningObject } from './send-to-row.utils.js' diff --git a/ui/app/components/send/send-content/send-to-row/send-to-row.container.js b/ui/app/components/app/send/send-content/send-to-row/send-to-row.container.js similarity index 94% rename from ui/app/components/send/send-content/send-to-row/send-to-row.container.js rename to ui/app/components/app/send/send-content/send-to-row/send-to-row.container.js index fc6742df0..30865d295 100644 --- a/ui/app/components/send/send-content/send-to-row/send-to-row.container.js +++ b/ui/app/components/app/send/send-content/send-to-row/send-to-row.container.js @@ -14,13 +14,13 @@ import { } from './send-to-row.selectors.js' import { updateSendTo, -} from '../../../../actions' +} from '../../../../../store/actions' import { updateSendErrors, updateSendWarnings, openToDropdown, closeToDropdown, -} from '../../../../ducks/send.duck' +} from '../../../../../ducks/send/send.duck' import SendToRow from './send-to-row.component' export default connect(mapStateToProps, mapDispatchToProps)(SendToRow) diff --git a/ui/app/components/send/send-content/send-to-row/send-to-row.selectors.js b/ui/app/components/app/send/send-content/send-to-row/send-to-row.selectors.js similarity index 100% rename from ui/app/components/send/send-content/send-to-row/send-to-row.selectors.js rename to ui/app/components/app/send/send-content/send-to-row/send-to-row.selectors.js diff --git a/ui/app/components/send/send-content/send-to-row/send-to-row.utils.js b/ui/app/components/app/send/send-content/send-to-row/send-to-row.utils.js similarity index 87% rename from ui/app/components/send/send-content/send-to-row/send-to-row.utils.js rename to ui/app/components/app/send/send-content/send-to-row/send-to-row.utils.js index 2bd3ea45e..60e75d34c 100644 --- a/ui/app/components/send/send-content/send-to-row/send-to-row.utils.js +++ b/ui/app/components/app/send/send-content/send-to-row/send-to-row.utils.js @@ -4,8 +4,8 @@ const { KNOWN_RECIPIENT_ADDRESS_ERROR, INVALID_RECIPIENT_ADDRESS_NOT_ETH_NETWORK_ERROR, } = require('../../send.constants') -const { isValidAddress, isEthNetwork } = require('../../../../util') -import { checkExistingAddresses } from '../../../pages/add-token/util' +const { isValidAddress, isEthNetwork } = require('../../../../../helpers/utils/util') +import { checkExistingAddresses } from '../../../../../pages/add-token/util' const ethUtil = require('ethereumjs-util') const contractMap = require('eth-contract-metadata') diff --git a/ui/app/components/send/send-content/send-to-row/tests/send-to-row-component.test.js b/ui/app/components/app/send/send-content/send-to-row/tests/send-to-row-component.test.js similarity index 100% rename from ui/app/components/send/send-content/send-to-row/tests/send-to-row-component.test.js rename to ui/app/components/app/send/send-content/send-to-row/tests/send-to-row-component.test.js diff --git a/ui/app/components/send/send-content/send-to-row/tests/send-to-row-container.test.js b/ui/app/components/app/send/send-content/send-to-row/tests/send-to-row-container.test.js similarity index 97% rename from ui/app/components/send/send-content/send-to-row/tests/send-to-row-container.test.js rename to ui/app/components/app/send/send-content/send-to-row/tests/send-to-row-container.test.js index aa09f01a9..94b4f1024 100644 --- a/ui/app/components/send/send-content/send-to-row/tests/send-to-row-container.test.js +++ b/ui/app/components/app/send/send-content/send-to-row/tests/send-to-row-container.test.js @@ -36,8 +36,8 @@ proxyquire('../send-to-row.container.js', { sendToIsInWarning: (s) => `mockInWarning:${s}`, getTokens: (s) => `mockTokens:${s}`, }, - '../../../../actions': actionSpies, - '../../../../ducks/send.duck': duckActionSpies, + '../../../../../store/actions': actionSpies, + '../../../../../ducks/send/send.duck': duckActionSpies, }) describe('send-to-row container', () => { diff --git a/ui/app/components/send/send-content/send-to-row/tests/send-to-row-selectors.test.js b/ui/app/components/app/send/send-content/send-to-row/tests/send-to-row-selectors.test.js similarity index 100% rename from ui/app/components/send/send-content/send-to-row/tests/send-to-row-selectors.test.js rename to ui/app/components/app/send/send-content/send-to-row/tests/send-to-row-selectors.test.js diff --git a/ui/app/components/send/send-content/send-to-row/tests/send-to-row-utils.test.js b/ui/app/components/app/send/send-content/send-to-row/tests/send-to-row-utils.test.js similarity index 98% rename from ui/app/components/send/send-content/send-to-row/tests/send-to-row-utils.test.js rename to ui/app/components/app/send/send-content/send-to-row/tests/send-to-row-utils.test.js index f6abb26e6..95882d640 100644 --- a/ui/app/components/send/send-content/send-to-row/tests/send-to-row-utils.test.js +++ b/ui/app/components/app/send/send-content/send-to-row/tests/send-to-row-utils.test.js @@ -13,7 +13,7 @@ const stubs = { } const toRowUtils = proxyquire('../send-to-row.utils.js', { - '../../../../util': { + '../../../../../helpers/utils/util': { isValidAddress: stubs.isValidAddress, }, }) diff --git a/ui/app/components/send/send-content/tests/send-content-component.test.js b/ui/app/components/app/send/send-content/tests/send-content-component.test.js similarity index 95% rename from ui/app/components/send/send-content/tests/send-content-component.test.js rename to ui/app/components/app/send/send-content/tests/send-content-component.test.js index c5a11c8bb..7d102c930 100644 --- a/ui/app/components/send/send-content/tests/send-content-component.test.js +++ b/ui/app/components/app/send/send-content/tests/send-content-component.test.js @@ -3,7 +3,7 @@ import assert from 'assert' import { shallow } from 'enzyme' import SendContent from '../send-content.component.js' -import PageContainerContent from '../../../page-container/page-container-content.component' +import PageContainerContent from '../../../../ui/page-container/page-container-content.component' import SendAmountRow from '../send-amount-row/send-amount-row.container' import SendFromRow from '../send-from-row/send-from-row.container' import SendGasRow from '../send-gas-row/send-gas-row.container' diff --git a/ui/app/components/send/send-footer/README.md b/ui/app/components/app/send/send-footer/README.md similarity index 100% rename from ui/app/components/send/send-footer/README.md rename to ui/app/components/app/send/send-footer/README.md diff --git a/ui/app/components/send/send-footer/index.js b/ui/app/components/app/send/send-footer/index.js similarity index 100% rename from ui/app/components/send/send-footer/index.js rename to ui/app/components/app/send/send-footer/index.js diff --git a/ui/app/components/send/send-footer/send-footer.component.js b/ui/app/components/app/send/send-footer/send-footer.component.js similarity index 96% rename from ui/app/components/send/send-footer/send-footer.component.js rename to ui/app/components/app/send/send-footer/send-footer.component.js index d943b4b22..cc891a9b3 100644 --- a/ui/app/components/send/send-footer/send-footer.component.js +++ b/ui/app/components/app/send/send-footer/send-footer.component.js @@ -1,7 +1,7 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' -import PageContainerFooter from '../../page-container/page-container-footer' -import { CONFIRM_TRANSACTION_ROUTE, DEFAULT_ROUTE } from '../../../routes' +import PageContainerFooter from '../../../ui/page-container/page-container-footer' +import { CONFIRM_TRANSACTION_ROUTE, DEFAULT_ROUTE } from '../../../../helpers/constants/routes' export default class SendFooter extends Component { diff --git a/ui/app/components/send/send-footer/send-footer.container.js b/ui/app/components/app/send/send-footer/send-footer.container.js similarity index 98% rename from ui/app/components/send/send-footer/send-footer.container.js rename to ui/app/components/app/send/send-footer/send-footer.container.js index 0c6120cc5..502159a81 100644 --- a/ui/app/components/send/send-footer/send-footer.container.js +++ b/ui/app/components/app/send/send-footer/send-footer.container.js @@ -6,7 +6,7 @@ import { signTokenTx, signTx, updateTransaction, -} from '../../../actions' +} from '../../../../store/actions' import SendFooter from './send-footer.component' import { getGasLimit, diff --git a/ui/app/components/send/send-footer/send-footer.scss b/ui/app/components/app/send/send-footer/send-footer.scss similarity index 100% rename from ui/app/components/send/send-footer/send-footer.scss rename to ui/app/components/app/send/send-footer/send-footer.scss diff --git a/ui/app/components/send/send-footer/send-footer.selectors.js b/ui/app/components/app/send/send-footer/send-footer.selectors.js similarity index 100% rename from ui/app/components/send/send-footer/send-footer.selectors.js rename to ui/app/components/app/send/send-footer/send-footer.selectors.js diff --git a/ui/app/components/send/send-footer/send-footer.utils.js b/ui/app/components/app/send/send-footer/send-footer.utils.js similarity index 100% rename from ui/app/components/send/send-footer/send-footer.utils.js rename to ui/app/components/app/send/send-footer/send-footer.utils.js diff --git a/ui/app/components/send/send-footer/tests/send-footer-component.test.js b/ui/app/components/app/send/send-footer/tests/send-footer-component.test.js similarity index 98% rename from ui/app/components/send/send-footer/tests/send-footer-component.test.js rename to ui/app/components/app/send/send-footer/tests/send-footer-component.test.js index 4b63e422d..6683ca8c0 100644 --- a/ui/app/components/send/send-footer/tests/send-footer-component.test.js +++ b/ui/app/components/app/send/send-footer/tests/send-footer-component.test.js @@ -2,10 +2,10 @@ import React from 'react' import assert from 'assert' import { shallow } from 'enzyme' import sinon from 'sinon' -import { CONFIRM_TRANSACTION_ROUTE, DEFAULT_ROUTE } from '../../../../routes' +import { CONFIRM_TRANSACTION_ROUTE, DEFAULT_ROUTE } from '../../../../../helpers/constants/routes' import SendFooter from '../send-footer.component.js' -import PageContainerFooter from '../../../page-container/page-container-footer' +import PageContainerFooter from '../../../../ui/page-container/page-container-footer' const propsMethodSpies = { addToAddressBookIfNew: sinon.spy(), diff --git a/ui/app/components/send/send-footer/tests/send-footer-container.test.js b/ui/app/components/app/send/send-footer/tests/send-footer-container.test.js similarity index 99% rename from ui/app/components/send/send-footer/tests/send-footer-container.test.js rename to ui/app/components/app/send/send-footer/tests/send-footer-container.test.js index 70cb28df3..878b0aa19 100644 --- a/ui/app/components/send/send-footer/tests/send-footer-container.test.js +++ b/ui/app/components/app/send/send-footer/tests/send-footer-container.test.js @@ -28,7 +28,7 @@ proxyquire('../send-footer.container.js', { return () => ({}) }, }, - '../../../actions': actionSpies, + '../../../../store/actions': actionSpies, '../send.selectors': { getGasLimit: (s) => `mockGasLimit:${s}`, getGasPrice: (s) => `mockGasPrice:${s}`, diff --git a/ui/app/components/send/send-footer/tests/send-footer-selectors.test.js b/ui/app/components/app/send/send-footer/tests/send-footer-selectors.test.js similarity index 100% rename from ui/app/components/send/send-footer/tests/send-footer-selectors.test.js rename to ui/app/components/app/send/send-footer/tests/send-footer-selectors.test.js diff --git a/ui/app/components/send/send-footer/tests/send-footer-utils.test.js b/ui/app/components/app/send/send-footer/tests/send-footer-utils.test.js similarity index 100% rename from ui/app/components/send/send-footer/tests/send-footer-utils.test.js rename to ui/app/components/app/send/send-footer/tests/send-footer-utils.test.js diff --git a/ui/app/components/send/send-header/README.md b/ui/app/components/app/send/send-header/README.md similarity index 100% rename from ui/app/components/send/send-header/README.md rename to ui/app/components/app/send/send-header/README.md diff --git a/ui/app/components/send/send-header/index.js b/ui/app/components/app/send/send-header/index.js similarity index 100% rename from ui/app/components/send/send-header/index.js rename to ui/app/components/app/send/send-header/index.js diff --git a/ui/app/components/send/send-header/send-header.component.js b/ui/app/components/app/send/send-header/send-header.component.js similarity index 81% rename from ui/app/components/send/send-header/send-header.component.js rename to ui/app/components/app/send/send-header/send-header.component.js index efc4bbf27..f216954ef 100644 --- a/ui/app/components/send/send-header/send-header.component.js +++ b/ui/app/components/app/send/send-header/send-header.component.js @@ -1,7 +1,7 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' -import PageContainerHeader from '../../page-container/page-container-header' -import { DEFAULT_ROUTE } from '../../../routes' +import PageContainerHeader from '../../../ui/page-container/page-container-header' +import { DEFAULT_ROUTE } from '../../../../helpers/constants/routes' export default class SendHeader extends Component { diff --git a/ui/app/components/send/send-header/send-header.container.js b/ui/app/components/app/send/send-header/send-header.container.js similarity index 89% rename from ui/app/components/send/send-header/send-header.container.js rename to ui/app/components/app/send/send-header/send-header.container.js index 4bcd0d1b6..ce53fba9a 100644 --- a/ui/app/components/send/send-header/send-header.container.js +++ b/ui/app/components/app/send/send-header/send-header.container.js @@ -1,5 +1,5 @@ import { connect } from 'react-redux' -import { clearSend } from '../../../actions' +import { clearSend } from '../../../../store/actions' import SendHeader from './send-header.component' import { getSubtitleParams, getTitleKey } from './send-header.selectors' diff --git a/ui/app/components/send/send-header/send-header.selectors.js b/ui/app/components/app/send/send-header/send-header.selectors.js similarity index 100% rename from ui/app/components/send/send-header/send-header.selectors.js rename to ui/app/components/app/send/send-header/send-header.selectors.js diff --git a/ui/app/components/send/send-header/tests/send-header-component.test.js b/ui/app/components/app/send/send-header/tests/send-header-component.test.js similarity index 92% rename from ui/app/components/send/send-header/tests/send-header-component.test.js rename to ui/app/components/app/send/send-header/tests/send-header-component.test.js index 930bfa387..db2ee8967 100644 --- a/ui/app/components/send/send-header/tests/send-header-component.test.js +++ b/ui/app/components/app/send/send-header/tests/send-header-component.test.js @@ -2,10 +2,10 @@ import React from 'react' import assert from 'assert' import { shallow } from 'enzyme' import sinon from 'sinon' -import { DEFAULT_ROUTE } from '../../../../routes' +import { DEFAULT_ROUTE } from '../../../../../helpers/constants/routes' import SendHeader from '../send-header.component.js' -import PageContainerHeader from '../../../page-container/page-container-header' +import PageContainerHeader from '../../../../ui/page-container/page-container-header' const propsMethodSpies = { clearSend: sinon.spy(), diff --git a/ui/app/components/send/send-header/tests/send-header-container.test.js b/ui/app/components/app/send/send-header/tests/send-header-container.test.js similarity index 96% rename from ui/app/components/send/send-header/tests/send-header-container.test.js rename to ui/app/components/app/send/send-header/tests/send-header-container.test.js index 41a7e8a89..634c3424b 100644 --- a/ui/app/components/send/send-header/tests/send-header-container.test.js +++ b/ui/app/components/app/send/send-header/tests/send-header-container.test.js @@ -17,7 +17,7 @@ proxyquire('../send-header.container.js', { return () => ({}) }, }, - '../../../actions': actionSpies, + '../../../../store/actions': actionSpies, './send-header.selectors': { getTitleKey: (s) => `mockTitleKey:${s}`, getSubtitleParams: (s) => `mockSubtitleParams:${s}`, diff --git a/ui/app/components/send/send-header/tests/send-header-selectors.test.js b/ui/app/components/app/send/send-header/tests/send-header-selectors.test.js similarity index 100% rename from ui/app/components/send/send-header/tests/send-header-selectors.test.js rename to ui/app/components/app/send/send-header/tests/send-header-selectors.test.js diff --git a/ui/app/components/send/send.component.js b/ui/app/components/app/send/send.component.js similarity index 96% rename from ui/app/components/send/send.component.js rename to ui/app/components/app/send/send.component.js index 9b512aaf6..a38b681b0 100644 --- a/ui/app/components/send/send.component.js +++ b/ui/app/components/app/send/send.component.js @@ -1,6 +1,6 @@ import React from 'react' import PropTypes from 'prop-types' -import PersistentForm from '../../../lib/persistent-form' +import PersistentForm from '../../../../lib/persistent-form' import { getAmountErrorObject, getGasFeeErrorObject, @@ -8,9 +8,9 @@ import { doesAmountErrorRequireUpdate, } from './send.utils' -import SendHeader from './send-header/' -import SendContent from './send-content/' -import SendFooter from './send-footer/' +import SendHeader from './send-header' +import SendContent from './send-content' +import SendFooter from './send-footer' export default class SendTransactionScreen extends PersistentForm { diff --git a/ui/app/components/send/send.constants.js b/ui/app/components/app/send/send.constants.js similarity index 95% rename from ui/app/components/send/send.constants.js rename to ui/app/components/app/send/send.constants.js index 490bc6fd2..36549038e 100644 --- a/ui/app/components/send/send.constants.js +++ b/ui/app/components/app/send/send.constants.js @@ -1,5 +1,5 @@ const ethUtil = require('ethereumjs-util') -const { conversionUtil, multiplyCurrencies } = require('../../conversion-util') +const { conversionUtil, multiplyCurrencies } = require('../../../helpers/utils/conversion-util') const MIN_GAS_PRICE_DEC = '0' const MIN_GAS_PRICE_HEX = (parseInt(MIN_GAS_PRICE_DEC)).toString(16) diff --git a/ui/app/components/send/send.container.js b/ui/app/components/app/send/send.container.js similarity index 95% rename from ui/app/components/send/send.container.js rename to ui/app/components/app/send/send.container.js index 402e4bbe5..e65463b93 100644 --- a/ui/app/components/send/send.container.js +++ b/ui/app/components/app/send/send.container.js @@ -31,21 +31,21 @@ import { setGasTotal, showQrScanner, qrCodeDetected, -} from '../../actions' +} from '../../../store/actions' import { resetSendState, updateSendErrors, -} from '../../ducks/send.duck' +} from '../../../ducks/send/send.duck' import { fetchBasicGasEstimates, -} from '../../ducks/gas.duck' +} from '../../../ducks/gas/gas.duck' import { calcGasTotal, } from './send.utils.js' import { SEND_ROUTE, -} from '../../routes' +} from '../../../helpers/constants/routes' module.exports = compose( withRouter, diff --git a/ui/app/components/send/send.scss b/ui/app/components/app/send/send.scss similarity index 100% rename from ui/app/components/send/send.scss rename to ui/app/components/app/send/send.scss diff --git a/ui/app/components/send/send.selectors.js b/ui/app/components/app/send/send.selectors.js similarity index 97% rename from ui/app/components/send/send.selectors.js rename to ui/app/components/app/send/send.selectors.js index 47a49500f..2ec677ad1 100644 --- a/ui/app/components/send/send.selectors.js +++ b/ui/app/components/app/send/send.selectors.js @@ -1,18 +1,18 @@ -const { valuesFor } = require('../../util') +const { valuesFor } = require('../../../helpers/utils/util') const abi = require('human-standard-token-abi') const { multiplyCurrencies, -} = require('../../conversion-util') +} = require('../../../helpers/utils/conversion-util') const { getMetaMaskAccounts, -} = require('../../selectors') +} = require('../../../selectors/selectors') const { estimateGasPriceFromRecentBlocks, calcGasTotal, } = require('./send.utils') import { getFastPriceEstimateInHexWEI, -} from '../../selectors/custom-gas' +} from '../../../selectors/custom-gas' const selectors = { accountsWithSendEtherInfoSelector, diff --git a/ui/app/components/send/send.utils.js b/ui/app/components/app/send/send.utils.js similarity index 98% rename from ui/app/components/send/send.utils.js rename to ui/app/components/app/send/send.utils.js index d78b7736f..7609d46ea 100644 --- a/ui/app/components/send/send.utils.js +++ b/ui/app/components/app/send/send.utils.js @@ -5,10 +5,10 @@ const { multiplyCurrencies, conversionGreaterThan, conversionLessThan, -} = require('../../conversion-util') +} = require('../../../helpers/utils/conversion-util') const { calcTokenAmount, -} = require('../../token-util') +} = require('../../../helpers/utils/token-util') const { BASE_TOKEN_GAS_COST, INSUFFICIENT_FUNDS_ERROR, diff --git a/ui/app/components/send/tests/send-component.test.js b/ui/app/components/app/send/tests/send-component.test.js similarity index 99% rename from ui/app/components/send/tests/send-component.test.js rename to ui/app/components/app/send/tests/send-component.test.js index 81955cc1d..738c14839 100644 --- a/ui/app/components/send/tests/send-component.test.js +++ b/ui/app/components/app/send/tests/send-component.test.js @@ -3,7 +3,7 @@ import assert from 'assert' import proxyquire from 'proxyquire' import { shallow } from 'enzyme' import sinon from 'sinon' -import timeout from '../../../../lib/test-timeout' +import timeout from '../../../../../lib/test-timeout' import SendHeader from '../send-header/send-header.container' import SendContent from '../send-content/send-content.component' diff --git a/ui/app/components/send/tests/send-container.test.js b/ui/app/components/app/send/tests/send-container.test.js similarity index 98% rename from ui/app/components/send/tests/send-container.test.js rename to ui/app/components/app/send/tests/send-container.test.js index 19b6563e6..9538b67b3 100644 --- a/ui/app/components/send/tests/send-container.test.js +++ b/ui/app/components/app/send/tests/send-container.test.js @@ -47,8 +47,8 @@ proxyquire('../send.container.js', { getTokenBalance: (s) => `mockTokenBalance:${s}`, getQrCodeData: (s) => `mockQrCodeData:${s}`, }, - '../../actions': actionSpies, - '../../ducks/send.duck': duckActionSpies, + '../../../store/actions': actionSpies, + '../../../ducks/send/send.duck': duckActionSpies, './send.utils.js': { calcGasTotal: (gasLimit, gasPrice) => gasLimit + gasPrice, }, diff --git a/ui/app/components/send/tests/send-selectors-test-data.js b/ui/app/components/app/send/tests/send-selectors-test-data.js similarity index 100% rename from ui/app/components/send/tests/send-selectors-test-data.js rename to ui/app/components/app/send/tests/send-selectors-test-data.js diff --git a/ui/app/components/send/tests/send-selectors.test.js b/ui/app/components/app/send/tests/send-selectors.test.js similarity index 100% rename from ui/app/components/send/tests/send-selectors.test.js rename to ui/app/components/app/send/tests/send-selectors.test.js diff --git a/ui/app/components/send/tests/send-utils.test.js b/ui/app/components/app/send/tests/send-utils.test.js similarity index 98% rename from ui/app/components/send/tests/send-utils.test.js rename to ui/app/components/app/send/tests/send-utils.test.js index 48fa09392..fc4c6deed 100644 --- a/ui/app/components/send/tests/send-utils.test.js +++ b/ui/app/components/app/send/tests/send-utils.test.js @@ -9,7 +9,7 @@ import { const { addCurrencies, subtractCurrencies, -} = require('../../../conversion-util') +} = require('../../../../helpers/utils/conversion-util') const { INSUFFICIENT_FUNDS_ERROR, @@ -32,7 +32,7 @@ const stubs = { } const sendUtils = proxyquire('../send.utils.js', { - '../../conversion-util': { + '../../../helpers/utils/conversion-util': { addCurrencies: stubs.addCurrencies, conversionUtil: stubs.conversionUtil, conversionGTE: stubs.conversionGTE, @@ -40,7 +40,7 @@ const sendUtils = proxyquire('../send.utils.js', { conversionGreaterThan: stubs.conversionGreaterThan, conversionLessThan: stubs.conversionLessThan, }, - '../../token-util': { calcTokenAmount: stubs.calcTokenAmount }, + '../../../helpers/utils/token-util': { calcTokenAmount: stubs.calcTokenAmount }, 'ethereumjs-abi': { rawEncode: stubs.rawEncode, }, diff --git a/ui/app/components/send/to-autocomplete.component.js b/ui/app/components/app/send/to-autocomplete.component.js similarity index 97% rename from ui/app/components/send/to-autocomplete.component.js rename to ui/app/components/app/send/to-autocomplete.component.js index 9e270db75..183967c58 100644 --- a/ui/app/components/send/to-autocomplete.component.js +++ b/ui/app/components/app/send/to-autocomplete.component.js @@ -1,7 +1,7 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' -import AccountListItem from '../send/account-list-item/account-list-item.component' +import AccountListItem from './account-list-item/account-list-item.component' export default class ToAutoComplete extends Component { diff --git a/ui/app/components/send/to-autocomplete/index.js b/ui/app/components/app/send/to-autocomplete/index.js similarity index 100% rename from ui/app/components/send/to-autocomplete/index.js rename to ui/app/components/app/send/to-autocomplete/index.js diff --git a/ui/app/components/send/to-autocomplete/to-autocomplete.js b/ui/app/components/app/send/to-autocomplete/to-autocomplete.js similarity index 96% rename from ui/app/components/send/to-autocomplete/to-autocomplete.js rename to ui/app/components/app/send/to-autocomplete/to-autocomplete.js index 39d15dfa7..d3db8cb59 100644 --- a/ui/app/components/send/to-autocomplete/to-autocomplete.js +++ b/ui/app/components/app/send/to-autocomplete/to-autocomplete.js @@ -4,8 +4,8 @@ const h = require('react-hyperscript') const inherits = require('util').inherits const AccountListItem = require('../account-list-item/account-list-item.component').default const connect = require('react-redux').connect -const Tooltip = require('../../tooltip') -const checksumAddress = require('../../../util').checksumAddress +const Tooltip = require('../../../ui/tooltip') +const checksumAddress = require('../../../../helpers/utils/util').checksumAddress ToAutoComplete.contextTypes = { t: PropTypes.func, diff --git a/ui/app/components/shapeshift-form.js b/ui/app/components/app/shapeshift-form.js similarity index 98% rename from ui/app/components/shapeshift-form.js rename to ui/app/components/app/shapeshift-form.js index b22c01e8f..11459fd5e 100644 --- a/ui/app/components/shapeshift-form.js +++ b/ui/app/components/app/shapeshift-form.js @@ -5,11 +5,11 @@ const Component = require('react').Component const connect = require('react-redux').connect const classnames = require('classnames') const qrcode = require('qrcode-generator') -const { shapeShiftSubview, pairUpdate, buyWithShapeShift } = require('../actions') -const { isValidAddress } = require('../util') +const { shapeShiftSubview, pairUpdate, buyWithShapeShift } = require('../../store/actions') +const { isValidAddress } = require('../../helpers/utils/util') const SimpleDropdown = require('./dropdowns/simple-dropdown') -import Button from './button' +import Button from '../ui/button' function mapStateToProps (state) { const { diff --git a/ui/app/components/shift-list-item.js b/ui/app/components/app/shift-list-item.js similarity index 95% rename from ui/app/components/shift-list-item.js rename to ui/app/components/app/shift-list-item.js index 2d08bbddc..f5fa00047 100644 --- a/ui/app/components/shift-list-item.js +++ b/ui/app/components/app/shift-list-item.js @@ -4,12 +4,12 @@ const PropTypes = require('prop-types') const h = require('react-hyperscript') const connect = require('react-redux').connect const explorerLink = require('etherscan-link').createExplorerLink -const actions = require('../actions') -const { formatDate, addressSummary } = require('../util') +const actions = require('../../store/actions') +const { formatDate, addressSummary } = require('../../helpers/utils/util') -const CopyButton = require('./copyButton') -const EthBalance = require('./eth-balance') -const Tooltip = require('./tooltip') +const CopyButton = require('../ui/copyButton') +const EthBalance = require('../ui/eth-balance') +const Tooltip = require('../ui/tooltip') ShiftListItem.contextTypes = { diff --git a/ui/app/components/sidebars/index.js b/ui/app/components/app/sidebars/index.js similarity index 100% rename from ui/app/components/sidebars/index.js rename to ui/app/components/app/sidebars/index.js diff --git a/ui/app/components/sidebars/index.scss b/ui/app/components/app/sidebars/index.scss similarity index 98% rename from ui/app/components/sidebars/index.scss rename to ui/app/components/app/sidebars/index.scss index b9845d564..08181426f 100644 --- a/ui/app/components/sidebars/index.scss +++ b/ui/app/components/app/sidebars/index.scss @@ -1,4 +1,4 @@ -@import './sidebar-content'; +@import 'sidebar-content'; .sidebar-right-enter { transition: transform 300ms ease-in-out; @@ -78,4 +78,4 @@ opacity: 1; visibility: visible; background-color: rgba(0, 0, 0, .3); -} \ No newline at end of file +} diff --git a/ui/app/components/sidebars/sidebar-content.scss b/ui/app/components/app/sidebars/sidebar-content.scss similarity index 100% rename from ui/app/components/sidebars/sidebar-content.scss rename to ui/app/components/app/sidebars/sidebar-content.scss diff --git a/ui/app/components/sidebars/sidebar.component.js b/ui/app/components/app/sidebars/sidebar.component.js similarity index 100% rename from ui/app/components/sidebars/sidebar.component.js rename to ui/app/components/app/sidebars/sidebar.component.js diff --git a/ui/app/components/sidebars/sidebar.constants.js b/ui/app/components/app/sidebars/sidebar.constants.js similarity index 100% rename from ui/app/components/sidebars/sidebar.constants.js rename to ui/app/components/app/sidebars/sidebar.constants.js diff --git a/ui/app/components/sidebars/tests/sidebars-component.test.js b/ui/app/components/app/sidebars/tests/sidebars-component.test.js similarity index 100% rename from ui/app/components/sidebars/tests/sidebars-component.test.js rename to ui/app/components/app/sidebars/tests/sidebars-component.test.js diff --git a/ui/app/components/signature-request.js b/ui/app/components/app/signature-request.js similarity index 94% rename from ui/app/components/signature-request.js rename to ui/app/components/app/signature-request.js index 25bd9a7b1..4415ecd4f 100644 --- a/ui/app/components/signature-request.js +++ b/ui/app/components/app/signature-request.js @@ -2,7 +2,7 @@ const Component = require('react').Component const PropTypes = require('prop-types') const h = require('react-hyperscript') const inherits = require('util').inherits -import Identicon from './identicon' +import Identicon from '../ui/identicon' const connect = require('react-redux').connect const ethUtil = require('ethereumjs-util') const classnames = require('classnames') @@ -10,10 +10,10 @@ const { compose } = require('recompose') const { withRouter } = require('react-router-dom') const { ObjectInspector } = require('react-inspector') -import AccountDropdownMini from './account-dropdown-mini' +import AccountDropdownMini from '../ui/account-dropdown-mini' -const actions = require('../actions') -const { conversionUtil } = require('../conversion-util') +const actions = require('../../store/actions') +const { conversionUtil } = require('../../helpers/utils/conversion-util') const { getSelectedAccount, @@ -21,12 +21,12 @@ const { getSelectedAddress, accountsWithSendEtherInfoSelector, conversionRateSelector, -} = require('../selectors.js') +} = require('../../selectors/selectors.js') -import { clearConfirmTransaction } from '../ducks/confirm-transaction.duck' -import Button from './button' +import { clearConfirmTransaction } from '../../ducks/confirm-transaction/confirm-transaction.duck' +import Button from '../ui/button' -const { DEFAULT_ROUTE } = require('../routes') +const { DEFAULT_ROUTE } = require('../../helpers/constants/routes') function mapStateToProps (state) { return { diff --git a/ui/app/components/tab-bar.js b/ui/app/components/app/tab-bar.js similarity index 100% rename from ui/app/components/tab-bar.js rename to ui/app/components/app/tab-bar.js diff --git a/ui/app/components/token-cell.js b/ui/app/components/app/token-cell.js similarity index 93% rename from ui/app/components/token-cell.js rename to ui/app/components/app/token-cell.js index d9c80b4f4..cef809e8a 100644 --- a/ui/app/components/token-cell.js +++ b/ui/app/components/app/token-cell.js @@ -3,11 +3,11 @@ const PropTypes = require('prop-types') const h = require('react-hyperscript') const inherits = require('util').inherits const connect = require('react-redux').connect -import Identicon from './identicon' -const prefixForNetwork = require('../../lib/etherscan-prefix-for-network') -const selectors = require('../selectors') -const actions = require('../actions') -const { conversionUtil, multiplyCurrencies } = require('../conversion-util') +import Identicon from '../ui/identicon' +const prefixForNetwork = require('../../../lib/etherscan-prefix-for-network') +const selectors = require('../../selectors/selectors') +const actions = require('../../store/actions') +const { conversionUtil, multiplyCurrencies } = require('../../helpers/utils/conversion-util') const TokenMenuDropdown = require('./dropdowns/token-menu-dropdown.js') diff --git a/ui/app/components/token-list.js b/ui/app/components/app/token-list.js similarity index 98% rename from ui/app/components/token-list.js rename to ui/app/components/app/token-list.js index 258abde72..2188e7020 100644 --- a/ui/app/components/token-list.js +++ b/ui/app/components/app/token-list.js @@ -5,7 +5,7 @@ const inherits = require('util').inherits const TokenTracker = require('eth-token-tracker') const TokenCell = require('./token-cell.js') const connect = require('react-redux').connect -const selectors = require('../selectors') +const selectors = require('../../selectors/selectors') const log = require('loglevel') function mapStateToProps (state) { diff --git a/ui/app/components/transaction-action/index.js b/ui/app/components/app/transaction-action/index.js similarity index 100% rename from ui/app/components/transaction-action/index.js rename to ui/app/components/app/transaction-action/index.js diff --git a/ui/app/components/transaction-action/tests/transaction-action.component.test.js b/ui/app/components/app/transaction-action/tests/transaction-action.component.test.js similarity index 100% rename from ui/app/components/transaction-action/tests/transaction-action.component.test.js rename to ui/app/components/app/transaction-action/tests/transaction-action.component.test.js diff --git a/ui/app/components/transaction-action/transaction-action.component.js b/ui/app/components/app/transaction-action/transaction-action.component.js similarity index 89% rename from ui/app/components/transaction-action/transaction-action.component.js rename to ui/app/components/app/transaction-action/transaction-action.component.js index 1de91cb71..4a5efdaae 100644 --- a/ui/app/components/transaction-action/transaction-action.component.js +++ b/ui/app/components/app/transaction-action/transaction-action.component.js @@ -1,8 +1,8 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' -import { getTransactionActionKey } from '../../helpers/transactions.util' -import { camelCaseToCapitalize } from '../../helpers/common.util' +import { getTransactionActionKey } from '../../../helpers/utils/transactions.util' +import { camelCaseToCapitalize } from '../../../helpers/utils/common.util' export default class TransactionAction extends PureComponent { static contextTypes = { diff --git a/ui/app/components/transaction-activity-log/index.js b/ui/app/components/app/transaction-activity-log/index.js similarity index 100% rename from ui/app/components/transaction-activity-log/index.js rename to ui/app/components/app/transaction-activity-log/index.js diff --git a/ui/app/components/transaction-activity-log/index.scss b/ui/app/components/app/transaction-activity-log/index.scss similarity index 100% rename from ui/app/components/transaction-activity-log/index.scss rename to ui/app/components/app/transaction-activity-log/index.scss diff --git a/ui/app/components/transaction-activity-log/tests/transaction-activity-log.component.test.js b/ui/app/components/app/transaction-activity-log/tests/transaction-activity-log.component.test.js similarity index 100% rename from ui/app/components/transaction-activity-log/tests/transaction-activity-log.component.test.js rename to ui/app/components/app/transaction-activity-log/tests/transaction-activity-log.component.test.js diff --git a/ui/app/components/transaction-activity-log/tests/transaction-activity-log.container.test.js b/ui/app/components/app/transaction-activity-log/tests/transaction-activity-log.container.test.js similarity index 100% rename from ui/app/components/transaction-activity-log/tests/transaction-activity-log.container.test.js rename to ui/app/components/app/transaction-activity-log/tests/transaction-activity-log.container.test.js diff --git a/ui/app/components/transaction-activity-log/tests/transaction-activity-log.util.test.js b/ui/app/components/app/transaction-activity-log/tests/transaction-activity-log.util.test.js similarity index 100% rename from ui/app/components/transaction-activity-log/tests/transaction-activity-log.util.test.js rename to ui/app/components/app/transaction-activity-log/tests/transaction-activity-log.util.test.js diff --git a/ui/app/components/transaction-activity-log/transaction-activity-log-icon/index.js b/ui/app/components/app/transaction-activity-log/transaction-activity-log-icon/index.js similarity index 100% rename from ui/app/components/transaction-activity-log/transaction-activity-log-icon/index.js rename to ui/app/components/app/transaction-activity-log/transaction-activity-log-icon/index.js diff --git a/ui/app/components/transaction-activity-log/transaction-activity-log-icon/transaction-activity-log-icon.component.js b/ui/app/components/app/transaction-activity-log/transaction-activity-log-icon/transaction-activity-log-icon.component.js similarity index 100% rename from ui/app/components/transaction-activity-log/transaction-activity-log-icon/transaction-activity-log-icon.component.js rename to ui/app/components/app/transaction-activity-log/transaction-activity-log-icon/transaction-activity-log-icon.component.js diff --git a/ui/app/components/transaction-activity-log/transaction-activity-log.component.js b/ui/app/components/app/transaction-activity-log/transaction-activity-log.component.js similarity index 95% rename from ui/app/components/transaction-activity-log/transaction-activity-log.component.js rename to ui/app/components/app/transaction-activity-log/transaction-activity-log.component.js index ca46d7830..de4d29750 100644 --- a/ui/app/components/transaction-activity-log/transaction-activity-log.component.js +++ b/ui/app/components/app/transaction-activity-log/transaction-activity-log.component.js @@ -1,11 +1,11 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' -import { getEthConversionFromWeiHex, getValueFromWeiHex } from '../../helpers/conversions.util' -import { formatDate } from '../../util' +import { getEthConversionFromWeiHex, getValueFromWeiHex } from '../../../helpers/utils/conversions.util' +import { formatDate } from '../../../helpers/utils/util' import TransactionActivityLogIcon from './transaction-activity-log-icon' import { CONFIRMED_STATUS } from './transaction-activity-log.constants' -import prefixForNetwork from '../../../lib/etherscan-prefix-for-network' +import prefixForNetwork from '../../../../lib/etherscan-prefix-for-network' export default class TransactionActivityLog extends PureComponent { static contextTypes = { diff --git a/ui/app/components/transaction-activity-log/transaction-activity-log.constants.js b/ui/app/components/app/transaction-activity-log/transaction-activity-log.constants.js similarity index 100% rename from ui/app/components/transaction-activity-log/transaction-activity-log.constants.js rename to ui/app/components/app/transaction-activity-log/transaction-activity-log.constants.js diff --git a/ui/app/components/transaction-activity-log/transaction-activity-log.container.js b/ui/app/components/app/transaction-activity-log/transaction-activity-log.container.js similarity index 98% rename from ui/app/components/transaction-activity-log/transaction-activity-log.container.js rename to ui/app/components/app/transaction-activity-log/transaction-activity-log.container.js index e43229708..11b20f245 100644 --- a/ui/app/components/transaction-activity-log/transaction-activity-log.container.js +++ b/ui/app/components/app/transaction-activity-log/transaction-activity-log.container.js @@ -1,7 +1,7 @@ import { connect } from 'react-redux' import R from 'ramda' import TransactionActivityLog from './transaction-activity-log.component' -import { conversionRateSelector, getNativeCurrency } from '../../selectors' +import { conversionRateSelector, getNativeCurrency } from '../../../selectors/selectors' import { combineTransactionHistories } from './transaction-activity-log.util' import { TRANSACTION_RESUBMITTED_EVENT, diff --git a/ui/app/components/transaction-activity-log/transaction-activity-log.util.js b/ui/app/components/app/transaction-activity-log/transaction-activity-log.util.js similarity index 98% rename from ui/app/components/transaction-activity-log/transaction-activity-log.util.js rename to ui/app/components/app/transaction-activity-log/transaction-activity-log.util.js index 6206a4678..ac5a00c31 100644 --- a/ui/app/components/transaction-activity-log/transaction-activity-log.util.js +++ b/ui/app/components/app/transaction-activity-log/transaction-activity-log.util.js @@ -1,4 +1,4 @@ -import { getHexGasTotal } from '../../helpers/confirm-transaction/util' +import { getHexGasTotal } from '../../../helpers/utils/confirm-tx.util' // path constants const STATUS_PATH = '/status' @@ -28,7 +28,7 @@ import { import { TRANSACTION_TYPE_CANCEL, TRANSACTION_TYPE_RETRY, -} from '../../../../app/scripts/controllers/transactions/enums' +} from '../../../../../app/scripts/controllers/transactions/enums' const eventPathsHash = { [STATUS_PATH]: true, diff --git a/ui/app/components/transaction-breakdown/index.js b/ui/app/components/app/transaction-breakdown/index.js similarity index 100% rename from ui/app/components/transaction-breakdown/index.js rename to ui/app/components/app/transaction-breakdown/index.js diff --git a/ui/app/components/transaction-breakdown/index.scss b/ui/app/components/app/transaction-breakdown/index.scss similarity index 88% rename from ui/app/components/transaction-breakdown/index.scss rename to ui/app/components/app/transaction-breakdown/index.scss index b56cbdd7f..c8144eac2 100644 --- a/ui/app/components/transaction-breakdown/index.scss +++ b/ui/app/components/app/transaction-breakdown/index.scss @@ -1,4 +1,4 @@ -@import './transaction-breakdown-row/index'; +@import 'transaction-breakdown-row/index'; .transaction-breakdown { &__title { diff --git a/ui/app/components/transaction-breakdown/tests/transaction-breakdown.component.test.js b/ui/app/components/app/transaction-breakdown/tests/transaction-breakdown.component.test.js similarity index 100% rename from ui/app/components/transaction-breakdown/tests/transaction-breakdown.component.test.js rename to ui/app/components/app/transaction-breakdown/tests/transaction-breakdown.component.test.js diff --git a/ui/app/components/transaction-breakdown/transaction-breakdown-row/index.js b/ui/app/components/app/transaction-breakdown/transaction-breakdown-row/index.js similarity index 100% rename from ui/app/components/transaction-breakdown/transaction-breakdown-row/index.js rename to ui/app/components/app/transaction-breakdown/transaction-breakdown-row/index.js diff --git a/ui/app/components/transaction-breakdown/transaction-breakdown-row/index.scss b/ui/app/components/app/transaction-breakdown/transaction-breakdown-row/index.scss similarity index 100% rename from ui/app/components/transaction-breakdown/transaction-breakdown-row/index.scss rename to ui/app/components/app/transaction-breakdown/transaction-breakdown-row/index.scss diff --git a/ui/app/components/transaction-breakdown/transaction-breakdown-row/tests/transaction-breakdown-row.component.test.js b/ui/app/components/app/transaction-breakdown/transaction-breakdown-row/tests/transaction-breakdown-row.component.test.js similarity index 96% rename from ui/app/components/transaction-breakdown/transaction-breakdown-row/tests/transaction-breakdown-row.component.test.js rename to ui/app/components/app/transaction-breakdown/transaction-breakdown-row/tests/transaction-breakdown-row.component.test.js index c19399dbb..82e40fce2 100644 --- a/ui/app/components/transaction-breakdown/transaction-breakdown-row/tests/transaction-breakdown-row.component.test.js +++ b/ui/app/components/app/transaction-breakdown/transaction-breakdown-row/tests/transaction-breakdown-row.component.test.js @@ -2,7 +2,7 @@ import React from 'react' import assert from 'assert' import { shallow } from 'enzyme' import TransactionBreakdownRow from '../transaction-breakdown-row.component' -import Button from '../../../button' +import Button from '../../../../ui/button' describe('TransactionBreakdownRow Component', () => { it('should render text properly', () => { diff --git a/ui/app/components/transaction-breakdown/transaction-breakdown-row/transaction-breakdown-row.component.js b/ui/app/components/app/transaction-breakdown/transaction-breakdown-row/transaction-breakdown-row.component.js similarity index 100% rename from ui/app/components/transaction-breakdown/transaction-breakdown-row/transaction-breakdown-row.component.js rename to ui/app/components/app/transaction-breakdown/transaction-breakdown-row/transaction-breakdown-row.component.js diff --git a/ui/app/components/transaction-breakdown/transaction-breakdown.component.js b/ui/app/components/app/transaction-breakdown/transaction-breakdown.component.js similarity index 94% rename from ui/app/components/transaction-breakdown/transaction-breakdown.component.js rename to ui/app/components/app/transaction-breakdown/transaction-breakdown.component.js index 26dc4c153..5642e0fa5 100644 --- a/ui/app/components/transaction-breakdown/transaction-breakdown.component.js +++ b/ui/app/components/app/transaction-breakdown/transaction-breakdown.component.js @@ -2,10 +2,10 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' import TransactionBreakdownRow from './transaction-breakdown-row' -import CurrencyDisplay from '../currency-display' +import CurrencyDisplay from '../../ui/currency-display' import UserPreferencedCurrencyDisplay from '../user-preferenced-currency-display' -import HexToDecimal from '../hex-to-decimal' -import { GWEI, PRIMARY, SECONDARY } from '../../constants/common' +import HexToDecimal from '../../ui/hex-to-decimal' +import { GWEI, PRIMARY, SECONDARY } from '../../../helpers/constants/common' export default class TransactionBreakdown extends PureComponent { static contextTypes = { diff --git a/ui/app/components/transaction-breakdown/transaction-breakdown.container.js b/ui/app/components/app/transaction-breakdown/transaction-breakdown.container.js similarity index 83% rename from ui/app/components/transaction-breakdown/transaction-breakdown.container.js rename to ui/app/components/app/transaction-breakdown/transaction-breakdown.container.js index 3e85b9e23..82f377358 100644 --- a/ui/app/components/transaction-breakdown/transaction-breakdown.container.js +++ b/ui/app/components/app/transaction-breakdown/transaction-breakdown.container.js @@ -1,8 +1,8 @@ import { connect } from 'react-redux' import TransactionBreakdown from './transaction-breakdown.component' -import {getIsMainnet, getNativeCurrency, preferencesSelector} from '../../selectors' -import { getHexGasTotal } from '../../helpers/confirm-transaction/util' -import { sumHexes } from '../../helpers/transactions.util' +import {getIsMainnet, getNativeCurrency, preferencesSelector} from '../../../selectors/selectors' +import { getHexGasTotal } from '../../../helpers/utils/confirm-tx.util' +import { sumHexes } from '../../../helpers/utils/transactions.util' const mapStateToProps = (state, ownProps) => { const { transaction } = ownProps diff --git a/ui/app/components/transaction-list-item-details/index.js b/ui/app/components/app/transaction-list-item-details/index.js similarity index 100% rename from ui/app/components/transaction-list-item-details/index.js rename to ui/app/components/app/transaction-list-item-details/index.js diff --git a/ui/app/components/transaction-list-item-details/index.scss b/ui/app/components/app/transaction-list-item-details/index.scss similarity index 100% rename from ui/app/components/transaction-list-item-details/index.scss rename to ui/app/components/app/transaction-list-item-details/index.scss diff --git a/ui/app/components/transaction-list-item-details/tests/transaction-list-item-details.component.test.js b/ui/app/components/app/transaction-list-item-details/tests/transaction-list-item-details.component.test.js similarity index 95% rename from ui/app/components/transaction-list-item-details/tests/transaction-list-item-details.component.test.js rename to ui/app/components/app/transaction-list-item-details/tests/transaction-list-item-details.component.test.js index 5b55beeb4..c4e118b01 100644 --- a/ui/app/components/transaction-list-item-details/tests/transaction-list-item-details.component.test.js +++ b/ui/app/components/app/transaction-list-item-details/tests/transaction-list-item-details.component.test.js @@ -2,8 +2,8 @@ import React from 'react' import assert from 'assert' import { shallow } from 'enzyme' import TransactionListItemDetails from '../transaction-list-item-details.component' -import Button from '../../button' -import SenderToRecipient from '../../sender-to-recipient' +import Button from '../../../ui/button' +import SenderToRecipient from '../../../ui/sender-to-recipient' import TransactionBreakdown from '../../transaction-breakdown' import TransactionActivityLog from '../../transaction-activity-log' diff --git a/ui/app/components/transaction-list-item-details/transaction-list-item-details.component.js b/ui/app/components/app/transaction-list-item-details/transaction-list-item-details.component.js similarity index 94% rename from ui/app/components/transaction-list-item-details/transaction-list-item-details.component.js rename to ui/app/components/app/transaction-list-item-details/transaction-list-item-details.component.js index 3e39212d3..b08e0bbe3 100644 --- a/ui/app/components/transaction-list-item-details/transaction-list-item-details.component.js +++ b/ui/app/components/app/transaction-list-item-details/transaction-list-item-details.component.js @@ -1,13 +1,13 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' import copyToClipboard from 'copy-to-clipboard' -import SenderToRecipient from '../sender-to-recipient' -import { FLAT_VARIANT } from '../sender-to-recipient/sender-to-recipient.constants' +import SenderToRecipient from '../../ui/sender-to-recipient' +import { FLAT_VARIANT } from '../../ui/sender-to-recipient/sender-to-recipient.constants' import TransactionActivityLog from '../transaction-activity-log' import TransactionBreakdown from '../transaction-breakdown' -import Button from '../button' -import Tooltip from '../tooltip' -import prefixForNetwork from '../../../lib/etherscan-prefix-for-network' +import Button from '../../ui/button' +import Tooltip from '../../ui/tooltip' +import prefixForNetwork from '../../../../lib/etherscan-prefix-for-network' export default class TransactionListItemDetails extends PureComponent { static contextTypes = { diff --git a/ui/app/components/transaction-list-item/index.js b/ui/app/components/app/transaction-list-item/index.js similarity index 100% rename from ui/app/components/transaction-list-item/index.js rename to ui/app/components/app/transaction-list-item/index.js diff --git a/ui/app/components/transaction-list-item/index.scss b/ui/app/components/app/transaction-list-item/index.scss similarity index 100% rename from ui/app/components/transaction-list-item/index.scss rename to ui/app/components/app/transaction-list-item/index.scss diff --git a/ui/app/components/transaction-list-item/transaction-list-item.component.js b/ui/app/components/app/transaction-list-item/transaction-list-item.component.js similarity index 94% rename from ui/app/components/transaction-list-item/transaction-list-item.component.js rename to ui/app/components/app/transaction-list-item/transaction-list-item.component.js index e843fe1a0..c0a911cda 100644 --- a/ui/app/components/transaction-list-item/transaction-list-item.component.js +++ b/ui/app/components/app/transaction-list-item/transaction-list-item.component.js @@ -1,16 +1,16 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' -import Identicon from '../identicon' +import Identicon from '../../ui/identicon' import TransactionStatus from '../transaction-status' import TransactionAction from '../transaction-action' import UserPreferencedCurrencyDisplay from '../user-preferenced-currency-display' -import TokenCurrencyDisplay from '../token-currency-display' +import TokenCurrencyDisplay from '../../ui/token-currency-display' import TransactionListItemDetails from '../transaction-list-item-details' -import { CONFIRM_TRANSACTION_ROUTE } from '../../routes' -import { UNAPPROVED_STATUS, TOKEN_METHOD_TRANSFER } from '../../constants/transactions' -import { PRIMARY, SECONDARY } from '../../constants/common' -import { getStatusKey } from '../../helpers/transactions.util' +import { CONFIRM_TRANSACTION_ROUTE } from '../../../helpers/constants/routes' +import { UNAPPROVED_STATUS, TOKEN_METHOD_TRANSFER } from '../../../helpers/constants/transactions' +import { PRIMARY, SECONDARY } from '../../../helpers/constants/common' +import { getStatusKey } from '../../../helpers/utils/transactions.util' export default class TransactionListItem extends PureComponent { static propTypes = { diff --git a/ui/app/components/transaction-list-item/transaction-list-item.container.js b/ui/app/components/app/transaction-list-item/transaction-list-item.container.js similarity index 83% rename from ui/app/components/transaction-list-item/transaction-list-item.container.js rename to ui/app/components/app/transaction-list-item/transaction-list-item.container.js index 93a82849e..499558a9b 100644 --- a/ui/app/components/transaction-list-item/transaction-list-item.container.js +++ b/ui/app/components/app/transaction-list-item/transaction-list-item.container.js @@ -1,20 +1,20 @@ import { connect } from 'react-redux' import { withRouter } from 'react-router-dom' import { compose } from 'recompose' -import withMethodData from '../../higher-order-components/with-method-data' +import withMethodData from '../../../helpers/higher-order-components/with-method-data' import TransactionListItem from './transaction-list-item.component' -import { setSelectedToken, showModal, showSidebar, addKnownMethodData } from '../../actions' -import { hexToDecimal } from '../../helpers/conversions.util' -import { getTokenData } from '../../helpers/transactions.util' -import { increaseLastGasPrice } from '../../helpers/confirm-transaction/util' -import { formatDate } from '../../util' +import { setSelectedToken, showModal, showSidebar, addKnownMethodData } from '../../../store/actions' +import { hexToDecimal } from '../../../helpers/utils/conversions.util' +import { getTokenData } from '../../../helpers/utils/transactions.util' +import { increaseLastGasPrice } from '../../../helpers/utils/confirm-tx.util' +import { formatDate } from '../../../helpers/utils/util' import { fetchBasicGasAndTimeEstimates, fetchGasEstimates, setCustomGasPriceForRetry, setCustomGasLimit, -} from '../../ducks/gas.duck' -import {getIsMainnet, preferencesSelector} from '../../selectors' +} from '../../../ducks/gas/gas.duck' +import {getIsMainnet, preferencesSelector} from '../../../selectors/selectors' const mapStateToProps = state => { const { metamask: { knownMethodData } } = state diff --git a/ui/app/components/transaction-list/index.js b/ui/app/components/app/transaction-list/index.js similarity index 100% rename from ui/app/components/transaction-list/index.js rename to ui/app/components/app/transaction-list/index.js diff --git a/ui/app/components/transaction-list/index.scss b/ui/app/components/app/transaction-list/index.scss similarity index 100% rename from ui/app/components/transaction-list/index.scss rename to ui/app/components/app/transaction-list/index.scss diff --git a/ui/app/components/transaction-list/transaction-list.component.js b/ui/app/components/app/transaction-list/transaction-list.component.js similarity index 97% rename from ui/app/components/transaction-list/transaction-list.component.js rename to ui/app/components/app/transaction-list/transaction-list.component.js index ddab3b290..fc5488884 100644 --- a/ui/app/components/transaction-list/transaction-list.component.js +++ b/ui/app/components/app/transaction-list/transaction-list.component.js @@ -2,7 +2,7 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' import TransactionListItem from '../transaction-list-item' import ShapeShiftTransactionListItem from '../shift-list-item' -import { TRANSACTION_TYPE_SHAPESHIFT } from '../../constants/transactions' +import { TRANSACTION_TYPE_SHAPESHIFT } from '../../../helpers/constants/transactions' export default class TransactionList extends PureComponent { static contextTypes = { diff --git a/ui/app/components/transaction-list/transaction-list.container.js b/ui/app/components/app/transaction-list/transaction-list.container.js similarity index 82% rename from ui/app/components/transaction-list/transaction-list.container.js rename to ui/app/components/app/transaction-list/transaction-list.container.js index e70ca15c5..67a24588b 100644 --- a/ui/app/components/transaction-list/transaction-list.container.js +++ b/ui/app/components/app/transaction-list/transaction-list.container.js @@ -5,10 +5,10 @@ import TransactionList from './transaction-list.component' import { nonceSortedCompletedTransactionsSelector, nonceSortedPendingTransactionsSelector, -} from '../../selectors/transactions' -import { getSelectedAddress, getAssetImages } from '../../selectors' -import { selectedTokenSelector } from '../../selectors/tokens' -import { updateNetworkNonce } from '../../actions' +} from '../../../selectors/transactions' +import { getSelectedAddress, getAssetImages } from '../../../selectors/selectors' +import { selectedTokenSelector } from '../../../selectors/tokens' +import { updateNetworkNonce } from '../../../store/actions' const mapStateToProps = state => { return { diff --git a/ui/app/components/transaction-status/index.js b/ui/app/components/app/transaction-status/index.js similarity index 100% rename from ui/app/components/transaction-status/index.js rename to ui/app/components/app/transaction-status/index.js diff --git a/ui/app/components/transaction-status/index.scss b/ui/app/components/app/transaction-status/index.scss similarity index 100% rename from ui/app/components/transaction-status/index.scss rename to ui/app/components/app/transaction-status/index.scss diff --git a/ui/app/components/transaction-status/tests/transaction-status.component.test.js b/ui/app/components/app/transaction-status/tests/transaction-status.component.test.js similarity index 94% rename from ui/app/components/transaction-status/tests/transaction-status.component.test.js rename to ui/app/components/app/transaction-status/tests/transaction-status.component.test.js index f4ddc9206..ec1d580bd 100644 --- a/ui/app/components/transaction-status/tests/transaction-status.component.test.js +++ b/ui/app/components/app/transaction-status/tests/transaction-status.component.test.js @@ -2,7 +2,7 @@ import React from 'react' import assert from 'assert' import { mount } from 'enzyme' import TransactionStatus from '../transaction-status.component' -import Tooltip from '../../tooltip-v2' +import Tooltip from '../../../ui/tooltip-v2' describe('TransactionStatus Component', () => { it('should render APPROVED properly', () => { diff --git a/ui/app/components/transaction-status/transaction-status.component.js b/ui/app/components/app/transaction-status/transaction-status.component.js similarity index 94% rename from ui/app/components/transaction-status/transaction-status.component.js rename to ui/app/components/app/transaction-status/transaction-status.component.js index 28544d2cd..d3a239539 100644 --- a/ui/app/components/transaction-status/transaction-status.component.js +++ b/ui/app/components/app/transaction-status/transaction-status.component.js @@ -1,7 +1,7 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' -import Tooltip from '../tooltip-v2' +import Tooltip from '../../ui/tooltip-v2' import { UNAPPROVED_STATUS, REJECTED_STATUS, @@ -12,7 +12,7 @@ import { FAILED_STATUS, DROPPED_STATUS, CANCELLED_STATUS, -} from '../../constants/transactions' +} from '../../../helpers/constants/transactions' const statusToClassNameHash = { [UNAPPROVED_STATUS]: 'transaction-status--unapproved', diff --git a/ui/app/components/transaction-view-balance/index.js b/ui/app/components/app/transaction-view-balance/index.js similarity index 100% rename from ui/app/components/transaction-view-balance/index.js rename to ui/app/components/app/transaction-view-balance/index.js diff --git a/ui/app/components/transaction-view-balance/index.scss b/ui/app/components/app/transaction-view-balance/index.scss similarity index 100% rename from ui/app/components/transaction-view-balance/index.scss rename to ui/app/components/app/transaction-view-balance/index.scss diff --git a/ui/app/components/transaction-view-balance/tests/token-view-balance.component.test.js b/ui/app/components/app/transaction-view-balance/tests/token-view-balance.component.test.js similarity index 95% rename from ui/app/components/transaction-view-balance/tests/token-view-balance.component.test.js rename to ui/app/components/app/transaction-view-balance/tests/token-view-balance.component.test.js index efc987371..0e2882e9c 100644 --- a/ui/app/components/transaction-view-balance/tests/token-view-balance.component.test.js +++ b/ui/app/components/app/transaction-view-balance/tests/token-view-balance.component.test.js @@ -2,9 +2,9 @@ import React from 'react' import assert from 'assert' import { shallow } from 'enzyme' import sinon from 'sinon' -import TokenBalance from '../../token-balance' +import TokenBalance from '../../../ui/token-balance' import UserPreferencedCurrencyDisplay from '../../user-preferenced-currency-display' -import { SEND_ROUTE } from '../../../routes' +import { SEND_ROUTE } from '../../../../helpers/constants/routes' import TransactionViewBalance from '../transaction-view-balance.component' const propsMethodSpies = { diff --git a/ui/app/components/transaction-view-balance/transaction-view-balance.component.js b/ui/app/components/app/transaction-view-balance/transaction-view-balance.component.js similarity index 93% rename from ui/app/components/transaction-view-balance/transaction-view-balance.component.js rename to ui/app/components/app/transaction-view-balance/transaction-view-balance.component.js index a18e959b5..8559e2233 100644 --- a/ui/app/components/transaction-view-balance/transaction-view-balance.component.js +++ b/ui/app/components/app/transaction-view-balance/transaction-view-balance.component.js @@ -1,13 +1,13 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' -import Button from '../button' -import Identicon from '../identicon' -import TokenBalance from '../token-balance' +import Button from '../../ui/button' +import Identicon from '../../ui/identicon' +import TokenBalance from '../../ui/token-balance' import UserPreferencedCurrencyDisplay from '../user-preferenced-currency-display' -import { SEND_ROUTE } from '../../routes' -import { PRIMARY, SECONDARY } from '../../constants/common' -import Tooltip from '../tooltip-v2' +import { SEND_ROUTE } from '../../../helpers/constants/routes' +import { PRIMARY, SECONDARY } from '../../../helpers/constants/common' +import Tooltip from '../../ui/tooltip-v2' export default class TransactionViewBalance extends PureComponent { static contextTypes = { diff --git a/ui/app/components/transaction-view-balance/transaction-view-balance.container.js b/ui/app/components/app/transaction-view-balance/transaction-view-balance.container.js similarity index 93% rename from ui/app/components/transaction-view-balance/transaction-view-balance.container.js rename to ui/app/components/app/transaction-view-balance/transaction-view-balance.container.js index df6d287eb..41a4525dc 100644 --- a/ui/app/components/transaction-view-balance/transaction-view-balance.container.js +++ b/ui/app/components/app/transaction-view-balance/transaction-view-balance.container.js @@ -11,8 +11,8 @@ import { isBalanceCached, preferencesSelector, getIsMainnet, -} from '../../selectors' -import { showModal } from '../../actions' +} from '../../../selectors/selectors' +import { showModal } from '../../../store/actions' const mapStateToProps = state => { const { showFiatInTestnets } = preferencesSelector(state) diff --git a/ui/app/components/transaction-view/index.js b/ui/app/components/app/transaction-view/index.js similarity index 100% rename from ui/app/components/transaction-view/index.js rename to ui/app/components/app/transaction-view/index.js diff --git a/ui/app/components/transaction-view/index.scss b/ui/app/components/app/transaction-view/index.scss similarity index 100% rename from ui/app/components/transaction-view/index.scss rename to ui/app/components/app/transaction-view/index.scss diff --git a/ui/app/components/transaction-view/transaction-view.component.js b/ui/app/components/app/transaction-view/transaction-view.component.js similarity index 100% rename from ui/app/components/transaction-view/transaction-view.component.js rename to ui/app/components/app/transaction-view/transaction-view.component.js diff --git a/ui/app/components/ui-migration-annoucement/index.js b/ui/app/components/app/ui-migration-annoucement/index.js similarity index 100% rename from ui/app/components/ui-migration-annoucement/index.js rename to ui/app/components/app/ui-migration-annoucement/index.js diff --git a/ui/app/components/ui-migration-annoucement/index.scss b/ui/app/components/app/ui-migration-annoucement/index.scss similarity index 100% rename from ui/app/components/ui-migration-annoucement/index.scss rename to ui/app/components/app/ui-migration-annoucement/index.scss diff --git a/ui/app/components/ui-migration-annoucement/ui-migration-annoucement.component.js b/ui/app/components/app/ui-migration-annoucement/ui-migration-annoucement.component.js similarity index 100% rename from ui/app/components/ui-migration-annoucement/ui-migration-annoucement.component.js rename to ui/app/components/app/ui-migration-annoucement/ui-migration-annoucement.component.js diff --git a/ui/app/components/ui-migration-annoucement/ui-migration-announcement.container.js b/ui/app/components/app/ui-migration-annoucement/ui-migration-announcement.container.js similarity index 88% rename from ui/app/components/ui-migration-annoucement/ui-migration-announcement.container.js rename to ui/app/components/app/ui-migration-annoucement/ui-migration-announcement.container.js index 6dc993b87..55efd5a44 100644 --- a/ui/app/components/ui-migration-annoucement/ui-migration-announcement.container.js +++ b/ui/app/components/app/ui-migration-annoucement/ui-migration-announcement.container.js @@ -1,6 +1,6 @@ import { connect } from 'react-redux' import UiMigrationAnnouncement from './ui-migration-annoucement.component' -import { setCompletedUiMigration } from '../../actions' +import { setCompletedUiMigration } from '../../../store/actions' const mapStateToProps = (state) => { const shouldShowAnnouncement = !state.metamask.completedUiMigration diff --git a/ui/app/components/user-preferenced-currency-display/index.js b/ui/app/components/app/user-preferenced-currency-display/index.js similarity index 100% rename from ui/app/components/user-preferenced-currency-display/index.js rename to ui/app/components/app/user-preferenced-currency-display/index.js diff --git a/ui/app/components/user-preferenced-currency-display/tests/user-preferenced-currency-display.component.test.js b/ui/app/components/app/user-preferenced-currency-display/tests/user-preferenced-currency-display.component.test.js similarity index 94% rename from ui/app/components/user-preferenced-currency-display/tests/user-preferenced-currency-display.component.test.js rename to ui/app/components/app/user-preferenced-currency-display/tests/user-preferenced-currency-display.component.test.js index ead584c26..51b2a3c4f 100644 --- a/ui/app/components/user-preferenced-currency-display/tests/user-preferenced-currency-display.component.test.js +++ b/ui/app/components/app/user-preferenced-currency-display/tests/user-preferenced-currency-display.component.test.js @@ -2,7 +2,7 @@ import React from 'react' import assert from 'assert' import { shallow } from 'enzyme' import UserPreferencedCurrencyDisplay from '../user-preferenced-currency-display.component' -import CurrencyDisplay from '../../currency-display' +import CurrencyDisplay from '../../../ui/currency-display' describe('UserPreferencedCurrencyDisplay Component', () => { describe('rendering', () => { diff --git a/ui/app/components/user-preferenced-currency-display/tests/user-preferenced-currency-display.container.test.js b/ui/app/components/app/user-preferenced-currency-display/tests/user-preferenced-currency-display.container.test.js similarity index 100% rename from ui/app/components/user-preferenced-currency-display/tests/user-preferenced-currency-display.container.test.js rename to ui/app/components/app/user-preferenced-currency-display/tests/user-preferenced-currency-display.container.test.js diff --git a/ui/app/components/user-preferenced-currency-display/user-preferenced-currency-display.component.js b/ui/app/components/app/user-preferenced-currency-display/user-preferenced-currency-display.component.js similarity index 91% rename from ui/app/components/user-preferenced-currency-display/user-preferenced-currency-display.component.js rename to ui/app/components/app/user-preferenced-currency-display/user-preferenced-currency-display.component.js index d9f29327d..4b64b26c0 100644 --- a/ui/app/components/user-preferenced-currency-display/user-preferenced-currency-display.component.js +++ b/ui/app/components/app/user-preferenced-currency-display/user-preferenced-currency-display.component.js @@ -1,7 +1,7 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' -import { PRIMARY, SECONDARY, ETH } from '../../constants/common' -import CurrencyDisplay from '../currency-display' +import { PRIMARY, SECONDARY, ETH } from '../../../helpers/constants/common' +import CurrencyDisplay from '../../ui/currency-display' export default class UserPreferencedCurrencyDisplay extends PureComponent { static propTypes = { diff --git a/ui/app/components/user-preferenced-currency-display/user-preferenced-currency-display.container.js b/ui/app/components/app/user-preferenced-currency-display/user-preferenced-currency-display.container.js similarity index 92% rename from ui/app/components/user-preferenced-currency-display/user-preferenced-currency-display.container.js rename to ui/app/components/app/user-preferenced-currency-display/user-preferenced-currency-display.container.js index 3c5bd0f21..42d156f92 100644 --- a/ui/app/components/user-preferenced-currency-display/user-preferenced-currency-display.container.js +++ b/ui/app/components/app/user-preferenced-currency-display/user-preferenced-currency-display.container.js @@ -1,7 +1,7 @@ import { connect } from 'react-redux' import UserPreferencedCurrencyDisplay from './user-preferenced-currency-display.component' -import { preferencesSelector, getIsMainnet } from '../../selectors' -import { ETH, PRIMARY, SECONDARY } from '../../constants/common' +import { preferencesSelector, getIsMainnet } from '../../../selectors/selectors' +import { ETH, PRIMARY, SECONDARY } from '../../../helpers/constants/common' const mapStateToProps = (state, ownProps) => { const { diff --git a/ui/app/components/user-preferenced-currency-input/index.js b/ui/app/components/app/user-preferenced-currency-input/index.js similarity index 100% rename from ui/app/components/user-preferenced-currency-input/index.js rename to ui/app/components/app/user-preferenced-currency-input/index.js diff --git a/ui/app/components/user-preferenced-currency-input/tests/user-preferenced-currency-input.component.test.js b/ui/app/components/app/user-preferenced-currency-input/tests/user-preferenced-currency-input.component.test.js similarity index 94% rename from ui/app/components/user-preferenced-currency-input/tests/user-preferenced-currency-input.component.test.js rename to ui/app/components/app/user-preferenced-currency-input/tests/user-preferenced-currency-input.component.test.js index 710b5d519..3802e16f3 100644 --- a/ui/app/components/user-preferenced-currency-input/tests/user-preferenced-currency-input.component.test.js +++ b/ui/app/components/app/user-preferenced-currency-input/tests/user-preferenced-currency-input.component.test.js @@ -2,7 +2,7 @@ import React from 'react' import assert from 'assert' import { shallow } from 'enzyme' import UserPreferencedCurrencyInput from '../user-preferenced-currency-input.component' -import CurrencyInput from '../../currency-input' +import CurrencyInput from '../../../ui/currency-input' describe('UserPreferencedCurrencyInput Component', () => { describe('rendering', () => { diff --git a/ui/app/components/user-preferenced-currency-input/tests/user-preferenced-currency-input.container.test.js b/ui/app/components/app/user-preferenced-currency-input/tests/user-preferenced-currency-input.container.test.js similarity index 100% rename from ui/app/components/user-preferenced-currency-input/tests/user-preferenced-currency-input.container.test.js rename to ui/app/components/app/user-preferenced-currency-input/tests/user-preferenced-currency-input.container.test.js diff --git a/ui/app/components/user-preferenced-currency-input/user-preferenced-currency-input.component.js b/ui/app/components/app/user-preferenced-currency-input/user-preferenced-currency-input.component.js similarity index 89% rename from ui/app/components/user-preferenced-currency-input/user-preferenced-currency-input.component.js rename to ui/app/components/app/user-preferenced-currency-input/user-preferenced-currency-input.component.js index 463e66b80..7c0ec1734 100644 --- a/ui/app/components/user-preferenced-currency-input/user-preferenced-currency-input.component.js +++ b/ui/app/components/app/user-preferenced-currency-input/user-preferenced-currency-input.component.js @@ -1,6 +1,6 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' -import CurrencyInput from '../currency-input' +import CurrencyInput from '../../ui/currency-input' export default class UserPreferencedCurrencyInput extends PureComponent { static propTypes = { diff --git a/ui/app/components/user-preferenced-currency-input/user-preferenced-currency-input.container.js b/ui/app/components/app/user-preferenced-currency-input/user-preferenced-currency-input.container.js similarity index 84% rename from ui/app/components/user-preferenced-currency-input/user-preferenced-currency-input.container.js rename to ui/app/components/app/user-preferenced-currency-input/user-preferenced-currency-input.container.js index 0b88eb5a7..72f17fde4 100644 --- a/ui/app/components/user-preferenced-currency-input/user-preferenced-currency-input.container.js +++ b/ui/app/components/app/user-preferenced-currency-input/user-preferenced-currency-input.container.js @@ -1,6 +1,6 @@ import { connect } from 'react-redux' import UserPreferencedCurrencyInput from './user-preferenced-currency-input.component' -import { preferencesSelector } from '../../selectors' +import { preferencesSelector } from '../../../selectors/selectors' const mapStateToProps = state => { const { useNativeCurrencyAsPrimaryCurrency } = preferencesSelector(state) diff --git a/ui/app/components/user-preferenced-token-input/index.js b/ui/app/components/app/user-preferenced-token-input/index.js similarity index 100% rename from ui/app/components/user-preferenced-token-input/index.js rename to ui/app/components/app/user-preferenced-token-input/index.js diff --git a/ui/app/components/user-preferenced-token-input/tests/user-preferenced-token-input.component.test.js b/ui/app/components/app/user-preferenced-token-input/tests/user-preferenced-token-input.component.test.js similarity index 95% rename from ui/app/components/user-preferenced-token-input/tests/user-preferenced-token-input.component.test.js rename to ui/app/components/app/user-preferenced-token-input/tests/user-preferenced-token-input.component.test.js index d85bddeeb..41cfd51f9 100644 --- a/ui/app/components/user-preferenced-token-input/tests/user-preferenced-token-input.component.test.js +++ b/ui/app/components/app/user-preferenced-token-input/tests/user-preferenced-token-input.component.test.js @@ -2,7 +2,7 @@ import React from 'react' import assert from 'assert' import { shallow } from 'enzyme' import UserPreferencedTokenInput from '../user-preferenced-token-input.component' -import TokenInput from '../../token-input' +import TokenInput from '../../../ui/token-input' describe('UserPreferencedCurrencyInput Component', () => { describe('rendering', () => { diff --git a/ui/app/components/user-preferenced-token-input/tests/user-preferenced-token-input.container.test.js b/ui/app/components/app/user-preferenced-token-input/tests/user-preferenced-token-input.container.test.js similarity index 100% rename from ui/app/components/user-preferenced-token-input/tests/user-preferenced-token-input.container.test.js rename to ui/app/components/app/user-preferenced-token-input/tests/user-preferenced-token-input.container.test.js diff --git a/ui/app/components/user-preferenced-token-input/user-preferenced-token-input.component.js b/ui/app/components/app/user-preferenced-token-input/user-preferenced-token-input.component.js similarity index 90% rename from ui/app/components/user-preferenced-token-input/user-preferenced-token-input.component.js rename to ui/app/components/app/user-preferenced-token-input/user-preferenced-token-input.component.js index 8f14231ac..24133188d 100644 --- a/ui/app/components/user-preferenced-token-input/user-preferenced-token-input.component.js +++ b/ui/app/components/app/user-preferenced-token-input/user-preferenced-token-input.component.js @@ -1,6 +1,6 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' -import TokenInput from '../token-input' +import TokenInput from '../../ui/token-input' export default class UserPreferencedTokenInput extends PureComponent { static propTypes = { diff --git a/ui/app/components/user-preferenced-token-input/user-preferenced-token-input.container.js b/ui/app/components/app/user-preferenced-token-input/user-preferenced-token-input.container.js similarity index 84% rename from ui/app/components/user-preferenced-token-input/user-preferenced-token-input.container.js rename to ui/app/components/app/user-preferenced-token-input/user-preferenced-token-input.container.js index 3305d4e29..4a20b20d9 100644 --- a/ui/app/components/user-preferenced-token-input/user-preferenced-token-input.container.js +++ b/ui/app/components/app/user-preferenced-token-input/user-preferenced-token-input.container.js @@ -1,6 +1,6 @@ import { connect } from 'react-redux' import UserPreferencedTokenInput from './user-preferenced-token-input.component' -import { preferencesSelector } from '../../selectors' +import { preferencesSelector } from '../../../selectors/selectors' const mapStateToProps = state => { const { useNativeCurrencyAsPrimaryCurrency } = preferencesSelector(state) diff --git a/ui/app/components/wallet-view.js b/ui/app/components/app/wallet-view.js similarity index 94% rename from ui/app/components/wallet-view.js rename to ui/app/components/app/wallet-view.js index db572e5cb..cec8228b1 100644 --- a/ui/app/components/wallet-view.js +++ b/ui/app/components/app/wallet-view.js @@ -6,16 +6,16 @@ const { withRouter } = require('react-router-dom') const { compose } = require('recompose') const inherits = require('util').inherits const classnames = require('classnames') -const { checksumAddress } = require('../util') -import Identicon from './identicon' +const { checksumAddress } = require('../../helpers/utils/util') +import Identicon from '../ui/identicon' // const AccountDropdowns = require('./dropdowns/index.js').AccountDropdowns -const Tooltip = require('./tooltip-v2.js').default +const Tooltip = require('../ui/tooltip-v2.js').default const copyToClipboard = require('copy-to-clipboard') -const actions = require('../actions') -import BalanceComponent from './balance' +const actions = require('../../store/actions') +import BalanceComponent from '../ui/balance' const TokenList = require('./token-list') -const selectors = require('../selectors') -const { ADD_TOKEN_ROUTE } = require('../routes') +const selectors = require('../../selectors/selectors') +const { ADD_TOKEN_ROUTE } = require('../../helpers/constants/routes') import AddTokenButton from './add-token-button' diff --git a/ui/app/components/confirm-page-container/index.scss b/ui/app/components/confirm-page-container/index.scss deleted file mode 100644 index d41cd4423..000000000 --- a/ui/app/components/confirm-page-container/index.scss +++ /dev/null @@ -1,7 +0,0 @@ -@import './confirm-page-container-content/index'; - -@import './confirm-page-container-header/index'; - -@import './confirm-detail-row/index'; - -@import './confirm-page-container-navigation/index'; \ No newline at end of file diff --git a/ui/app/components/index.scss b/ui/app/components/index.scss deleted file mode 100644 index 96cc74c79..000000000 --- a/ui/app/components/index.scss +++ /dev/null @@ -1,81 +0,0 @@ -@import './account-menu/index'; - -@import './add-token-button/index'; - -@import './app-header/index'; - -@import './breadcrumbs/index'; - -@import './button-group/index'; - -@import './card/index'; - -@import './confirm-page-container/index'; - -@import './currency-input/index'; - -@import './currency-display/index'; - -@import './error-message/index'; - -@import './export-text-container/index'; - -@import './identicon/index'; - -@import './info-box/index'; - -@import './menu-bar/index'; - -@import './modal/index'; - -@import './modals/index'; - -@import './network-display/index'; - -@import './page-container/index'; - -@import './pages/index'; - -@import './provider-page-container/index'; - -@import './selected-account/index'; - -@import './sender-to-recipient/index'; - -@import './tabs/index'; - -@import './token-balance/index'; - -@import './transaction-activity-log/index'; - -@import './transaction-breakdown/index'; - -@import './transaction-view/index'; - -@import './transaction-view-balance/index'; - -@import './transaction-list/index'; - -@import './transaction-list-item/index'; - -@import './transaction-list-item-details/index'; - -@import './transaction-status/index'; - -@import './app-header/index'; - -@import './sidebars/index'; - -@import './unit-input/index'; - -@import './gas-customization/gas-modal-page-container/index'; - -@import './gas-customization/gas-modal-page-container/index'; - -@import './gas-customization/gas-modal-page-container/index'; - -@import './gas-customization/index'; - -@import './gas-customization/gas-price-button-group/index'; - -@import './ui-migration-annoucement/index'; diff --git a/ui/app/components/modals/index.scss b/ui/app/components/modals/index.scss deleted file mode 100644 index 555da87ef..000000000 --- a/ui/app/components/modals/index.scss +++ /dev/null @@ -1,11 +0,0 @@ -@import './cancel-transaction/index'; - -@import './confirm-remove-account/index'; - -@import './customize-gas/index'; - -@import './qr-scanner/index'; - -@import './transaction-confirmed/index'; - -@import './metametrics-opt-in-modal/index'; diff --git a/ui/app/components/pages/index.scss b/ui/app/components/pages/index.scss deleted file mode 100644 index 6a0680f32..000000000 --- a/ui/app/components/pages/index.scss +++ /dev/null @@ -1,11 +0,0 @@ -@import './unlock-page/index'; - -@import './add-token/index'; - -@import './confirm-add-token/index'; - -@import './settings/index'; - -@import './first-time-flow/index'; - -@import './keychains/index'; diff --git a/ui/app/components/account-dropdown-mini/account-dropdown-mini.component.js b/ui/app/components/ui/account-dropdown-mini/account-dropdown-mini.component.js similarity index 96% rename from ui/app/components/account-dropdown-mini/account-dropdown-mini.component.js rename to ui/app/components/ui/account-dropdown-mini/account-dropdown-mini.component.js index 8a171d0c6..8abe1ab18 100644 --- a/ui/app/components/account-dropdown-mini/account-dropdown-mini.component.js +++ b/ui/app/components/ui/account-dropdown-mini/account-dropdown-mini.component.js @@ -1,6 +1,6 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' -import AccountListItem from '../send/account-list-item/account-list-item.component' +import AccountListItem from '../../app/send/account-list-item/account-list-item.component' export default class AccountDropdownMini extends PureComponent { static propTypes = { diff --git a/ui/app/components/account-dropdown-mini/index.js b/ui/app/components/ui/account-dropdown-mini/index.js similarity index 100% rename from ui/app/components/account-dropdown-mini/index.js rename to ui/app/components/ui/account-dropdown-mini/index.js diff --git a/ui/app/components/account-dropdown-mini/tests/account-dropdown-mini.component.test.js b/ui/app/components/ui/account-dropdown-mini/tests/account-dropdown-mini.component.test.js similarity index 96% rename from ui/app/components/account-dropdown-mini/tests/account-dropdown-mini.component.test.js rename to ui/app/components/ui/account-dropdown-mini/tests/account-dropdown-mini.component.test.js index abd2f7c75..bc74ceb3c 100644 --- a/ui/app/components/account-dropdown-mini/tests/account-dropdown-mini.component.test.js +++ b/ui/app/components/ui/account-dropdown-mini/tests/account-dropdown-mini.component.test.js @@ -2,7 +2,7 @@ import React from 'react' import assert from 'assert' import { shallow } from 'enzyme' import AccountDropdownMini from '../account-dropdown-mini.component' -import AccountListItem from '../../send/account-list-item/account-list-item.component' +import AccountListItem from '../../../app/send/account-list-item/account-list-item.component' describe('AccountDropdownMini', () => { it('should render an account with an icon', () => { diff --git a/ui/app/components/alert/index.js b/ui/app/components/ui/alert/index.js similarity index 100% rename from ui/app/components/alert/index.js rename to ui/app/components/ui/alert/index.js diff --git a/ui/app/components/balance/balance.component.js b/ui/app/components/ui/balance/balance.component.js similarity index 91% rename from ui/app/components/balance/balance.component.js rename to ui/app/components/ui/balance/balance.component.js index 9d0018add..9a6f71ce5 100644 --- a/ui/app/components/balance/balance.component.js +++ b/ui/app/components/ui/balance/balance.component.js @@ -2,9 +2,9 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' import TokenBalance from '../token-balance' import Identicon from '../identicon' -import UserPreferencedCurrencyDisplay from '../user-preferenced-currency-display' -import { PRIMARY, SECONDARY } from '../../constants/common' -import { formatBalance } from '../../util' +import UserPreferencedCurrencyDisplay from '../../app/user-preferenced-currency-display' +import { PRIMARY, SECONDARY } from '../../../helpers/constants/common' +import { formatBalance } from '../../../helpers/utils/util' export default class Balance extends PureComponent { static propTypes = { diff --git a/ui/app/components/balance/balance.container.js b/ui/app/components/ui/balance/balance.container.js similarity index 96% rename from ui/app/components/balance/balance.container.js rename to ui/app/components/ui/balance/balance.container.js index 1cd6df5ce..2ad5c5ad8 100644 --- a/ui/app/components/balance/balance.container.js +++ b/ui/app/components/ui/balance/balance.container.js @@ -8,7 +8,7 @@ import { getMetaMaskAccounts, getIsMainnet, preferencesSelector, -} from '../../selectors' +} from '../../../selectors/selectors' const mapStateToProps = state => { const { showFiatInTestnets } = preferencesSelector(state) diff --git a/ui/app/components/balance/index.js b/ui/app/components/ui/balance/index.js similarity index 100% rename from ui/app/components/balance/index.js rename to ui/app/components/ui/balance/index.js diff --git a/ui/app/components/breadcrumbs/breadcrumbs.component.js b/ui/app/components/ui/breadcrumbs/breadcrumbs.component.js similarity index 100% rename from ui/app/components/breadcrumbs/breadcrumbs.component.js rename to ui/app/components/ui/breadcrumbs/breadcrumbs.component.js diff --git a/ui/app/components/breadcrumbs/index.js b/ui/app/components/ui/breadcrumbs/index.js similarity index 100% rename from ui/app/components/breadcrumbs/index.js rename to ui/app/components/ui/breadcrumbs/index.js diff --git a/ui/app/components/breadcrumbs/index.scss b/ui/app/components/ui/breadcrumbs/index.scss similarity index 100% rename from ui/app/components/breadcrumbs/index.scss rename to ui/app/components/ui/breadcrumbs/index.scss diff --git a/ui/app/components/breadcrumbs/tests/breadcrumbs.component.test.js b/ui/app/components/ui/breadcrumbs/tests/breadcrumbs.component.test.js similarity index 100% rename from ui/app/components/breadcrumbs/tests/breadcrumbs.component.test.js rename to ui/app/components/ui/breadcrumbs/tests/breadcrumbs.component.test.js diff --git a/ui/app/components/button-group/button-group.component.js b/ui/app/components/ui/button-group/button-group.component.js similarity index 100% rename from ui/app/components/button-group/button-group.component.js rename to ui/app/components/ui/button-group/button-group.component.js diff --git a/ui/app/components/button-group/button-group.stories.js b/ui/app/components/ui/button-group/button-group.stories.js similarity index 97% rename from ui/app/components/button-group/button-group.stories.js rename to ui/app/components/ui/button-group/button-group.stories.js index 14e1a7e49..c58c628b3 100644 --- a/ui/app/components/button-group/button-group.stories.js +++ b/ui/app/components/ui/button-group/button-group.stories.js @@ -1,7 +1,7 @@ import React from 'react' import { storiesOf } from '@storybook/react' import { action } from '@storybook/addon-actions' -import ButtonGroup from './' +import ButtonGroup from '.' import Button from '../button' import { text, boolean } from '@storybook/addon-knobs/react' diff --git a/ui/app/components/button-group/index.js b/ui/app/components/ui/button-group/index.js similarity index 100% rename from ui/app/components/button-group/index.js rename to ui/app/components/ui/button-group/index.js diff --git a/ui/app/components/button-group/index.scss b/ui/app/components/ui/button-group/index.scss similarity index 100% rename from ui/app/components/button-group/index.scss rename to ui/app/components/ui/button-group/index.scss diff --git a/ui/app/components/button-group/tests/button-group-component.test.js b/ui/app/components/ui/button-group/tests/button-group-component.test.js similarity index 100% rename from ui/app/components/button-group/tests/button-group-component.test.js rename to ui/app/components/ui/button-group/tests/button-group-component.test.js diff --git a/ui/app/components/button/button.component.js b/ui/app/components/ui/button/button.component.js similarity index 100% rename from ui/app/components/button/button.component.js rename to ui/app/components/ui/button/button.component.js diff --git a/ui/app/components/button/button.stories.js b/ui/app/components/ui/button/button.stories.js similarity index 97% rename from ui/app/components/button/button.stories.js rename to ui/app/components/ui/button/button.stories.js index dec084a25..667824a47 100644 --- a/ui/app/components/button/button.stories.js +++ b/ui/app/components/ui/button/button.stories.js @@ -1,7 +1,7 @@ import React from 'react' import { storiesOf } from '@storybook/react' import { action } from '@storybook/addon-actions' -import Button from './' +import Button from '.' import { text } from '@storybook/addon-knobs/react' storiesOf('Button', module) diff --git a/ui/app/components/button/index.js b/ui/app/components/ui/button/index.js similarity index 100% rename from ui/app/components/button/index.js rename to ui/app/components/ui/button/index.js diff --git a/ui/app/components/card/card.component.js b/ui/app/components/ui/card/card.component.js similarity index 100% rename from ui/app/components/card/card.component.js rename to ui/app/components/ui/card/card.component.js diff --git a/ui/app/components/card/index.js b/ui/app/components/ui/card/index.js similarity index 100% rename from ui/app/components/card/index.js rename to ui/app/components/ui/card/index.js diff --git a/ui/app/components/card/index.scss b/ui/app/components/ui/card/index.scss similarity index 100% rename from ui/app/components/card/index.scss rename to ui/app/components/ui/card/index.scss diff --git a/ui/app/components/card/tests/card.component.test.js b/ui/app/components/ui/card/tests/card.component.test.js similarity index 100% rename from ui/app/components/card/tests/card.component.test.js rename to ui/app/components/ui/card/tests/card.component.test.js diff --git a/ui/app/components/copyButton.js b/ui/app/components/ui/copyButton.js similarity index 100% rename from ui/app/components/copyButton.js rename to ui/app/components/ui/copyButton.js diff --git a/ui/app/components/currency-display/currency-display.component.js b/ui/app/components/ui/currency-display/currency-display.component.js similarity index 95% rename from ui/app/components/currency-display/currency-display.component.js rename to ui/app/components/ui/currency-display/currency-display.component.js index 6a743cc4e..04dd89892 100644 --- a/ui/app/components/currency-display/currency-display.component.js +++ b/ui/app/components/ui/currency-display/currency-display.component.js @@ -1,7 +1,7 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' -import { GWEI } from '../../constants/common' +import { GWEI } from '../../../helpers/constants/common' export default class CurrencyDisplay extends PureComponent { static propTypes = { diff --git a/ui/app/components/currency-display/currency-display.container.js b/ui/app/components/ui/currency-display/currency-display.container.js similarity index 92% rename from ui/app/components/currency-display/currency-display.container.js rename to ui/app/components/ui/currency-display/currency-display.container.js index e581f8a5e..093d99c8e 100644 --- a/ui/app/components/currency-display/currency-display.container.js +++ b/ui/app/components/ui/currency-display/currency-display.container.js @@ -1,6 +1,6 @@ import { connect } from 'react-redux' import CurrencyDisplay from './currency-display.component' -import { getValueFromWeiHex, formatCurrency } from '../../helpers/confirm-transaction/util' +import { getValueFromWeiHex, formatCurrency } from '../../../helpers/utils/confirm-tx.util' const mapStateToProps = state => { const { metamask: { nativeCurrency, currentCurrency, conversionRate } } = state diff --git a/ui/app/components/currency-display/index.js b/ui/app/components/ui/currency-display/index.js similarity index 100% rename from ui/app/components/currency-display/index.js rename to ui/app/components/ui/currency-display/index.js diff --git a/ui/app/components/currency-display/index.scss b/ui/app/components/ui/currency-display/index.scss similarity index 100% rename from ui/app/components/currency-display/index.scss rename to ui/app/components/ui/currency-display/index.scss diff --git a/ui/app/components/currency-display/tests/currency-display.component.test.js b/ui/app/components/ui/currency-display/tests/currency-display.component.test.js similarity index 100% rename from ui/app/components/currency-display/tests/currency-display.component.test.js rename to ui/app/components/ui/currency-display/tests/currency-display.component.test.js diff --git a/ui/app/components/currency-display/tests/currency-display.container.test.js b/ui/app/components/ui/currency-display/tests/currency-display.container.test.js similarity index 100% rename from ui/app/components/currency-display/tests/currency-display.container.test.js rename to ui/app/components/ui/currency-display/tests/currency-display.container.test.js diff --git a/ui/app/components/currency-input/currency-input.component.js b/ui/app/components/ui/currency-input/currency-input.component.js similarity index 97% rename from ui/app/components/currency-input/currency-input.component.js rename to ui/app/components/ui/currency-input/currency-input.component.js index 30e0e919b..b5be0972b 100644 --- a/ui/app/components/currency-input/currency-input.component.js +++ b/ui/app/components/ui/currency-input/currency-input.component.js @@ -2,8 +2,8 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' import UnitInput from '../unit-input' import CurrencyDisplay from '../currency-display' -import { getValueFromWeiHex, getWeiHexFromDecimalValue } from '../../helpers/conversions.util' -import { ETH } from '../../constants/common' +import { getValueFromWeiHex, getWeiHexFromDecimalValue } from '../../../helpers/utils/conversions.util' +import { ETH } from '../../../helpers/constants/common' /** * Component that allows user to enter currency values as a number, and props receive a converted diff --git a/ui/app/components/currency-input/currency-input.container.js b/ui/app/components/ui/currency-input/currency-input.container.js similarity index 85% rename from ui/app/components/currency-input/currency-input.container.js rename to ui/app/components/ui/currency-input/currency-input.container.js index 428be4557..b5d7dfe6d 100644 --- a/ui/app/components/currency-input/currency-input.container.js +++ b/ui/app/components/ui/currency-input/currency-input.container.js @@ -1,7 +1,7 @@ import { connect } from 'react-redux' import CurrencyInput from './currency-input.component' -import { ETH } from '../../constants/common' -import {getIsMainnet, preferencesSelector} from '../../selectors' +import { ETH } from '../../../helpers/constants/common' +import {getIsMainnet, preferencesSelector} from '../../../selectors/selectors' const mapStateToProps = state => { const { metamask: { nativeCurrency, currentCurrency, conversionRate } } = state diff --git a/ui/app/components/currency-input/index.js b/ui/app/components/ui/currency-input/index.js similarity index 100% rename from ui/app/components/currency-input/index.js rename to ui/app/components/ui/currency-input/index.js diff --git a/ui/app/components/currency-input/index.scss b/ui/app/components/ui/currency-input/index.scss similarity index 100% rename from ui/app/components/currency-input/index.scss rename to ui/app/components/ui/currency-input/index.scss diff --git a/ui/app/components/currency-input/tests/currency-input.component.test.js b/ui/app/components/ui/currency-input/tests/currency-input.component.test.js similarity index 100% rename from ui/app/components/currency-input/tests/currency-input.component.test.js rename to ui/app/components/ui/currency-input/tests/currency-input.component.test.js diff --git a/ui/app/components/currency-input/tests/currency-input.container.test.js b/ui/app/components/ui/currency-input/tests/currency-input.container.test.js similarity index 100% rename from ui/app/components/currency-input/tests/currency-input.container.test.js rename to ui/app/components/ui/currency-input/tests/currency-input.container.test.js diff --git a/ui/app/components/editable-label.js b/ui/app/components/ui/editable-label.js similarity index 100% rename from ui/app/components/editable-label.js rename to ui/app/components/ui/editable-label.js diff --git a/ui/app/components/error-message/error-message.component.js b/ui/app/components/ui/error-message/error-message.component.js similarity index 100% rename from ui/app/components/error-message/error-message.component.js rename to ui/app/components/ui/error-message/error-message.component.js diff --git a/ui/app/components/error-message/index.js b/ui/app/components/ui/error-message/index.js similarity index 100% rename from ui/app/components/error-message/index.js rename to ui/app/components/ui/error-message/index.js diff --git a/ui/app/components/error-message/index.scss b/ui/app/components/ui/error-message/index.scss similarity index 100% rename from ui/app/components/error-message/index.scss rename to ui/app/components/ui/error-message/index.scss diff --git a/ui/app/components/error-message/tests/error-message.component.test.js b/ui/app/components/ui/error-message/tests/error-message.component.test.js similarity index 100% rename from ui/app/components/error-message/tests/error-message.component.test.js rename to ui/app/components/ui/error-message/tests/error-message.component.test.js diff --git a/ui/app/components/eth-balance.js b/ui/app/components/ui/eth-balance.js similarity index 98% rename from ui/app/components/eth-balance.js rename to ui/app/components/ui/eth-balance.js index 2f6395a2d..7d577b716 100644 --- a/ui/app/components/eth-balance.js +++ b/ui/app/components/ui/eth-balance.js @@ -5,7 +5,7 @@ const { inherits } = require('util') const { formatBalance, generateBalanceObject, -} = require('../util') +} = require('../../helpers/utils/util') const Tooltip = require('./tooltip.js') const FiatValue = require('./fiat-value.js') diff --git a/ui/app/components/export-text-container/export-text-container.component.js b/ui/app/components/ui/export-text-container/export-text-container.component.js similarity index 95% rename from ui/app/components/export-text-container/export-text-container.component.js rename to ui/app/components/ui/export-text-container/export-text-container.component.js index c2546fa9b..c632e8f26 100644 --- a/ui/app/components/export-text-container/export-text-container.component.js +++ b/ui/app/components/ui/export-text-container/export-text-container.component.js @@ -2,7 +2,7 @@ const { Component } = require('react') const PropTypes = require('prop-types') const h = require('react-hyperscript') const copyToClipboard = require('copy-to-clipboard') -const { exportAsFile } = require('../../util') +const { exportAsFile } = require('../../../helpers/utils/util') class ExportTextContainer extends Component { render () { diff --git a/ui/app/components/export-text-container/index.js b/ui/app/components/ui/export-text-container/index.js similarity index 100% rename from ui/app/components/export-text-container/index.js rename to ui/app/components/ui/export-text-container/index.js diff --git a/ui/app/components/export-text-container/index.scss b/ui/app/components/ui/export-text-container/index.scss similarity index 100% rename from ui/app/components/export-text-container/index.scss rename to ui/app/components/ui/export-text-container/index.scss diff --git a/ui/app/components/fiat-value.js b/ui/app/components/ui/fiat-value.js similarity index 95% rename from ui/app/components/fiat-value.js rename to ui/app/components/ui/fiat-value.js index 56465fc9d..02111ba49 100644 --- a/ui/app/components/fiat-value.js +++ b/ui/app/components/ui/fiat-value.js @@ -1,7 +1,7 @@ const Component = require('react').Component const h = require('react-hyperscript') const inherits = require('util').inherits -const formatBalance = require('../util').formatBalance +const formatBalance = require('../../helpers/utils/util').formatBalance module.exports = FiatValue diff --git a/ui/app/components/hex-to-decimal/hex-to-decimal.component.js b/ui/app/components/ui/hex-to-decimal/hex-to-decimal.component.js similarity index 85% rename from ui/app/components/hex-to-decimal/hex-to-decimal.component.js rename to ui/app/components/ui/hex-to-decimal/hex-to-decimal.component.js index 6847a6919..f03aaf255 100644 --- a/ui/app/components/hex-to-decimal/hex-to-decimal.component.js +++ b/ui/app/components/ui/hex-to-decimal/hex-to-decimal.component.js @@ -1,6 +1,6 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' -import { hexToDecimal } from '../../helpers/conversions.util' +import { hexToDecimal } from '../../../helpers/utils/conversions.util' export default class HexToDecimal extends PureComponent { static propTypes = { diff --git a/ui/app/components/hex-to-decimal/index.js b/ui/app/components/ui/hex-to-decimal/index.js similarity index 100% rename from ui/app/components/hex-to-decimal/index.js rename to ui/app/components/ui/hex-to-decimal/index.js diff --git a/ui/app/components/hex-to-decimal/tests/hex-to-decimal.component.test.js b/ui/app/components/ui/hex-to-decimal/tests/hex-to-decimal.component.test.js similarity index 100% rename from ui/app/components/hex-to-decimal/tests/hex-to-decimal.component.test.js rename to ui/app/components/ui/hex-to-decimal/tests/hex-to-decimal.component.test.js diff --git a/ui/app/components/identicon/identicon.component.js b/ui/app/components/ui/identicon/identicon.component.js similarity index 94% rename from ui/app/components/identicon/identicon.component.js rename to ui/app/components/ui/identicon/identicon.component.js index b892e5ae5..88521247c 100644 --- a/ui/app/components/identicon/identicon.component.js +++ b/ui/app/components/ui/identicon/identicon.component.js @@ -1,9 +1,9 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' -import { toDataUrl } from '../../../lib/blockies' +import { toDataUrl } from '../../../../lib/blockies' import contractMap from 'eth-contract-metadata' -import { checksumAddress } from '../../../app/util' +import { checksumAddress } from '../../../helpers/utils/util' import Jazzicon from '../jazzicon' const getStyles = diameter => ( diff --git a/ui/app/components/identicon/identicon.container.js b/ui/app/components/ui/identicon/identicon.container.js similarity index 100% rename from ui/app/components/identicon/identicon.container.js rename to ui/app/components/ui/identicon/identicon.container.js diff --git a/ui/app/components/identicon/index.js b/ui/app/components/ui/identicon/index.js similarity index 100% rename from ui/app/components/identicon/index.js rename to ui/app/components/ui/identicon/index.js diff --git a/ui/app/components/identicon/index.scss b/ui/app/components/ui/identicon/index.scss similarity index 100% rename from ui/app/components/identicon/index.scss rename to ui/app/components/ui/identicon/index.scss diff --git a/ui/app/components/identicon/tests/identicon.component.test.js b/ui/app/components/ui/identicon/tests/identicon.component.test.js similarity index 100% rename from ui/app/components/identicon/tests/identicon.component.test.js rename to ui/app/components/ui/identicon/tests/identicon.component.test.js diff --git a/ui/app/components/jazzicon/index.js b/ui/app/components/ui/jazzicon/index.js similarity index 100% rename from ui/app/components/jazzicon/index.js rename to ui/app/components/ui/jazzicon/index.js diff --git a/ui/app/components/jazzicon/jazzicon.component.js b/ui/app/components/ui/jazzicon/jazzicon.component.js similarity index 96% rename from ui/app/components/jazzicon/jazzicon.component.js rename to ui/app/components/ui/jazzicon/jazzicon.component.js index fcb1c59b1..3a17e446f 100644 --- a/ui/app/components/jazzicon/jazzicon.component.js +++ b/ui/app/components/ui/jazzicon/jazzicon.component.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types' import isNode from 'detect-node' import { findDOMNode } from 'react-dom' import jazzicon from 'jazzicon' -import iconFactoryGenerator from '../../../lib/icon-factory' +import iconFactoryGenerator from '../../../../lib/icon-factory' const iconFactory = iconFactoryGenerator(jazzicon) /** diff --git a/ui/app/components/loading-screen/index.js b/ui/app/components/ui/loading-screen/index.js similarity index 100% rename from ui/app/components/loading-screen/index.js rename to ui/app/components/ui/loading-screen/index.js diff --git a/ui/app/components/loading-screen/loading-screen.component.js b/ui/app/components/ui/loading-screen/loading-screen.component.js similarity index 100% rename from ui/app/components/loading-screen/loading-screen.component.js rename to ui/app/components/ui/loading-screen/loading-screen.component.js diff --git a/ui/app/components/lock-icon/index.js b/ui/app/components/ui/lock-icon/index.js similarity index 100% rename from ui/app/components/lock-icon/index.js rename to ui/app/components/ui/lock-icon/index.js diff --git a/ui/app/components/lock-icon/lock-icon.component.js b/ui/app/components/ui/lock-icon/lock-icon.component.js similarity index 100% rename from ui/app/components/lock-icon/lock-icon.component.js rename to ui/app/components/ui/lock-icon/lock-icon.component.js diff --git a/ui/app/components/mascot.js b/ui/app/components/ui/mascot.js similarity index 100% rename from ui/app/components/mascot.js rename to ui/app/components/ui/mascot.js diff --git a/ui/app/components/page-container/index.js b/ui/app/components/ui/page-container/index.js similarity index 100% rename from ui/app/components/page-container/index.js rename to ui/app/components/ui/page-container/index.js diff --git a/ui/app/components/page-container/index.scss b/ui/app/components/ui/page-container/index.scss similarity index 100% rename from ui/app/components/page-container/index.scss rename to ui/app/components/ui/page-container/index.scss diff --git a/ui/app/components/page-container/page-container-content.component.js b/ui/app/components/ui/page-container/page-container-content.component.js similarity index 100% rename from ui/app/components/page-container/page-container-content.component.js rename to ui/app/components/ui/page-container/page-container-content.component.js diff --git a/ui/app/components/page-container/page-container-footer/index.js b/ui/app/components/ui/page-container/page-container-footer/index.js similarity index 100% rename from ui/app/components/page-container/page-container-footer/index.js rename to ui/app/components/ui/page-container/page-container-footer/index.js diff --git a/ui/app/components/page-container/page-container-footer/page-container-footer.component.js b/ui/app/components/ui/page-container/page-container-footer/page-container-footer.component.js similarity index 100% rename from ui/app/components/page-container/page-container-footer/page-container-footer.component.js rename to ui/app/components/ui/page-container/page-container-footer/page-container-footer.component.js diff --git a/ui/app/components/page-container/page-container-footer/tests/page-container-footer.component.test.js b/ui/app/components/ui/page-container/page-container-footer/tests/page-container-footer.component.test.js similarity index 100% rename from ui/app/components/page-container/page-container-footer/tests/page-container-footer.component.test.js rename to ui/app/components/ui/page-container/page-container-footer/tests/page-container-footer.component.test.js diff --git a/ui/app/components/page-container/page-container-header/index.js b/ui/app/components/ui/page-container/page-container-header/index.js similarity index 100% rename from ui/app/components/page-container/page-container-header/index.js rename to ui/app/components/ui/page-container/page-container-header/index.js diff --git a/ui/app/components/page-container/page-container-header/page-container-header.component.js b/ui/app/components/ui/page-container/page-container-header/page-container-header.component.js similarity index 100% rename from ui/app/components/page-container/page-container-header/page-container-header.component.js rename to ui/app/components/ui/page-container/page-container-header/page-container-header.component.js diff --git a/ui/app/components/page-container/page-container-header/tests/page-container-header.component.test.js b/ui/app/components/ui/page-container/page-container-header/tests/page-container-header.component.test.js similarity index 100% rename from ui/app/components/page-container/page-container-header/tests/page-container-header.component.test.js rename to ui/app/components/ui/page-container/page-container-header/tests/page-container-header.component.test.js diff --git a/ui/app/components/page-container/page-container.component.js b/ui/app/components/ui/page-container/page-container.component.js similarity index 100% rename from ui/app/components/page-container/page-container.component.js rename to ui/app/components/ui/page-container/page-container.component.js diff --git a/ui/app/components/page-container/tests/page-container.component.test.js b/ui/app/components/ui/page-container/tests/page-container.component.test.js similarity index 100% rename from ui/app/components/page-container/tests/page-container.component.test.js rename to ui/app/components/ui/page-container/tests/page-container.component.test.js diff --git a/ui/app/components/qr-code.js b/ui/app/components/ui/qr-code.js similarity index 96% rename from ui/app/components/qr-code.js rename to ui/app/components/ui/qr-code.js index 312815891..351e072e2 100644 --- a/ui/app/components/qr-code.js +++ b/ui/app/components/ui/qr-code.js @@ -5,7 +5,7 @@ const inherits = require('util').inherits const connect = require('react-redux').connect const { isHexPrefixed } = require('ethereumjs-util') const ReadOnlyInput = require('./readonly-input') -const { checksumAddress } = require('../util') +const { checksumAddress } = require('../../helpers/utils/util') module.exports = connect(mapStateToProps)(QrCodeView) diff --git a/ui/app/components/readonly-input.js b/ui/app/components/ui/readonly-input.js similarity index 100% rename from ui/app/components/readonly-input.js rename to ui/app/components/ui/readonly-input.js diff --git a/ui/app/components/sender-to-recipient/index.js b/ui/app/components/ui/sender-to-recipient/index.js similarity index 100% rename from ui/app/components/sender-to-recipient/index.js rename to ui/app/components/ui/sender-to-recipient/index.js diff --git a/ui/app/components/sender-to-recipient/index.scss b/ui/app/components/ui/sender-to-recipient/index.scss similarity index 100% rename from ui/app/components/sender-to-recipient/index.scss rename to ui/app/components/ui/sender-to-recipient/index.scss diff --git a/ui/app/components/sender-to-recipient/sender-to-recipient.component.js b/ui/app/components/ui/sender-to-recipient/sender-to-recipient.component.js similarity index 98% rename from ui/app/components/sender-to-recipient/sender-to-recipient.component.js rename to ui/app/components/ui/sender-to-recipient/sender-to-recipient.component.js index 7d3436dc3..57b595d48 100644 --- a/ui/app/components/sender-to-recipient/sender-to-recipient.component.js +++ b/ui/app/components/ui/sender-to-recipient/sender-to-recipient.component.js @@ -5,7 +5,7 @@ import Identicon from '../identicon' import Tooltip from '../tooltip-v2' import copyToClipboard from 'copy-to-clipboard' import { DEFAULT_VARIANT, CARDS_VARIANT, FLAT_VARIANT } from './sender-to-recipient.constants' -import { checksumAddress } from '../../util' +import { checksumAddress } from '../../../helpers/utils/util' const variantHash = { [DEFAULT_VARIANT]: 'sender-to-recipient--default', diff --git a/ui/app/components/sender-to-recipient/sender-to-recipient.constants.js b/ui/app/components/ui/sender-to-recipient/sender-to-recipient.constants.js similarity index 100% rename from ui/app/components/sender-to-recipient/sender-to-recipient.constants.js rename to ui/app/components/ui/sender-to-recipient/sender-to-recipient.constants.js diff --git a/ui/app/components/spinner/index.js b/ui/app/components/ui/spinner/index.js similarity index 100% rename from ui/app/components/spinner/index.js rename to ui/app/components/ui/spinner/index.js diff --git a/ui/app/components/spinner/spinner.component.js b/ui/app/components/ui/spinner/spinner.component.js similarity index 100% rename from ui/app/components/spinner/spinner.component.js rename to ui/app/components/ui/spinner/spinner.component.js diff --git a/ui/app/components/tabs/index.js b/ui/app/components/ui/tabs/index.js similarity index 100% rename from ui/app/components/tabs/index.js rename to ui/app/components/ui/tabs/index.js diff --git a/ui/app/components/tabs/index.scss b/ui/app/components/ui/tabs/index.scss similarity index 88% rename from ui/app/components/tabs/index.scss rename to ui/app/components/ui/tabs/index.scss index a3b42f8e3..25143ff35 100644 --- a/ui/app/components/tabs/index.scss +++ b/ui/app/components/ui/tabs/index.scss @@ -1,4 +1,4 @@ -@import './tab/index'; +@import 'tab/index'; .tabs { &__list { diff --git a/ui/app/components/tabs/tab/index.js b/ui/app/components/ui/tabs/tab/index.js similarity index 100% rename from ui/app/components/tabs/tab/index.js rename to ui/app/components/ui/tabs/tab/index.js diff --git a/ui/app/components/tabs/tab/index.scss b/ui/app/components/ui/tabs/tab/index.scss similarity index 100% rename from ui/app/components/tabs/tab/index.scss rename to ui/app/components/ui/tabs/tab/index.scss diff --git a/ui/app/components/tabs/tab/tab.component.js b/ui/app/components/ui/tabs/tab/tab.component.js similarity index 100% rename from ui/app/components/tabs/tab/tab.component.js rename to ui/app/components/ui/tabs/tab/tab.component.js diff --git a/ui/app/components/tabs/tabs.component.js b/ui/app/components/ui/tabs/tabs.component.js similarity index 100% rename from ui/app/components/tabs/tabs.component.js rename to ui/app/components/ui/tabs/tabs.component.js diff --git a/ui/app/components/text-field/index.js b/ui/app/components/ui/text-field/index.js similarity index 100% rename from ui/app/components/text-field/index.js rename to ui/app/components/ui/text-field/index.js diff --git a/ui/app/components/text-field/text-field.component.js b/ui/app/components/ui/text-field/text-field.component.js similarity index 100% rename from ui/app/components/text-field/text-field.component.js rename to ui/app/components/ui/text-field/text-field.component.js diff --git a/ui/app/components/text-field/text-field.stories.js b/ui/app/components/ui/text-field/text-field.stories.js similarity index 96% rename from ui/app/components/text-field/text-field.stories.js rename to ui/app/components/ui/text-field/text-field.stories.js index c00873b8a..337f78ecf 100644 --- a/ui/app/components/text-field/text-field.stories.js +++ b/ui/app/components/ui/text-field/text-field.stories.js @@ -1,6 +1,6 @@ import React from 'react' import { storiesOf } from '@storybook/react' -import TextField from './' +import TextField from '.' storiesOf('TextField', module) .add('text', () => diff --git a/ui/app/components/token-balance/index.js b/ui/app/components/ui/token-balance/index.js similarity index 100% rename from ui/app/components/token-balance/index.js rename to ui/app/components/ui/token-balance/index.js diff --git a/ui/app/components/token-balance/index.scss b/ui/app/components/ui/token-balance/index.scss similarity index 100% rename from ui/app/components/token-balance/index.scss rename to ui/app/components/ui/token-balance/index.scss diff --git a/ui/app/components/token-balance/token-balance.component.js b/ui/app/components/ui/token-balance/token-balance.component.js similarity index 100% rename from ui/app/components/token-balance/token-balance.component.js rename to ui/app/components/ui/token-balance/token-balance.component.js diff --git a/ui/app/components/token-balance/token-balance.container.js b/ui/app/components/ui/token-balance/token-balance.container.js similarity index 69% rename from ui/app/components/token-balance/token-balance.container.js rename to ui/app/components/ui/token-balance/token-balance.container.js index adc001f83..a0f1efc20 100644 --- a/ui/app/components/token-balance/token-balance.container.js +++ b/ui/app/components/ui/token-balance/token-balance.container.js @@ -1,8 +1,8 @@ import { connect } from 'react-redux' import { compose } from 'recompose' -import withTokenTracker from '../../higher-order-components/with-token-tracker' +import withTokenTracker from '../../../helpers/higher-order-components/with-token-tracker' import TokenBalance from './token-balance.component' -import selectors from '../../selectors' +import selectors from '../../../selectors/selectors' const mapStateToProps = state => { return { diff --git a/ui/app/components/token-currency-display/index.js b/ui/app/components/ui/token-currency-display/index.js similarity index 100% rename from ui/app/components/token-currency-display/index.js rename to ui/app/components/ui/token-currency-display/index.js diff --git a/ui/app/components/token-currency-display/token-currency-display.component.js b/ui/app/components/ui/token-currency-display/token-currency-display.component.js similarity index 89% rename from ui/app/components/token-currency-display/token-currency-display.component.js rename to ui/app/components/ui/token-currency-display/token-currency-display.component.js index f49846449..3c2722b36 100644 --- a/ui/app/components/token-currency-display/token-currency-display.component.js +++ b/ui/app/components/ui/token-currency-display/token-currency-display.component.js @@ -1,8 +1,8 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' import CurrencyDisplay from '../currency-display' -import { getTokenData } from '../../helpers/transactions.util' -import { getTokenValue, calcTokenAmount } from '../../token-util' +import { getTokenData } from '../../../helpers/utils/transactions.util' +import { getTokenValue, calcTokenAmount } from '../../../helpers/utils/token-util' export default class TokenCurrencyDisplay extends PureComponent { static propTypes = { diff --git a/ui/app/components/token-input/index.js b/ui/app/components/ui/token-input/index.js similarity index 100% rename from ui/app/components/token-input/index.js rename to ui/app/components/ui/token-input/index.js diff --git a/ui/app/components/token-input/tests/token-input.component.test.js b/ui/app/components/ui/token-input/tests/token-input.component.test.js similarity index 100% rename from ui/app/components/token-input/tests/token-input.component.test.js rename to ui/app/components/ui/token-input/tests/token-input.component.test.js diff --git a/ui/app/components/token-input/tests/token-input.container.test.js b/ui/app/components/ui/token-input/tests/token-input.container.test.js similarity index 100% rename from ui/app/components/token-input/tests/token-input.container.test.js rename to ui/app/components/ui/token-input/tests/token-input.container.test.js diff --git a/ui/app/components/token-input/token-input.component.js b/ui/app/components/ui/token-input/token-input.component.js similarity index 94% rename from ui/app/components/token-input/token-input.component.js rename to ui/app/components/ui/token-input/token-input.component.js index 398b762ec..c28af5fde 100644 --- a/ui/app/components/token-input/token-input.component.js +++ b/ui/app/components/ui/token-input/token-input.component.js @@ -2,10 +2,10 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' import UnitInput from '../unit-input' import CurrencyDisplay from '../currency-display' -import { getWeiHexFromDecimalValue } from '../../helpers/conversions.util' +import { getWeiHexFromDecimalValue } from '../../../helpers/utils/conversions.util' import ethUtil from 'ethereumjs-util' -import { conversionUtil, multiplyCurrencies } from '../../conversion-util' -import { ETH } from '../../constants/common' +import { conversionUtil, multiplyCurrencies } from '../../../helpers/utils/conversion-util' +import { ETH } from '../../../helpers/constants/common' /** * Component that allows user to enter token values as a number, and props receive a converted diff --git a/ui/app/components/token-input/token-input.container.js b/ui/app/components/ui/token-input/token-input.container.js similarity index 93% rename from ui/app/components/token-input/token-input.container.js rename to ui/app/components/ui/token-input/token-input.container.js index a00d200f7..981cb3598 100644 --- a/ui/app/components/token-input/token-input.container.js +++ b/ui/app/components/ui/token-input/token-input.container.js @@ -1,6 +1,6 @@ import { connect } from 'react-redux' import TokenInput from './token-input.component' -import {getIsMainnet, getSelectedToken, getSelectedTokenExchangeRate, preferencesSelector} from '../../selectors' +import {getIsMainnet, getSelectedToken, getSelectedTokenExchangeRate, preferencesSelector} from '../../../selectors/selectors' const mapStateToProps = state => { const { metamask: { currentCurrency } } = state diff --git a/ui/app/components/tooltip-v2.js b/ui/app/components/ui/tooltip-v2.js similarity index 100% rename from ui/app/components/tooltip-v2.js rename to ui/app/components/ui/tooltip-v2.js diff --git a/ui/app/components/tooltip.js b/ui/app/components/ui/tooltip.js similarity index 100% rename from ui/app/components/tooltip.js rename to ui/app/components/ui/tooltip.js diff --git a/ui/app/components/unit-input/index.js b/ui/app/components/ui/unit-input/index.js similarity index 100% rename from ui/app/components/unit-input/index.js rename to ui/app/components/ui/unit-input/index.js diff --git a/ui/app/components/unit-input/index.scss b/ui/app/components/ui/unit-input/index.scss similarity index 100% rename from ui/app/components/unit-input/index.scss rename to ui/app/components/ui/unit-input/index.scss diff --git a/ui/app/components/unit-input/tests/unit-input.component.test.js b/ui/app/components/ui/unit-input/tests/unit-input.component.test.js similarity index 100% rename from ui/app/components/unit-input/tests/unit-input.component.test.js rename to ui/app/components/ui/unit-input/tests/unit-input.component.test.js diff --git a/ui/app/components/unit-input/unit-input.component.js b/ui/app/components/ui/unit-input/unit-input.component.js similarity index 97% rename from ui/app/components/unit-input/unit-input.component.js rename to ui/app/components/ui/unit-input/unit-input.component.js index 230eecfe6..7b414f177 100644 --- a/ui/app/components/unit-input/unit-input.component.js +++ b/ui/app/components/ui/unit-input/unit-input.component.js @@ -1,7 +1,7 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' -import { removeLeadingZeroes } from '../send/send.utils' +import { removeLeadingZeroes } from '../../app/send/send.utils' /** * Component that attaches a suffix or unit of measurement trailing user input, ex. 'ETH'. Also diff --git a/ui/app/css/itcss/components/index.scss b/ui/app/css/itcss/components/index.scss index 7eaf60ce8..f2f37bfa3 100644 --- a/ui/app/css/itcss/components/index.scss +++ b/ui/app/css/itcss/components/index.scss @@ -52,4 +52,4 @@ @import './tooltip.scss'; -@import '../../../components/index'; +@import '../../../components/app/index'; diff --git a/ui/app/reducers/app.js b/ui/app/ducks/app/app.js similarity index 99% rename from ui/app/reducers/app.js rename to ui/app/ducks/app/app.js index 22cfe7f8d..acbb5c989 100644 --- a/ui/app/reducers/app.js +++ b/ui/app/ducks/app/app.js @@ -1,6 +1,6 @@ const extend = require('xtend') -const actions = require('../actions') -const txHelper = require('../../lib/tx-helper') +const actions = require('../../store/actions') +const txHelper = require('../../../lib/tx-helper') const log = require('loglevel') module.exports = reduceApp diff --git a/ui/app/ducks/confirm-transaction.duck.js b/ui/app/ducks/confirm-transaction/confirm-transaction.duck.js similarity index 97% rename from ui/app/ducks/confirm-transaction.duck.js rename to ui/app/ducks/confirm-transaction/confirm-transaction.duck.js index f75ff809a..4edf8a70c 100644 --- a/ui/app/ducks/confirm-transaction.duck.js +++ b/ui/app/ducks/confirm-transaction/confirm-transaction.duck.js @@ -3,7 +3,7 @@ import { currentCurrencySelector, unconfirmedTransactionsHashSelector, getNativeCurrency, -} from '../selectors/confirm-transaction' +} from '../../selectors/confirm-transaction' import { getValueFromWeiHex, @@ -13,17 +13,17 @@ import { addEth, increaseLastGasPrice, hexGreaterThan, -} from '../helpers/confirm-transaction/util' +} from '../../helpers/utils/confirm-tx.util' import { getTokenData, getMethodData, isSmartContractAddress, sumHexes, -} from '../helpers/transactions.util' +} from '../../helpers/utils/transactions.util' -import { getSymbolAndDecimals } from '../token-util' -import { conversionUtil } from '../conversion-util' +import { getSymbolAndDecimals } from '../../helpers/utils/token-util' +import { conversionUtil } from '../../helpers/utils/conversion-util' import { addHexPrefix } from 'ethereumjs-util' // Actions diff --git a/ui/app/ducks/tests/confirm-transaction.duck.test.js b/ui/app/ducks/confirm-transaction/confirm-transaction.duck.test.js similarity index 99% rename from ui/app/ducks/tests/confirm-transaction.duck.test.js rename to ui/app/ducks/confirm-transaction/confirm-transaction.duck.test.js index eceacd0bd..483f2f56d 100644 --- a/ui/app/ducks/tests/confirm-transaction.duck.test.js +++ b/ui/app/ducks/confirm-transaction/confirm-transaction.duck.test.js @@ -3,7 +3,7 @@ import configureMockStore from 'redux-mock-store' import thunk from 'redux-thunk' import sinon from 'sinon' -import ConfirmTransactionReducer, * as actions from '../confirm-transaction.duck.js' +import ConfirmTransactionReducer, * as actions from './confirm-transaction.duck.js' const initialState = { txData: {}, diff --git a/ui/app/ducks/tests/gas-duck.test.js b/ui/app/ducks/gas/gas-duck.test.js similarity index 99% rename from ui/app/ducks/tests/gas-duck.test.js rename to ui/app/ducks/gas/gas-duck.test.js index cd963aed4..4e875e020 100644 --- a/ui/app/ducks/tests/gas-duck.test.js +++ b/ui/app/ducks/gas/gas-duck.test.js @@ -3,8 +3,8 @@ import sinon from 'sinon' import proxyquire from 'proxyquire' -const GasDuck = proxyquire('../gas.duck.js', { - '../../lib/local-storage-helpers': { +const GasDuck = proxyquire('./gas.duck.js', { + '../../../lib/local-storage-helpers': { loadLocalStorageData: sinon.spy(), saveLocalStorageData: sinon.spy(), }, diff --git a/ui/app/ducks/gas.duck.js b/ui/app/ducks/gas/gas.duck.js similarity index 99% rename from ui/app/ducks/gas.duck.js rename to ui/app/ducks/gas/gas.duck.js index 957b00163..0a571a78e 100644 --- a/ui/app/ducks/gas.duck.js +++ b/ui/app/ducks/gas/gas.duck.js @@ -3,10 +3,10 @@ import BigNumber from 'bignumber.js' import { loadLocalStorageData, saveLocalStorageData, -} from '../../lib/local-storage-helpers' +} from '../../../lib/local-storage-helpers' import { decGWEIToHexWEI, -} from '../helpers/conversions.util' +} from '../../helpers/utils/conversions.util' // Actions const BASIC_GAS_ESTIMATE_LOADING_FINISHED = 'metamask/gas/BASIC_GAS_ESTIMATE_LOADING_FINISHED' diff --git a/ui/app/reducers.js b/ui/app/ducks/index.js similarity index 85% rename from ui/app/reducers.js rename to ui/app/ducks/index.js index 786af853d..2d33edcfa 100644 --- a/ui/app/reducers.js +++ b/ui/app/ducks/index.js @@ -5,12 +5,12 @@ const copyToClipboard = require('copy-to-clipboard') // // Sub-Reducers take in the complete state and return their sub-state // -const reduceMetamask = require('./reducers/metamask') -const reduceApp = require('./reducers/app') -const reduceLocale = require('./reducers/locale') -const reduceSend = require('./ducks/send.duck').default -import reduceConfirmTransaction from './ducks/confirm-transaction.duck' -import reduceGas from './ducks/gas.duck' +const reduceMetamask = require('./metamask/metamask') +const reduceApp = require('./app/app') +const reduceLocale = require('./locale/locale') +const reduceSend = require('./send/send.duck').default +import reduceConfirmTransaction from './confirm-transaction/confirm-transaction.duck' +import reduceGas from './gas/gas.duck' window.METAMASK_CACHED_LOG_STATE = null diff --git a/ui/app/reducers/locale.js b/ui/app/ducks/locale/locale.js similarity index 88% rename from ui/app/reducers/locale.js rename to ui/app/ducks/locale/locale.js index bdd97acb4..bb8e1b08e 100644 --- a/ui/app/reducers/locale.js +++ b/ui/app/ducks/locale/locale.js @@ -1,5 +1,5 @@ const extend = require('xtend') -const actions = require('../actions') +const actions = require('../../store/actions') module.exports = reduceMetamask diff --git a/ui/app/reducers/metamask.js b/ui/app/ducks/metamask/metamask.js similarity index 97% rename from ui/app/reducers/metamask.js rename to ui/app/ducks/metamask/metamask.js index d4b920748..864229e83 100644 --- a/ui/app/reducers/metamask.js +++ b/ui/app/ducks/metamask/metamask.js @@ -1,8 +1,8 @@ const extend = require('xtend') -const actions = require('../actions') -const { getEnvironmentType } = require('../../../app/scripts/lib/util') -const { ENVIRONMENT_TYPE_POPUP } = require('../../../app/scripts/lib/enums') -const { OLD_UI_NETWORK_TYPE } = require('../../../app/scripts/controllers/network/enums') +const actions = require('../../store/actions') +const { getEnvironmentType } = require('../../../../app/scripts/lib/util') +const { ENVIRONMENT_TYPE_POPUP } = require('../../../../app/scripts/lib/enums') +const { OLD_UI_NETWORK_TYPE } = require('../../../../app/scripts/controllers/network/enums') module.exports = reduceMetamask diff --git a/ui/app/ducks/mock-gas-estimate-data.js b/ui/app/ducks/mock-gas-estimate-data.js deleted file mode 100644 index f2943df7c..000000000 --- a/ui/app/ducks/mock-gas-estimate-data.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - mockGasEstimateData: [{'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 6.2827225131, 'pct_remaining5m': 0.0, 'sum': 6.7965923077, 'tx_atabove': 3969.0, 'hashpower_accepting': 15.8974358974, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 1.0, 'pct_mined_5m': 0.0, 'total_seen_5m': 1.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 256.68, 'avgdiff': 0, 'expectedWait': 1000.0, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 7.1623036649, 'pct_remaining5m': 0.0, 'sum': 6.7841307692, 'tx_atabove': 3969.0, 'hashpower_accepting': 16.4102564103, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 1.3, 'pct_mined_5m': 0.0, 'total_seen_5m': 8.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 256.68, 'avgdiff': 0, 'expectedWait': 1000.0, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 7.3403141361, 'pct_remaining5m': 0.0, 'sum': 6.7841307692, 'tx_atabove': 3969.0, 'hashpower_accepting': 16.4102564103, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 1.4, 'pct_mined_5m': 0.0, 'total_seen_5m': 13.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 256.68, 'avgdiff': 0, 'expectedWait': 1000.0, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 1.0, 'hashpower_accepting2': 7.3926701571, 'pct_remaining5m': 0.0, 'sum': 6.7841307692, 'tx_atabove': 3969.0, 'hashpower_accepting': 16.4102564103, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 1.5, 'pct_mined_5m': 0.0, 'total_seen_5m': 40.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 256.68, 'avgdiff': 0, 'expectedWait': 1000.0, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 356.0, 'hashpower_accepting2': 7.5706806283, 'pct_remaining5m': 25.0, 'sum': 6.7769307692, 'tx_atabove': 3957.0, 'hashpower_accepting': 16.4102564103, 'hpa_coef2': -0.067, 'total_seen_30m': 33.0, 'int2': 6.9238, 'pct_remaining30m': 9.0, 'gasprice': 1.6, 'pct_mined_5m': 0.0, 'total_seen_5m': 346.0, 'pct_mined_30m': 6.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 256.68, 'avgdiff': 0, 'expectedWait': 1000.0, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 1048.5, 'hashpower_accepting2': 7.6020942408, 'pct_remaining5m': 95.0, 'sum': 6.0111923077, 'tx_atabove': 2930.0, 'hashpower_accepting': 22.5641025641, 'hpa_coef2': -0.067, 'total_seen_30m': 11.0, 'int2': 6.9238, 'pct_remaining30m': 100.0, 'gasprice': 2.0, 'pct_mined_5m': 0.0, 'total_seen_5m': 23.0, 'pct_mined_30m': 0.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 256.68, 'avgdiff': 0, 'expectedWait': 1000.0, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 56.0, 'hashpower_accepting2': 7.6020942408, 'pct_remaining5m': 99.0, 'sum': 5.2227923077, 'tx_atabove': 1616.0, 'hashpower_accepting': 22.5641025641, 'hpa_coef2': -0.067, 'total_seen_30m': 66.0, 'int2': 6.9238, 'pct_remaining30m': 100.0, 'gasprice': 2.1, 'pct_mined_5m': 0.0, 'total_seen_5m': 131.0, 'pct_mined_30m': 0.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 256.68, 'avgdiff': 0, 'expectedWait': 1000.0, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 41.0, 'hashpower_accepting2': 7.6020942408, 'pct_remaining5m': 100.0, 'sum': 4.8633923077, 'tx_atabove': 1017.0, 'hashpower_accepting': 22.5641025641, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 2.8, 'pct_mined_5m': 0.0, 'total_seen_5m': 2.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 256.68, 'avgdiff': 0, 'expectedWait': 1000.0, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 31.0, 'hashpower_accepting2': 7.612565445, 'pct_remaining5m': 100.0, 'sum': 4.8615923077, 'tx_atabove': 1014.0, 'hashpower_accepting': 22.5641025641, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 100.0, 'gasprice': 2.9, 'pct_mined_5m': 0.0, 'total_seen_5m': 2.0, 'pct_mined_30m': 0.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 256.68, 'avgdiff': 0, 'expectedWait': 1000.0, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 147.0, 'hashpower_accepting2': 12.3246073298, 'pct_remaining5m': 50.0, 'sum': 4.6965923077, 'tx_atabove': 1009.0, 'hashpower_accepting': 29.2307692308, 'hpa_coef2': -0.067, 'total_seen_30m': 6.0, 'int2': 6.9238, 'pct_remaining30m': 50.0, 'gasprice': 3.0, 'pct_mined_5m': 50.0, 'total_seen_5m': 6.0, 'pct_mined_30m': 50.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 256.68, 'avgdiff': 0, 'expectedWait': 1000.0, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 73.0, 'hashpower_accepting2': 12.3246073298, 'pct_remaining5m': 50.0, 'sum': 4.6437923077, 'tx_atabove': 921.0, 'hashpower_accepting': 29.2307692308, 'hpa_coef2': -0.067, 'total_seen_30m': 2.0, 'int2': 6.9238, 'pct_remaining30m': 100.0, 'gasprice': 3.1, 'pct_mined_5m': 0.0, 'total_seen_5m': 2.0, 'pct_mined_30m': 0.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 256.68, 'avgdiff': 0, 'expectedWait': 1000.0, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 93.0, 'hashpower_accepting2': 12.3246073298, 'pct_remaining5m': 100.0, 'sum': 4.6413923077, 'tx_atabove': 917.0, 'hashpower_accepting': 29.2307692308, 'hpa_coef2': -0.067, 'total_seen_30m': 11.0, 'int2': 6.9238, 'pct_remaining30m': 100.0, 'gasprice': 3.2, 'pct_mined_5m': 0.0, 'total_seen_5m': 8.0, 'pct_mined_30m': 0.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 256.68, 'avgdiff': 0, 'expectedWait': 1000.0, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 44.5, 'hashpower_accepting2': 12.3246073298, 'pct_remaining5m': 100.0, 'sum': 4.6107923077, 'tx_atabove': 866.0, 'hashpower_accepting': 29.2307692308, 'hpa_coef2': -0.067, 'total_seen_30m': 2.0, 'int2': 6.9238, 'pct_remaining30m': 50.0, 'gasprice': 3.3, 'pct_mined_5m': 0.0, 'total_seen_5m': 1.0, 'pct_mined_30m': 0.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 256.68, 'avgdiff': 0, 'expectedWait': 1000.0, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 11.0, 'hashpower_accepting2': 12.3664921466, 'pct_remaining5m': 100.0, 'sum': 4.5893307692, 'tx_atabove': 851.0, 'hashpower_accepting': 29.7435897436, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 3.4, 'pct_mined_5m': 0.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 25.27, 'avgdiff': 0, 'expectedWait': 98.4285367101, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 31.0, 'hashpower_accepting2': 12.4712041885, 'pct_remaining5m': 100.0, 'sum': 4.5887307692, 'tx_atabove': 850.0, 'hashpower_accepting': 29.7435897436, 'hpa_coef2': -0.067, 'total_seen_30m': 2.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 3.5, 'pct_mined_5m': 0.0, 'total_seen_5m': 1.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 25.25, 'avgdiff': 0, 'expectedWait': 98.3694973017, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 823.0, 'hashpower_accepting2': 12.4921465969, 'pct_remaining5m': 0.0, 'sum': 4.5428076923, 'tx_atabove': 815.0, 'hashpower_accepting': 30.7692307692, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 3.8, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 24.12, 'avgdiff': 0, 'expectedWait': 93.9542246928, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 35.0, 'hashpower_accepting2': 12.7539267016, 'pct_remaining5m': 10.0, 'sum': 4.5279461538, 'tx_atabove': 811.0, 'hashpower_accepting': 31.2820512821, 'hpa_coef2': -0.067, 'total_seen_30m': 2.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 3.9, 'pct_mined_5m': 80.0, 'total_seen_5m': 10.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 23.76, 'avgdiff': 0, 'expectedWait': 92.5682447753, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 30.0, 'hashpower_accepting2': 15.4869109948, 'pct_remaining5m': 92.0, 'sum': 4.3896692308, 'tx_atabove': 809.0, 'hashpower_accepting': 36.9230769231, 'hpa_coef2': -0.067, 'total_seen_30m': 16.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 4.0, 'pct_mined_5m': 5.0, 'total_seen_5m': 124.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 20.69, 'avgdiff': 0, 'expectedWait': 80.613750022, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 24.0, 'hashpower_accepting2': 16.7853403141, 'pct_remaining5m': 93.0, 'sum': 4.2840692308, 'tx_atabove': 633.0, 'hashpower_accepting': 36.9230769231, 'hpa_coef2': -0.067, 'total_seen_30m': 20.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 4.1, 'pct_mined_5m': 6.0, 'total_seen_5m': 165.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 18.62, 'avgdiff': 0, 'expectedWait': 72.5350019424, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 126.0, 'hashpower_accepting2': 16.9005235602, 'pct_remaining5m': 50.0, 'sum': 4.1260846154, 'tx_atabove': 432.0, 'hashpower_accepting': 38.4615384615, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 4.3, 'pct_mined_5m': 0.0, 'total_seen_5m': 4.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 15.9, 'avgdiff': 0, 'expectedWait': 61.9349484316, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 33.0, 'hashpower_accepting2': 17.1204188482, 'pct_remaining5m': 100.0, 'sum': 4.1140846154, 'tx_atabove': 412.0, 'hashpower_accepting': 38.4615384615, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 4.4, 'pct_mined_5m': 0.0, 'total_seen_5m': 2.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 15.71, 'avgdiff': 0, 'expectedWait': 61.1961705828, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 24.0, 'hashpower_accepting2': 17.2460732984, 'pct_remaining5m': 100.0, 'sum': 4.1092846154, 'tx_atabove': 404.0, 'hashpower_accepting': 38.4615384615, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 4.6, 'pct_mined_5m': 0.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 15.63, 'avgdiff': 0, 'expectedWait': 60.9031328173, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 19.0, 'hashpower_accepting2': 17.4659685864, 'pct_remaining5m': 0.0, 'sum': 4.0570384615, 'tx_atabove': 400.0, 'hashpower_accepting': 40.5128205128, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 4.7, 'pct_mined_5m': 100.0, 'total_seen_5m': 10.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 14.84, 'avgdiff': 0, 'expectedWait': 57.8028719141, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 3.0, 'hashpower_accepting2': 17.612565445, 'pct_remaining5m': 0.0, 'sum': 4.0403769231, 'tx_atabove': 393.0, 'hashpower_accepting': 41.0256410256, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 4.8, 'pct_mined_5m': 100.0, 'total_seen_5m': 3.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 14.59, 'avgdiff': 0, 'expectedWait': 56.8477660026, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 31.0, 'hashpower_accepting2': 17.6439790576, 'pct_remaining5m': 100.0, 'sum': 4.0397769231, 'tx_atabove': 392.0, 'hashpower_accepting': 41.0256410256, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 4.9, 'pct_mined_5m': 0.0, 'total_seen_5m': 1.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 14.58, 'avgdiff': 0, 'expectedWait': 56.8136675736, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 3.0, 'hashpower_accepting2': 20.502617801, 'pct_remaining5m': 3.0, 'sum': 2.2680615385, 'tx_atabove': 390.0, 'hashpower_accepting': 46.1538461538, 'hpa_coef2': -0.067, 'total_seen_30m': 43.0, 'int2': 6.9238, 'pct_remaining30m': 2.0, 'gasprice': 5.0, 'pct_mined_5m': 93.0, 'total_seen_5m': 66.0, 'pct_mined_30m': 97.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 2.48, 'avgdiff': 1, 'expectedWait': 9.660655842, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 2.0, 'hashpower_accepting2': 20.5863874346, 'pct_remaining5m': 0.0, 'sum': 2.2308615385, 'tx_atabove': 328.0, 'hashpower_accepting': 46.1538461538, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 5.1, 'pct_mined_5m': 100.0, 'total_seen_5m': 2.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 2.39, 'avgdiff': 1, 'expectedWait': 9.3078817242, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 20.7015706806, 'pct_remaining5m': 0.0, 'sum': 2.216, 'tx_atabove': 324.0, 'hashpower_accepting': 46.6666666667, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 5.2, 'pct_mined_5m': 100.0, 'total_seen_5m': 2.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 2.35, 'avgdiff': 1, 'expectedWait': 9.170575103, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 2.0, 'hashpower_accepting2': 20.8481675393, 'pct_remaining5m': 0.0, 'sum': 2.1910769231, 'tx_atabove': 324.0, 'hashpower_accepting': 47.6923076923, 'hpa_coef2': -0.067, 'total_seen_30m': 2.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 5.3, 'pct_mined_5m': 100.0, 'total_seen_5m': 5.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 2.3, 'avgdiff': 1, 'expectedWait': 8.9448408351, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 21.0261780105, 'pct_remaining5m': 0.0, 'sum': 2.1898769231, 'tx_atabove': 322.0, 'hashpower_accepting': 47.6923076923, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 5.4, 'pct_mined_5m': 100.0, 'total_seen_5m': 2.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 2.29, 'avgdiff': 1, 'expectedWait': 8.9341134638, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 21.2041884817, 'pct_remaining5m': 0.0, 'sum': 2.1518923077, 'tx_atabove': 321.0, 'hashpower_accepting': 49.2307692308, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 5.5, 'pct_mined_5m': 100.0, 'total_seen_5m': 7.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 2.21, 'avgdiff': 1, 'expectedWait': 8.6011189709, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 2.0, 'hashpower_accepting2': 21.277486911, 'pct_remaining5m': 0.0, 'sum': 2.1512923077, 'tx_atabove': 320.0, 'hashpower_accepting': 49.2307692308, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 5.6, 'pct_mined_5m': 100.0, 'total_seen_5m': 6.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 2.21, 'avgdiff': 1, 'expectedWait': 8.5959598474, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 21.3926701571, 'pct_remaining5m': 0.0, 'sum': 2.1494923077, 'tx_atabove': 317.0, 'hashpower_accepting': 49.2307692308, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 5.7, 'pct_mined_5m': 100.0, 'total_seen_5m': 4.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 2.2, 'avgdiff': 1, 'expectedWait': 8.5805010368, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 21.4136125654, 'pct_remaining5m': 0.0, 'sum': 2.1494923077, 'tx_atabove': 317.0, 'hashpower_accepting': 49.2307692308, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 5.8, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 2.2, 'avgdiff': 1, 'expectedWait': 8.5805010368, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 0.0, 'hashpower_accepting2': 25.5497382199, 'pct_remaining5m': 0.0, 'sum': 2.0124153846, 'tx_atabove': 317.0, 'hashpower_accepting': 54.8717948718, 'hpa_coef2': -0.067, 'total_seen_30m': 44.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 6.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 118.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.92, 'avgdiff': 1, 'expectedWait': 7.4813659176, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 25.5916230366, 'pct_remaining5m': 0.0, 'sum': 2.0010153846, 'tx_atabove': 298.0, 'hashpower_accepting': 54.8717948718, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 6.1, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.9, 'avgdiff': 1, 'expectedWait': 7.3965626432, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 25.7068062827, 'pct_remaining5m': 0.0, 'sum': 2.0004153846, 'tx_atabove': 297.0, 'hashpower_accepting': 54.8717948718, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 6.2, 'pct_mined_5m': 100.0, 'total_seen_5m': 4.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.9, 'avgdiff': 1, 'expectedWait': 7.3921260367, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 25.8848167539, 'pct_remaining5m': 0.0, 'sum': 1.9986153846, 'tx_atabove': 294.0, 'hashpower_accepting': 54.8717948718, 'hpa_coef2': -0.067, 'total_seen_30m': 6.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 6.3, 'pct_mined_5m': 100.0, 'total_seen_5m': 5.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.89, 'avgdiff': 1, 'expectedWait': 7.3788321779, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 25.8952879581, 'pct_remaining5m': 0.0, 'sum': 1.9986153846, 'tx_atabove': 294.0, 'hashpower_accepting': 54.8717948718, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 6.4, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.89, 'avgdiff': 1, 'expectedWait': 7.3788321779, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 25.9685863874, 'pct_remaining5m': 0.0, 'sum': 1.9986153846, 'tx_atabove': 294.0, 'hashpower_accepting': 54.8717948718, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 6.5, 'pct_mined_5m': 100.0, 'total_seen_5m': 3.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.89, 'avgdiff': 1, 'expectedWait': 7.3788321779, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 2.0, 'hashpower_accepting2': 26.3769633508, 'pct_remaining5m': 0.0, 'sum': 1.9612307692, 'tx_atabove': 294.0, 'hashpower_accepting': 56.4102564103, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 6.6, 'pct_mined_5m': 96.0, 'total_seen_5m': 29.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.82, 'avgdiff': 1, 'expectedWait': 7.1080700777, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 26.7120418848, 'pct_remaining5m': 0.0, 'sum': 1.9421692308, 'tx_atabove': 283.0, 'hashpower_accepting': 56.9230769231, 'hpa_coef2': -0.067, 'total_seen_30m': 5.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 6.7, 'pct_mined_5m': 100.0, 'total_seen_5m': 4.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.79, 'avgdiff': 1, 'expectedWait': 6.9738624916, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 26.9109947644, 'pct_remaining5m': 0.0, 'sum': 1.9421692308, 'tx_atabove': 283.0, 'hashpower_accepting': 56.9230769231, 'hpa_coef2': -0.067, 'total_seen_30m': 9.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 6.8, 'pct_mined_5m': 100.0, 'total_seen_5m': 3.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.79, 'avgdiff': 1, 'expectedWait': 6.9738624916, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 27.109947644, 'pct_remaining5m': 0.0, 'sum': 1.9415692308, 'tx_atabove': 282.0, 'hashpower_accepting': 56.9230769231, 'hpa_coef2': -0.067, 'total_seen_30m': 5.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 6.9, 'pct_mined_5m': 100.0, 'total_seen_5m': 6.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.79, 'avgdiff': 1, 'expectedWait': 6.9696794292, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 3.0, 'hashpower_accepting2': 29.2356020942, 'pct_remaining5m': 0.0, 'sum': 1.8294153846, 'tx_atabove': 282.0, 'hashpower_accepting': 61.5384615385, 'hpa_coef2': -0.067, 'total_seen_30m': 60.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 7.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 50.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.6, 'avgdiff': 1, 'expectedWait': 6.2302432976, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 0.0, 'hashpower_accepting2': 29.780104712, 'pct_remaining5m': 0.0, 'sum': 1.8115538462, 'tx_atabove': 273.0, 'hashpower_accepting': 62.0512820513, 'hpa_coef2': -0.067, 'total_seen_30m': 6.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 7.1, 'pct_mined_5m': 100.0, 'total_seen_5m': 18.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.57, 'avgdiff': 1, 'expectedWait': 6.1199495079, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 2.0, 'hashpower_accepting2': 29.8848167539, 'pct_remaining5m': 0.0, 'sum': 1.8109538462, 'tx_atabove': 272.0, 'hashpower_accepting': 62.0512820513, 'hpa_coef2': -0.067, 'total_seen_30m': 4.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 7.2, 'pct_mined_5m': 100.0, 'total_seen_5m': 3.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.57, 'avgdiff': 1, 'expectedWait': 6.1162786396, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 29.9476439791, 'pct_remaining5m': 0.0, 'sum': 1.8103538462, 'tx_atabove': 271.0, 'hashpower_accepting': 62.0512820513, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 7.3, 'pct_mined_5m': 100.0, 'total_seen_5m': 3.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.57, 'avgdiff': 1, 'expectedWait': 6.1126099731, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 30.0209424084, 'pct_remaining5m': null, 'sum': 1.8085538462, 'tx_atabove': 268.0, 'hashpower_accepting': 62.0512820513, 'hpa_coef2': -0.067, 'total_seen_30m': 3.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 7.4, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.57, 'avgdiff': 1, 'expectedWait': 6.1016171717, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 30.1151832461, 'pct_remaining5m': 0.0, 'sum': 1.8085538462, 'tx_atabove': 268.0, 'hashpower_accepting': 62.0512820513, 'hpa_coef2': -0.067, 'total_seen_30m': 2.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 7.5, 'pct_mined_5m': 100.0, 'total_seen_5m': 2.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.57, 'avgdiff': 1, 'expectedWait': 6.1016171717, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 2.0, 'hashpower_accepting2': 30.2827225131, 'pct_remaining5m': 0.0, 'sum': 1.8085538462, 'tx_atabove': 268.0, 'hashpower_accepting': 62.0512820513, 'hpa_coef2': -0.067, 'total_seen_30m': 3.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 7.6, 'pct_mined_5m': 100.0, 'total_seen_5m': 3.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.57, 'avgdiff': 1, 'expectedWait': 6.1016171717, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 30.8586387435, 'pct_remaining5m': 0.0, 'sum': 1.7681692308, 'tx_atabove': 263.0, 'hashpower_accepting': 63.5897435897, 'hpa_coef2': -0.067, 'total_seen_30m': 12.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 7.7, 'pct_mined_5m': 100.0, 'total_seen_5m': 6.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.5, 'avgdiff': 1, 'expectedWait': 5.8601150164, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 30.9528795812, 'pct_remaining5m': 0.0, 'sum': 1.7681692308, 'tx_atabove': 263.0, 'hashpower_accepting': 63.5897435897, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 7.8, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.5, 'avgdiff': 1, 'expectedWait': 5.8601150164, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 2.0, 'hashpower_accepting2': 31.3089005236, 'pct_remaining5m': 0.0, 'sum': 1.7432461538, 'tx_atabove': 263.0, 'hashpower_accepting': 64.6153846154, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 7.9, 'pct_mined_5m': 100.0, 'total_seen_5m': 2.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.47, 'avgdiff': 1, 'expectedWait': 5.7158679264, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 2.0, 'hashpower_accepting2': 33.2670157068, 'pct_remaining5m': 0.0, 'sum': 1.6928, 'tx_atabove': 262.0, 'hashpower_accepting': 66.6666666667, 'hpa_coef2': -0.067, 'total_seen_30m': 65.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 8.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 38.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.39, 'avgdiff': 1, 'expectedWait': 5.4346765153, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 33.4869109948, 'pct_remaining5m': 0.0, 'sum': 1.6624769231, 'tx_atabove': 253.0, 'hashpower_accepting': 67.6923076923, 'hpa_coef2': -0.067, 'total_seen_30m': 5.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 8.1, 'pct_mined_5m': 100.0, 'total_seen_5m': 4.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.35, 'avgdiff': 1, 'expectedWait': 5.2723538995, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 34.2617801047, 'pct_remaining5m': null, 'sum': 1.6494153846, 'tx_atabove': 252.0, 'hashpower_accepting': 68.2051282051, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 8.2, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.34, 'avgdiff': 1, 'expectedWait': 5.2039366363, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 34.2827225131, 'pct_remaining5m': null, 'sum': 1.6494153846, 'tx_atabove': 252.0, 'hashpower_accepting': 68.2051282051, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 8.3, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.34, 'avgdiff': 1, 'expectedWait': 5.2039366363, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 35.2356020942, 'pct_remaining5m': 0.0, 'sum': 1.6244923077, 'tx_atabove': 252.0, 'hashpower_accepting': 69.2307692308, 'hpa_coef2': -0.067, 'total_seen_30m': 33.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 8.5, 'pct_mined_5m': 100.0, 'total_seen_5m': 3.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.3, 'avgdiff': 1, 'expectedWait': 5.0758414173, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 35.2984293194, 'pct_remaining5m': null, 'sum': 1.6244923077, 'tx_atabove': 252.0, 'hashpower_accepting': 69.2307692308, 'hpa_coef2': -0.067, 'total_seen_30m': 2.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 8.6, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.3, 'avgdiff': 1, 'expectedWait': 5.0758414173, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 35.3612565445, 'pct_remaining5m': null, 'sum': 1.6244923077, 'tx_atabove': 252.0, 'hashpower_accepting': 69.2307692308, 'hpa_coef2': -0.067, 'total_seen_30m': 2.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 8.8, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.3, 'avgdiff': 1, 'expectedWait': 5.0758414173, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 2.0, 'hashpower_accepting2': 37.6335078534, 'pct_remaining5m': 0.0, 'sum': 1.5372615385, 'tx_atabove': 252.0, 'hashpower_accepting': 72.8205128205, 'hpa_coef2': -0.067, 'total_seen_30m': 35.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 9.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 91.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.19, 'avgdiff': 1, 'expectedWait': 4.6518339443, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 0.0, 'hashpower_accepting2': 38.0209424084, 'pct_remaining5m': 0.0, 'sum': 1.5336615385, 'tx_atabove': 246.0, 'hashpower_accepting': 72.8205128205, 'hpa_coef2': -0.067, 'total_seen_30m': 14.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 9.1, 'pct_mined_5m': 100.0, 'total_seen_5m': 7.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.19, 'avgdiff': 1, 'expectedWait': 4.6351174498, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 38.0732984293, 'pct_remaining5m': 0.0, 'sum': 1.5206, 'tx_atabove': 245.0, 'hashpower_accepting': 73.3333333333, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 9.2, 'pct_mined_5m': 100.0, 'total_seen_5m': 2.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.17, 'avgdiff': 1, 'expectedWait': 4.5749693534, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 38.1151832461, 'pct_remaining5m': 0.0, 'sum': 1.5206, 'tx_atabove': 245.0, 'hashpower_accepting': 73.3333333333, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 9.3, 'pct_mined_5m': 100.0, 'total_seen_5m': 2.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.17, 'avgdiff': 1, 'expectedWait': 4.5749693534, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 38.1465968586, 'pct_remaining5m': null, 'sum': 1.5206, 'tx_atabove': 245.0, 'hashpower_accepting': 73.3333333333, 'hpa_coef2': -0.067, 'total_seen_30m': 2.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 9.4, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.17, 'avgdiff': 1, 'expectedWait': 4.5749693534, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 38.2722513089, 'pct_remaining5m': null, 'sum': 1.52, 'tx_atabove': 244.0, 'hashpower_accepting': 73.3333333333, 'hpa_coef2': -0.067, 'total_seen_30m': 3.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 9.5, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.17, 'avgdiff': 1, 'expectedWait': 4.5722251951, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 38.6701570681, 'pct_remaining5m': null, 'sum': 1.5194, 'tx_atabove': 243.0, 'hashpower_accepting': 73.3333333333, 'hpa_coef2': -0.067, 'total_seen_30m': 2.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 9.6, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.17, 'avgdiff': 1, 'expectedWait': 4.5694826829, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 38.6910994764, 'pct_remaining5m': 0.0, 'sum': 1.5188, 'tx_atabove': 242.0, 'hashpower_accepting': 73.3333333333, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 9.7, 'pct_mined_5m': 100.0, 'total_seen_5m': 2.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.17, 'avgdiff': 1, 'expectedWait': 4.5667418156, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 39.3403141361, 'pct_remaining5m': null, 'sum': 1.4979384615, 'tx_atabove': 228.0, 'hashpower_accepting': 73.8461538462, 'hpa_coef2': -0.067, 'total_seen_30m': 11.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 9.8, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.15, 'avgdiff': 1, 'expectedWait': 4.4724594129, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 39.7277486911, 'pct_remaining5m': 0.0, 'sum': 1.4979384615, 'tx_atabove': 228.0, 'hashpower_accepting': 73.8461538462, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 9.9, 'pct_mined_5m': 100.0, 'total_seen_5m': 3.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 1.15, 'avgdiff': 1, 'expectedWait': 4.4724594129, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 0.0, 'hashpower_accepting2': 44.2827225131, 'pct_remaining5m': 0.0, 'sum': 1.3472, 'tx_atabove': 226.0, 'hashpower_accepting': 80.0, 'hpa_coef2': -0.067, 'total_seen_30m': 126.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 10.0, 'pct_mined_5m': 98.0, 'total_seen_5m': 113.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.99, 'avgdiff': 1, 'expectedWait': 3.8466398462, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 44.4293193717, 'pct_remaining5m': 0.0, 'sum': 1.3448, 'tx_atabove': 222.0, 'hashpower_accepting': 80.0, 'hpa_coef2': -0.067, 'total_seen_30m': 3.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 10.1, 'pct_mined_5m': 100.0, 'total_seen_5m': 5.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.99, 'avgdiff': 1, 'expectedWait': 3.8374189801, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 44.4921465969, 'pct_remaining5m': 0.0, 'sum': 1.3448, 'tx_atabove': 222.0, 'hashpower_accepting': 80.0, 'hpa_coef2': -0.067, 'total_seen_30m': 2.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 10.2, 'pct_mined_5m': 100.0, 'total_seen_5m': 2.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.99, 'avgdiff': 1, 'expectedWait': 3.8374189801, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 44.502617801, 'pct_remaining5m': null, 'sum': 1.3448, 'tx_atabove': 222.0, 'hashpower_accepting': 80.0, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 10.3, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.99, 'avgdiff': 1, 'expectedWait': 3.8374189801, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 49.4240837696, 'pct_remaining5m': 0.0, 'sum': 1.2077230769, 'tx_atabove': 222.0, 'hashpower_accepting': 85.641025641, 'hpa_coef2': -0.067, 'total_seen_30m': 169.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 10.5, 'pct_mined_5m': 100.0, 'total_seen_5m': 95.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.86, 'avgdiff': 1, 'expectedWait': 3.3458577122, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 49.4659685864, 'pct_remaining5m': 0.0, 'sum': 1.2077230769, 'tx_atabove': 222.0, 'hashpower_accepting': 85.641025641, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 10.6, 'pct_mined_5m': 100.0, 'total_seen_5m': 2.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.86, 'avgdiff': 1, 'expectedWait': 3.3458577122, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 49.4869109948, 'pct_remaining5m': 0.0, 'sum': 1.2077230769, 'tx_atabove': 222.0, 'hashpower_accepting': 85.641025641, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 10.7, 'pct_mined_5m': 100.0, 'total_seen_5m': 2.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.86, 'avgdiff': 1, 'expectedWait': 3.3458577122, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 49.6858638743, 'pct_remaining5m': 0.0, 'sum': 1.2077230769, 'tx_atabove': 222.0, 'hashpower_accepting': 85.641025641, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 10.8, 'pct_mined_5m': 100.0, 'total_seen_5m': 10.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.86, 'avgdiff': 1, 'expectedWait': 3.3458577122, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 1.0, 'hashpower_accepting2': 50.0628272251, 'pct_remaining5m': 0.0, 'sum': 1.2071230769, 'tx_atabove': 221.0, 'hashpower_accepting': 85.641025641, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 10.9, 'pct_mined_5m': 100.0, 'total_seen_5m': 11.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.86, 'avgdiff': 1, 'expectedWait': 3.3438507997, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 56.1884816754, 'pct_remaining5m': 0.0, 'sum': 1.1358153846, 'tx_atabove': 206.0, 'hashpower_accepting': 88.2051282051, 'hpa_coef2': -0.067, 'total_seen_30m': 144.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 11.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 178.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.8, 'avgdiff': 1, 'expectedWait': 3.1137113805, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 56.7434554974, 'pct_remaining5m': 0.0, 'sum': 1.1280153846, 'tx_atabove': 193.0, 'hashpower_accepting': 88.2051282051, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 11.1, 'pct_mined_5m': 100.0, 'total_seen_5m': 9.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.79, 'avgdiff': 1, 'expectedWait': 3.089518905, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 56.7748691099, 'pct_remaining5m': null, 'sum': 1.1280153846, 'tx_atabove': 193.0, 'hashpower_accepting': 88.2051282051, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 11.2, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.79, 'avgdiff': 1, 'expectedWait': 3.089518905, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 57.109947644, 'pct_remaining5m': 0.0, 'sum': 1.1280153846, 'tx_atabove': 193.0, 'hashpower_accepting': 88.2051282051, 'hpa_coef2': -0.067, 'total_seen_30m': 14.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 11.5, 'pct_mined_5m': 100.0, 'total_seen_5m': 2.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.79, 'avgdiff': 1, 'expectedWait': 3.089518905, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 58.2931937173, 'pct_remaining5m': 0.0, 'sum': 1.1280153846, 'tx_atabove': 193.0, 'hashpower_accepting': 88.2051282051, 'hpa_coef2': -0.067, 'total_seen_30m': 10.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 11.6, 'pct_mined_5m': 100.0, 'total_seen_5m': 6.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.79, 'avgdiff': 1, 'expectedWait': 3.089518905, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 58.3141361257, 'pct_remaining5m': null, 'sum': 1.1280153846, 'tx_atabove': 193.0, 'hashpower_accepting': 88.2051282051, 'hpa_coef2': -0.067, 'total_seen_30m': 2.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 11.7, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.79, 'avgdiff': 1, 'expectedWait': 3.089518905, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 58.3769633508, 'pct_remaining5m': 0.0, 'sum': 1.1280153846, 'tx_atabove': 193.0, 'hashpower_accepting': 88.2051282051, 'hpa_coef2': -0.067, 'total_seen_30m': 3.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 11.8, 'pct_mined_5m': 100.0, 'total_seen_5m': 2.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.79, 'avgdiff': 1, 'expectedWait': 3.089518905, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 58.4293193717, 'pct_remaining5m': 0.0, 'sum': 1.1280153846, 'tx_atabove': 193.0, 'hashpower_accepting': 88.2051282051, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 11.9, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.79, 'avgdiff': 1, 'expectedWait': 3.089518905, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 60.7958115183, 'pct_remaining5m': 0.0, 'sum': 1.1030923077, 'tx_atabove': 193.0, 'hashpower_accepting': 89.2307692308, 'hpa_coef2': -0.067, 'total_seen_30m': 50.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 12.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 87.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.77, 'avgdiff': 1, 'expectedWait': 3.0134702079, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 61.1413612565, 'pct_remaining5m': 0.0, 'sum': 1.1018923077, 'tx_atabove': 191.0, 'hashpower_accepting': 89.2307692308, 'hpa_coef2': -0.067, 'total_seen_30m': 15.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 12.1, 'pct_mined_5m': 100.0, 'total_seen_5m': 8.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.77, 'avgdiff': 1, 'expectedWait': 3.0098562125, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 61.1727748691, 'pct_remaining5m': 0.0, 'sum': 1.1018923077, 'tx_atabove': 191.0, 'hashpower_accepting': 89.2307692308, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 12.2, 'pct_mined_5m': 100.0, 'total_seen_5m': 2.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.77, 'avgdiff': 1, 'expectedWait': 3.0098562125, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 61.1832460733, 'pct_remaining5m': 0.0, 'sum': 1.1018923077, 'tx_atabove': 191.0, 'hashpower_accepting': 89.2307692308, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 12.3, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.77, 'avgdiff': 1, 'expectedWait': 3.0098562125, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 61.1937172775, 'pct_remaining5m': 0.0, 'sum': 1.1018923077, 'tx_atabove': 191.0, 'hashpower_accepting': 89.2307692308, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 12.4, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.77, 'avgdiff': 1, 'expectedWait': 3.0098562125, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 62.1989528796, 'pct_remaining5m': 0.0, 'sum': 1.1018923077, 'tx_atabove': 191.0, 'hashpower_accepting': 89.2307692308, 'hpa_coef2': -0.067, 'total_seen_30m': 10.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 12.5, 'pct_mined_5m': 100.0, 'total_seen_5m': 6.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.77, 'avgdiff': 1, 'expectedWait': 3.0098562125, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 62.3246073298, 'pct_remaining5m': 0.0, 'sum': 1.1006923077, 'tx_atabove': 189.0, 'hashpower_accepting': 89.2307692308, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 12.6, 'pct_mined_5m': 100.0, 'total_seen_5m': 9.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.77, 'avgdiff': 1, 'expectedWait': 3.0062465513, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 62.3560209424, 'pct_remaining5m': 0.0, 'sum': 1.1000923077, 'tx_atabove': 188.0, 'hashpower_accepting': 89.2307692308, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 12.7, 'pct_mined_5m': 100.0, 'total_seen_5m': 2.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.77, 'avgdiff': 1, 'expectedWait': 3.0044433444, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 62.7434554974, 'pct_remaining5m': 0.0, 'sum': 1.1000923077, 'tx_atabove': 188.0, 'hashpower_accepting': 89.2307692308, 'hpa_coef2': -0.067, 'total_seen_30m': 11.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 12.8, 'pct_mined_5m': 100.0, 'total_seen_5m': 9.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.77, 'avgdiff': 1, 'expectedWait': 3.0044433444, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 62.7643979058, 'pct_remaining5m': 0.0, 'sum': 1.1000923077, 'tx_atabove': 188.0, 'hashpower_accepting': 89.2307692308, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 12.9, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.77, 'avgdiff': 1, 'expectedWait': 3.0044433444, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 65.5183246073, 'pct_remaining5m': 0.0, 'sum': 1.0988923077, 'tx_atabove': 186.0, 'hashpower_accepting': 89.2307692308, 'hpa_coef2': -0.067, 'total_seen_30m': 43.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 13.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 22.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.77, 'avgdiff': 1, 'expectedWait': 3.0008401747, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 65.612565445, 'pct_remaining5m': 0.0, 'sum': 1.0988923077, 'tx_atabove': 186.0, 'hashpower_accepting': 89.2307692308, 'hpa_coef2': -0.067, 'total_seen_30m': 2.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 13.1, 'pct_mined_5m': 100.0, 'total_seen_5m': 2.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.77, 'avgdiff': 1, 'expectedWait': 3.0008401747, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 65.7277486911, 'pct_remaining5m': 0.0, 'sum': 1.0982923077, 'tx_atabove': 185.0, 'hashpower_accepting': 89.2307692308, 'hpa_coef2': -0.067, 'total_seen_30m': 2.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 13.2, 'pct_mined_5m': 100.0, 'total_seen_5m': 3.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.77, 'avgdiff': 1, 'expectedWait': 2.9990402106, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 65.7382198953, 'pct_remaining5m': null, 'sum': 1.0982923077, 'tx_atabove': 185.0, 'hashpower_accepting': 89.2307692308, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 13.4, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.77, 'avgdiff': 1, 'expectedWait': 2.9990402106, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 67.1832460733, 'pct_remaining5m': 0.0, 'sum': 1.0982923077, 'tx_atabove': 185.0, 'hashpower_accepting': 89.2307692308, 'hpa_coef2': -0.067, 'total_seen_30m': 18.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 13.5, 'pct_mined_5m': 100.0, 'total_seen_5m': 11.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.77, 'avgdiff': 1, 'expectedWait': 2.9990402106, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 67.2041884817, 'pct_remaining5m': 0.0, 'sum': 1.0982923077, 'tx_atabove': 185.0, 'hashpower_accepting': 89.2307692308, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 13.6, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.77, 'avgdiff': 1, 'expectedWait': 2.9990402106, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 67.3717277487, 'pct_remaining5m': null, 'sum': 1.0982923077, 'tx_atabove': 185.0, 'hashpower_accepting': 89.2307692308, 'hpa_coef2': -0.067, 'total_seen_30m': 3.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 13.7, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.77, 'avgdiff': 1, 'expectedWait': 2.9990402106, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 67.3926701571, 'pct_remaining5m': 0.0, 'sum': 1.0982923077, 'tx_atabove': 185.0, 'hashpower_accepting': 89.2307692308, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 13.8, 'pct_mined_5m': 100.0, 'total_seen_5m': 2.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.77, 'avgdiff': 1, 'expectedWait': 2.9990402106, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 67.4136125654, 'pct_remaining5m': 0.0, 'sum': 1.0982923077, 'tx_atabove': 185.0, 'hashpower_accepting': 89.2307692308, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 13.9, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.77, 'avgdiff': 1, 'expectedWait': 2.9990402106, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 1.0, 'hashpower_accepting2': 69.8219895288, 'pct_remaining5m': 0.0, 'sum': 1.0727692308, 'tx_atabove': 184.0, 'hashpower_accepting': 90.2564102564, 'hpa_coef2': -0.067, 'total_seen_30m': 25.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 14.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 59.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.75, 'avgdiff': 1, 'expectedWait': 2.9234640474, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 69.8743455497, 'pct_remaining5m': 0.0, 'sum': 1.0691692308, 'tx_atabove': 178.0, 'hashpower_accepting': 90.2564102564, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 14.1, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.75, 'avgdiff': 1, 'expectedWait': 2.9129584982, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 69.9057591623, 'pct_remaining5m': 0.0, 'sum': 1.0691692308, 'tx_atabove': 178.0, 'hashpower_accepting': 90.2564102564, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 14.2, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.75, 'avgdiff': 1, 'expectedWait': 2.9129584982, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 69.9581151832, 'pct_remaining5m': 0.0, 'sum': 1.0691692308, 'tx_atabove': 178.0, 'hashpower_accepting': 90.2564102564, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 14.5, 'pct_mined_5m': 100.0, 'total_seen_5m': 2.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.75, 'avgdiff': 1, 'expectedWait': 2.9129584982, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 70.0104712042, 'pct_remaining5m': null, 'sum': 1.0691692308, 'tx_atabove': 178.0, 'hashpower_accepting': 90.2564102564, 'hpa_coef2': -0.067, 'total_seen_30m': 2.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 14.6, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.75, 'avgdiff': 1, 'expectedWait': 2.9129584982, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 70.1047120419, 'pct_remaining5m': 0.0, 'sum': 1.0691692308, 'tx_atabove': 178.0, 'hashpower_accepting': 90.2564102564, 'hpa_coef2': -0.067, 'total_seen_30m': 7.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 14.7, 'pct_mined_5m': 0.0, 'total_seen_5m': 1.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.75, 'avgdiff': 1, 'expectedWait': 2.9129584982, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 2.0, 'hashpower_accepting2': 72.7434554974, 'pct_remaining5m': 0.0, 'sum': 1.0442461538, 'tx_atabove': 178.0, 'hashpower_accepting': 91.2820512821, 'hpa_coef2': -0.067, 'total_seen_30m': 83.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 15.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 59.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.73, 'avgdiff': 1, 'expectedWait': 2.8412558463, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 72.7853403141, 'pct_remaining5m': 0.0, 'sum': 1.0400461538, 'tx_atabove': 171.0, 'hashpower_accepting': 91.2820512821, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 15.1, 'pct_mined_5m': 100.0, 'total_seen_5m': 2.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.73, 'avgdiff': 1, 'expectedWait': 2.8293475966, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 72.8062827225, 'pct_remaining5m': null, 'sum': 1.0400461538, 'tx_atabove': 171.0, 'hashpower_accepting': 91.2820512821, 'hpa_coef2': -0.067, 'total_seen_30m': 2.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 15.4, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.73, 'avgdiff': 1, 'expectedWait': 2.8293475966, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 72.8586387435, 'pct_remaining5m': 0.0, 'sum': 1.0400461538, 'tx_atabove': 171.0, 'hashpower_accepting': 91.2820512821, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 15.5, 'pct_mined_5m': 100.0, 'total_seen_5m': 4.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.73, 'avgdiff': 1, 'expectedWait': 2.8293475966, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 73.3298429319, 'pct_remaining5m': 0.0, 'sum': 1.0400461538, 'tx_atabove': 171.0, 'hashpower_accepting': 91.2820512821, 'hpa_coef2': -0.067, 'total_seen_30m': 16.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 15.8, 'pct_mined_5m': 100.0, 'total_seen_5m': 10.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.73, 'avgdiff': 1, 'expectedWait': 2.8293475966, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 73.3403141361, 'pct_remaining5m': 0.0, 'sum': 1.0400461538, 'tx_atabove': 171.0, 'hashpower_accepting': 91.2820512821, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 15.9, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.73, 'avgdiff': 1, 'expectedWait': 2.8293475966, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 74.4397905759, 'pct_remaining5m': 0.0, 'sum': 1.0400461538, 'tx_atabove': 171.0, 'hashpower_accepting': 91.2820512821, 'hpa_coef2': -0.067, 'total_seen_30m': 36.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 16.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 28.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.73, 'avgdiff': 1, 'expectedWait': 2.8293475966, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 74.4502617801, 'pct_remaining5m': 0.0, 'sum': 1.0340461538, 'tx_atabove': 161.0, 'hashpower_accepting': 91.2820512821, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 16.1, 'pct_mined_5m': 0.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.72, 'avgdiff': 1, 'expectedWait': 2.8124223376, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 74.4607329843, 'pct_remaining5m': 0.0, 'sum': 1.0340461538, 'tx_atabove': 161.0, 'hashpower_accepting': 91.2820512821, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 16.2, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.72, 'avgdiff': 1, 'expectedWait': 2.8124223376, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 74.502617801, 'pct_remaining5m': 0.0, 'sum': 1.0340461538, 'tx_atabove': 161.0, 'hashpower_accepting': 91.2820512821, 'hpa_coef2': -0.067, 'total_seen_30m': 2.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 16.3, 'pct_mined_5m': 50.0, 'total_seen_5m': 2.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.72, 'avgdiff': 1, 'expectedWait': 2.8124223376, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 74.6806282723, 'pct_remaining5m': 0.0, 'sum': 1.0334461538, 'tx_atabove': 160.0, 'hashpower_accepting': 91.2820512821, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 16.5, 'pct_mined_5m': 100.0, 'total_seen_5m': 9.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.72, 'avgdiff': 1, 'expectedWait': 2.8107353903, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 74.7120418848, 'pct_remaining5m': 0.0, 'sum': 1.0334461538, 'tx_atabove': 160.0, 'hashpower_accepting': 91.2820512821, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 16.7, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.72, 'avgdiff': 1, 'expectedWait': 2.8107353903, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 74.7434554974, 'pct_remaining5m': null, 'sum': 1.0334461538, 'tx_atabove': 160.0, 'hashpower_accepting': 91.2820512821, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 16.8, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.72, 'avgdiff': 1, 'expectedWait': 2.8107353903, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 75.0785340314, 'pct_remaining5m': 0.0, 'sum': 1.0334461538, 'tx_atabove': 160.0, 'hashpower_accepting': 91.2820512821, 'hpa_coef2': -0.067, 'total_seen_30m': 17.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 17.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 5.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.72, 'avgdiff': 1, 'expectedWait': 2.8107353903, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 75.1204188482, 'pct_remaining5m': 0.0, 'sum': 1.0334461538, 'tx_atabove': 160.0, 'hashpower_accepting': 91.2820512821, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 17.5, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.72, 'avgdiff': 1, 'expectedWait': 2.8107353903, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 75.1413612565, 'pct_remaining5m': 0.0, 'sum': 1.0334461538, 'tx_atabove': 160.0, 'hashpower_accepting': 91.2820512821, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 17.7, 'pct_mined_5m': 0.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.72, 'avgdiff': 1, 'expectedWait': 2.8107353903, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 75.1518324607, 'pct_remaining5m': null, 'sum': 1.0334461538, 'tx_atabove': 160.0, 'hashpower_accepting': 91.2820512821, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 17.8, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.72, 'avgdiff': 1, 'expectedWait': 2.8107353903, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 75.4764397906, 'pct_remaining5m': 0.0, 'sum': 1.0209846154, 'tx_atabove': 160.0, 'hashpower_accepting': 91.7948717949, 'hpa_coef2': -0.067, 'total_seen_30m': 14.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 18.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 4.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.71, 'avgdiff': 1, 'expectedWait': 2.7759266389, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 75.5183246073, 'pct_remaining5m': 0.0, 'sum': 1.0209846154, 'tx_atabove': 160.0, 'hashpower_accepting': 91.7948717949, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 18.1, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.71, 'avgdiff': 1, 'expectedWait': 2.7759266389, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 75.5287958115, 'pct_remaining5m': null, 'sum': 1.0209846154, 'tx_atabove': 160.0, 'hashpower_accepting': 91.7948717949, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 18.3, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.71, 'avgdiff': 1, 'expectedWait': 2.7759266389, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 75.5497382199, 'pct_remaining5m': 0.0, 'sum': 1.0209846154, 'tx_atabove': 160.0, 'hashpower_accepting': 91.7948717949, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 18.4, 'pct_mined_5m': 0.0, 'total_seen_5m': 1.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.71, 'avgdiff': 1, 'expectedWait': 2.7759266389, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 75.5811518325, 'pct_remaining5m': null, 'sum': 1.0209846154, 'tx_atabove': 160.0, 'hashpower_accepting': 91.7948717949, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 18.9, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.71, 'avgdiff': 1, 'expectedWait': 2.7759266389, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 75.6230366492, 'pct_remaining5m': 0.0, 'sum': 1.0209846154, 'tx_atabove': 160.0, 'hashpower_accepting': 91.7948717949, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 19.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 2.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.71, 'avgdiff': 1, 'expectedWait': 2.7759266389, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 75.6753926702, 'pct_remaining5m': 0.0, 'sum': 1.0203846154, 'tx_atabove': 159.0, 'hashpower_accepting': 91.7948717949, 'hpa_coef2': -0.067, 'total_seen_30m': 3.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 19.5, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.71, 'avgdiff': 1, 'expectedWait': 2.7742615825, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 75.7068062827, 'pct_remaining5m': 0.0, 'sum': 1.0197846154, 'tx_atabove': 158.0, 'hashpower_accepting': 91.7948717949, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 19.7, 'pct_mined_5m': 100.0, 'total_seen_5m': 2.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.71, 'avgdiff': 1, 'expectedWait': 2.7725975248, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 75.7172774869, 'pct_remaining5m': 0.0, 'sum': 1.0197846154, 'tx_atabove': 158.0, 'hashpower_accepting': 91.7948717949, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 19.8, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.71, 'avgdiff': 1, 'expectedWait': 2.7725975248, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 76.1570680628, 'pct_remaining5m': 0.0, 'sum': 1.0197846154, 'tx_atabove': 158.0, 'hashpower_accepting': 91.7948717949, 'hpa_coef2': -0.067, 'total_seen_30m': 16.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 19.9, 'pct_mined_5m': 100.0, 'total_seen_5m': 12.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.71, 'avgdiff': 1, 'expectedWait': 2.7725975248, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 0.0, 'hashpower_accepting2': 80.335078534, 'pct_remaining5m': 0.0, 'sum': 0.9076307692, 'tx_atabove': 158.0, 'hashpower_accepting': 96.4102564103, 'hpa_coef2': -0.067, 'total_seen_30m': 109.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 20.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 132.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.64, 'avgdiff': 1, 'expectedWait': 2.4784435671, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 80.3455497382, 'pct_remaining5m': 0.0, 'sum': 0.8446307692, 'tx_atabove': 53.0, 'hashpower_accepting': 96.4102564103, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 20.2, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.6, 'avgdiff': 1, 'expectedWait': 2.3271184122, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 80.3769633508, 'pct_remaining5m': 0.0, 'sum': 0.8446307692, 'tx_atabove': 53.0, 'hashpower_accepting': 96.4102564103, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 20.5, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.6, 'avgdiff': 1, 'expectedWait': 2.3271184122, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 80.3979057592, 'pct_remaining5m': 0.0, 'sum': 0.8446307692, 'tx_atabove': 53.0, 'hashpower_accepting': 96.4102564103, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 20.9, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.6, 'avgdiff': 1, 'expectedWait': 2.3271184122, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 82.6596858639, 'pct_remaining5m': 0.0, 'sum': 0.8321692308, 'tx_atabove': 53.0, 'hashpower_accepting': 96.9230769231, 'hpa_coef2': -0.067, 'total_seen_30m': 37.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 21.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 30.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.59, 'avgdiff': 1, 'expectedWait': 2.2982988774, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 2.0, 'hashpower_accepting2': 82.8586387435, 'pct_remaining5m': null, 'sum': 0.8303692308, 'tx_atabove': 50.0, 'hashpower_accepting': 96.9230769231, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 21.1, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.59, 'avgdiff': 1, 'expectedWait': 2.2941656605, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 82.9005235602, 'pct_remaining5m': 0.0, 'sum': 0.8297692308, 'tx_atabove': 49.0, 'hashpower_accepting': 96.9230769231, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 21.3, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.59, 'avgdiff': 1, 'expectedWait': 2.2927895739, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 82.9633507853, 'pct_remaining5m': 0.0, 'sum': 0.8297692308, 'tx_atabove': 49.0, 'hashpower_accepting': 96.9230769231, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 21.6, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.59, 'avgdiff': 1, 'expectedWait': 2.2927895739, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 82.9738219895, 'pct_remaining5m': null, 'sum': 0.8297692308, 'tx_atabove': 49.0, 'hashpower_accepting': 96.9230769231, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 21.7, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.59, 'avgdiff': 1, 'expectedWait': 2.2927895739, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 82.9947643979, 'pct_remaining5m': null, 'sum': 0.8297692308, 'tx_atabove': 49.0, 'hashpower_accepting': 96.9230769231, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 21.9, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.59, 'avgdiff': 1, 'expectedWait': 2.2927895739, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 1.0, 'hashpower_accepting2': 83.2041884817, 'pct_remaining5m': 0.0, 'sum': 0.8297692308, 'tx_atabove': 49.0, 'hashpower_accepting': 96.9230769231, 'hpa_coef2': -0.067, 'total_seen_30m': 4.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 22.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 7.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.59, 'avgdiff': 1, 'expectedWait': 2.2927895739, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 83.2565445026, 'pct_remaining5m': null, 'sum': 0.8291692308, 'tx_atabove': 48.0, 'hashpower_accepting': 96.9230769231, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 22.6, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.59, 'avgdiff': 1, 'expectedWait': 2.2914143128, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 83.2670157068, 'pct_remaining5m': null, 'sum': 0.8291692308, 'tx_atabove': 48.0, 'hashpower_accepting': 96.9230769231, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 22.8, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.59, 'avgdiff': 1, 'expectedWait': 2.2914143128, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 83.9895287958, 'pct_remaining5m': 0.0, 'sum': 0.8291692308, 'tx_atabove': 48.0, 'hashpower_accepting': 96.9230769231, 'hpa_coef2': -0.067, 'total_seen_30m': 28.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 23.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 15.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.59, 'avgdiff': 1, 'expectedWait': 2.2914143128, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 84.0523560209, 'pct_remaining5m': null, 'sum': 0.8285692308, 'tx_atabove': 47.0, 'hashpower_accepting': 96.9230769231, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 23.1, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.59, 'avgdiff': 1, 'expectedWait': 2.2900398766, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 84.0628272251, 'pct_remaining5m': 0.0, 'sum': 0.8285692308, 'tx_atabove': 47.0, 'hashpower_accepting': 96.9230769231, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 23.4, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.59, 'avgdiff': 1, 'expectedWait': 2.2900398766, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 84.0837696335, 'pct_remaining5m': null, 'sum': 0.8285692308, 'tx_atabove': 47.0, 'hashpower_accepting': 96.9230769231, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 23.5, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.59, 'avgdiff': 1, 'expectedWait': 2.2900398766, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 84.1570680628, 'pct_remaining5m': 0.0, 'sum': 0.8285692308, 'tx_atabove': 47.0, 'hashpower_accepting': 96.9230769231, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 24.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 6.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.59, 'avgdiff': 1, 'expectedWait': 2.2900398766, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 84.167539267, 'pct_remaining5m': null, 'sum': 0.8285692308, 'tx_atabove': 47.0, 'hashpower_accepting': 96.9230769231, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 24.2, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.59, 'avgdiff': 1, 'expectedWait': 2.2900398766, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 84.1780104712, 'pct_remaining5m': null, 'sum': 0.8285692308, 'tx_atabove': 47.0, 'hashpower_accepting': 96.9230769231, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 24.3, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.59, 'avgdiff': 1, 'expectedWait': 2.2900398766, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 84.1884816754, 'pct_remaining5m': 0.0, 'sum': 0.8285692308, 'tx_atabove': 47.0, 'hashpower_accepting': 96.9230769231, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 24.5, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.59, 'avgdiff': 1, 'expectedWait': 2.2900398766, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 84.3664921466, 'pct_remaining5m': 0.0, 'sum': 0.8285692308, 'tx_atabove': 47.0, 'hashpower_accepting': 96.9230769231, 'hpa_coef2': -0.067, 'total_seen_30m': 5.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 25.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 6.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.59, 'avgdiff': 1, 'expectedWait': 2.2900398766, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 84.502617801, 'pct_remaining5m': 0.0, 'sum': 0.8285692308, 'tx_atabove': 47.0, 'hashpower_accepting': 96.9230769231, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 26.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 4.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.59, 'avgdiff': 1, 'expectedWait': 2.2900398766, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 84.5340314136, 'pct_remaining5m': null, 'sum': 0.8285692308, 'tx_atabove': 47.0, 'hashpower_accepting': 96.9230769231, 'hpa_coef2': -0.067, 'total_seen_30m': 2.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 27.0, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.59, 'avgdiff': 1, 'expectedWait': 2.2900398766, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 84.7120418848, 'pct_remaining5m': 0.0, 'sum': 0.8279692308, 'tx_atabove': 46.0, 'hashpower_accepting': 96.9230769231, 'hpa_coef2': -0.067, 'total_seen_30m': 3.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 28.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 4.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.59, 'avgdiff': 1, 'expectedWait': 2.2886662648, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 84.9633507853, 'pct_remaining5m': 0.0, 'sum': 0.8155076923, 'tx_atabove': 46.0, 'hashpower_accepting': 97.4358974359, 'hpa_coef2': -0.067, 'total_seen_30m': 6.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 29.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 9.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.58, 'avgdiff': 1, 'expectedWait': 2.2603229297, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 85.664921466, 'pct_remaining5m': 0.0, 'sum': 0.8143076923, 'tx_atabove': 44.0, 'hashpower_accepting': 97.4358974359, 'hpa_coef2': -0.067, 'total_seen_30m': 17.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 30.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 26.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.58, 'avgdiff': 1, 'expectedWait': 2.2576121689, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 85.7696335079, 'pct_remaining5m': 0.0, 'sum': 0.8143076923, 'tx_atabove': 44.0, 'hashpower_accepting': 97.4358974359, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 31.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 6.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.58, 'avgdiff': 1, 'expectedWait': 2.2576121689, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 86.0628272251, 'pct_remaining5m': 0.0, 'sum': 0.7893846154, 'tx_atabove': 44.0, 'hashpower_accepting': 98.4615384615, 'hpa_coef2': -0.067, 'total_seen_30m': 14.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 32.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 2.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.57, 'avgdiff': 1, 'expectedWait': 2.2020409071, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 86.2617801047, 'pct_remaining5m': 0.0, 'sum': 0.7887846154, 'tx_atabove': 43.0, 'hashpower_accepting': 98.4615384615, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 33.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 4.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.56, 'avgdiff': 1, 'expectedWait': 2.2007200789, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 86.3560209424, 'pct_remaining5m': 0.0, 'sum': 0.7887846154, 'tx_atabove': 43.0, 'hashpower_accepting': 98.4615384615, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 34.0, 'pct_mined_5m': 50.0, 'total_seen_5m': 2.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.56, 'avgdiff': 1, 'expectedWait': 2.2007200789, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 86.5235602094, 'pct_remaining5m': 0.0, 'sum': 0.7887846154, 'tx_atabove': 43.0, 'hashpower_accepting': 98.4615384615, 'hpa_coef2': -0.067, 'total_seen_30m': 7.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 35.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 2.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.56, 'avgdiff': 1, 'expectedWait': 2.2007200789, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 86.5654450262, 'pct_remaining5m': 0.0, 'sum': 0.7881846154, 'tx_atabove': 42.0, 'hashpower_accepting': 98.4615384615, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 36.0, 'pct_mined_5m': 0.0, 'total_seen_5m': 1.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.56, 'avgdiff': 1, 'expectedWait': 2.1994000429, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 86.5863874346, 'pct_remaining5m': null, 'sum': 0.7881846154, 'tx_atabove': 42.0, 'hashpower_accepting': 98.4615384615, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 37.0, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.56, 'avgdiff': 1, 'expectedWait': 2.1994000429, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 86.6178010471, 'pct_remaining5m': 0.0, 'sum': 0.7881846154, 'tx_atabove': 42.0, 'hashpower_accepting': 98.4615384615, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 38.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 2.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.56, 'avgdiff': 1, 'expectedWait': 2.1994000429, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 86.6701570681, 'pct_remaining5m': null, 'sum': 0.7881846154, 'tx_atabove': 42.0, 'hashpower_accepting': 98.4615384615, 'hpa_coef2': -0.067, 'total_seen_30m': 3.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 39.0, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.56, 'avgdiff': 1, 'expectedWait': 2.1994000429, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 87.3612565445, 'pct_remaining5m': 0.0, 'sum': 0.7757230769, 'tx_atabove': 42.0, 'hashpower_accepting': 98.9743589744, 'hpa_coef2': -0.067, 'total_seen_30m': 13.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 40.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 19.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.56, 'avgdiff': 1, 'expectedWait': 2.1721621998, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 89.8115183246, 'pct_remaining5m': 0.0, 'sum': 0.7751230769, 'tx_atabove': 41.0, 'hashpower_accepting': 98.9743589744, 'hpa_coef2': -0.067, 'total_seen_30m': 65.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 41.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 84.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.56, 'avgdiff': 1, 'expectedWait': 2.1708592934, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 90.3141361257, 'pct_remaining5m': 0.0, 'sum': 0.7709230769, 'tx_atabove': 34.0, 'hashpower_accepting': 98.9743589744, 'hpa_coef2': -0.067, 'total_seen_30m': 13.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 42.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 16.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.55, 'avgdiff': 1, 'expectedWait': 2.1617608046, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 90.3455497382, 'pct_remaining5m': 0.0, 'sum': 0.7697230769, 'tx_atabove': 32.0, 'hashpower_accepting': 98.9743589744, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 43.0, 'pct_mined_5m': 0.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.55, 'avgdiff': 1, 'expectedWait': 2.1591682475, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 90.3769633508, 'pct_remaining5m': 0.0, 'sum': 0.7697230769, 'tx_atabove': 32.0, 'hashpower_accepting': 98.9743589744, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 44.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 2.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.55, 'avgdiff': 1, 'expectedWait': 2.1591682475, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 92.0314136126, 'pct_remaining5m': 0.0, 'sum': 0.7697230769, 'tx_atabove': 32.0, 'hashpower_accepting': 98.9743589744, 'hpa_coef2': -0.067, 'total_seen_30m': 19.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 45.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 28.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.55, 'avgdiff': 1, 'expectedWait': 2.1591682475, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 92.0628272251, 'pct_remaining5m': 0.0, 'sum': 0.7691230769, 'tx_atabove': 31.0, 'hashpower_accepting': 98.9743589744, 'hpa_coef2': -0.067, 'total_seen_30m': 2.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 46.0, 'pct_mined_5m': 0.0, 'total_seen_5m': 1.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.55, 'avgdiff': 1, 'expectedWait': 2.1578731351, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 92.1047120419, 'pct_remaining5m': 0.0, 'sum': 0.7691230769, 'tx_atabove': 31.0, 'hashpower_accepting': 98.9743589744, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 47.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.55, 'avgdiff': 1, 'expectedWait': 2.1578731351, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 92.1570680628, 'pct_remaining5m': 0.0, 'sum': 0.7685230769, 'tx_atabove': 30.0, 'hashpower_accepting': 98.9743589744, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 48.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 2.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.55, 'avgdiff': 1, 'expectedWait': 2.1565787996, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 92.1884816754, 'pct_remaining5m': 0.0, 'sum': 0.7685230769, 'tx_atabove': 30.0, 'hashpower_accepting': 98.9743589744, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 49.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 2.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.55, 'avgdiff': 1, 'expectedWait': 2.1565787996, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': 0.0, 'hashpower_accepting2': 95.5287958115, 'pct_remaining5m': 0.0, 'sum': 0.7436, 'tx_atabove': 30.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': 87.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 50.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 54.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.54, 'avgdiff': 1, 'expectedWait': 2.1034944803, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 95.7172774869, 'pct_remaining5m': 0.0, 'sum': 0.734, 'tx_atabove': 14.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': 2.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 51.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 9.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0833975529, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 95.9057591623, 'pct_remaining5m': 0.0, 'sum': 0.734, 'tx_atabove': 14.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': 3.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 52.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 5.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0833975529, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 95.9371727749, 'pct_remaining5m': 0.0, 'sum': 0.7316, 'tx_atabove': 10.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 54.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0784033942, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 95.9895287958, 'pct_remaining5m': null, 'sum': 0.7316, 'tx_atabove': 10.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': 2.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 55.0, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0784033942, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 96.0418848168, 'pct_remaining5m': 0.0, 'sum': 0.7316, 'tx_atabove': 10.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 57.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0784033942, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 96.0523560209, 'pct_remaining5m': null, 'sum': 0.7316, 'tx_atabove': 10.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 58.0, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0784033942, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 96.0628272251, 'pct_remaining5m': 0.0, 'sum': 0.7316, 'tx_atabove': 10.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 59.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0784033942, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 96.4083769634, 'pct_remaining5m': 0.0, 'sum': 0.7316, 'tx_atabove': 10.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': 5.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 60.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 13.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0784033942, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 97.445026178, 'pct_remaining5m': 0.0, 'sum': 0.7298, 'tx_atabove': 7.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': 21.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 61.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 14.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0746656331, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 98.1570680628, 'pct_remaining5m': 0.0, 'sum': 0.7292, 'tx_atabove': 6.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': 12.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 63.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 15.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.073421207, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 98.3979057592, 'pct_remaining5m': 0.0, 'sum': 0.7286, 'tx_atabove': 5.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': 7.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 64.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 6.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0721775275, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 98.4293193717, 'pct_remaining5m': 0.0, 'sum': 0.7286, 'tx_atabove': 5.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 65.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0721775275, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 98.6492146597, 'pct_remaining5m': 0.0, 'sum': 0.7286, 'tx_atabove': 5.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': 6.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 66.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 2.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0721775275, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 98.6701570681, 'pct_remaining5m': 0.0, 'sum': 0.7286, 'tx_atabove': 5.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 67.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0721775275, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 98.6806282723, 'pct_remaining5m': null, 'sum': 0.728, 'tx_atabove': 4.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 68.0, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0709345939, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 98.7120418848, 'pct_remaining5m': 0.0, 'sum': 0.728, 'tx_atabove': 4.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 70.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0709345939, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 98.7958115183, 'pct_remaining5m': 0.0, 'sum': 0.728, 'tx_atabove': 4.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': 2.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 71.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0709345939, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 98.8376963351, 'pct_remaining5m': 0.0, 'sum': 0.728, 'tx_atabove': 4.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 77.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0709345939, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 99.0261780105, 'pct_remaining5m': 0.0, 'sum': 0.728, 'tx_atabove': 4.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': 5.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 80.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 9.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0709345939, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 99.0471204188, 'pct_remaining5m': null, 'sum': 0.728, 'tx_atabove': 4.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': 2.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 81.0, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0709345939, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 99.057591623, 'pct_remaining5m': 0.0, 'sum': 0.728, 'tx_atabove': 4.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 85.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0709345939, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 99.0680628272, 'pct_remaining5m': null, 'sum': 0.728, 'tx_atabove': 4.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 86.0, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0709345939, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 99.1937172775, 'pct_remaining5m': 0.0, 'sum': 0.728, 'tx_atabove': 4.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': 3.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 88.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 6.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0709345939, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 99.3717277487, 'pct_remaining5m': 0.0, 'sum': 0.7268, 'tx_atabove': 2.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': 3.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 90.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 3.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0684509628, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 99.4031413613, 'pct_remaining5m': null, 'sum': 0.7268, 'tx_atabove': 2.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 91.0, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0684509628, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 99.4136125654, 'pct_remaining5m': null, 'sum': 0.7268, 'tx_atabove': 2.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 94.0, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0684509628, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 99.4240837696, 'pct_remaining5m': null, 'sum': 0.7268, 'tx_atabove': 2.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 98.0, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0684509628, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 99.5287958115, 'pct_remaining5m': 0.0, 'sum': 0.7268, 'tx_atabove': 2.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': 3.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 99.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 2.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0684509628, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 99.780104712, 'pct_remaining5m': 0.0, 'sum': 0.7268, 'tx_atabove': 2.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': 6.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 100.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 6.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0684509628, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 99.7905759162, 'pct_remaining5m': 0.0, 'sum': 0.7262, 'tx_atabove': 1.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 101.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0672102645, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 99.8848167539, 'pct_remaining5m': 0.0, 'sum': 0.7262, 'tx_atabove': 1.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': 1.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 102.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0672102645, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 99.8952879581, 'pct_remaining5m': 0.0, 'sum': 0.7262, 'tx_atabove': 1.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 120.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0672102645, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 99.9371727749, 'pct_remaining5m': 0.0, 'sum': 0.7262, 'tx_atabove': 1.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 122.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 2.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0672102645, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 99.9790575916, 'pct_remaining5m': null, 'sum': 0.7256, 'tx_atabove': 0.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': 2.0, 'int2': 6.9238, 'pct_remaining30m': 0.0, 'gasprice': 134.0, 'pct_mined_5m': null, 'total_seen_5m': null, 'pct_mined_30m': 100.0, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0659703104, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}, {'intercept': 4.8015, 'age': null, 'hashpower_accepting2': 100.0, 'pct_remaining5m': 0.0, 'sum': 0.7256, 'tx_atabove': 0.0, 'hashpower_accepting': 100.0, 'hpa_coef2': -0.067, 'total_seen_30m': null, 'int2': 6.9238, 'pct_remaining30m': null, 'gasprice': 180.0, 'pct_mined_5m': 100.0, 'total_seen_5m': 1.0, 'pct_mined_30m': null, 'tx_atabove_coef': 0.0006, 'average': 500, 'safelow': 500, 'nomine': 330, 'expectedTime': 0.53, 'avgdiff': 1, 'expectedWait': 2.0659703104, 'avgdiff_coef': -1.6459, 'hpa_coef': -0.0243}], -} diff --git a/ui/app/ducks/tests/send-duck.test.js b/ui/app/ducks/send/send-duck.test.js similarity index 99% rename from ui/app/ducks/tests/send-duck.test.js rename to ui/app/ducks/send/send-duck.test.js index 43f51c631..92c8dffd8 100644 --- a/ui/app/ducks/tests/send-duck.test.js +++ b/ui/app/ducks/send/send-duck.test.js @@ -7,7 +7,7 @@ import SendReducer, { showGasButtonGroup, hideGasButtonGroup, updateSendWarnings, -} from '../send.duck.js' +} from './send.duck.js' describe('Send Duck', () => { const mockState = { diff --git a/ui/app/ducks/send.duck.js b/ui/app/ducks/send/send.duck.js similarity index 100% rename from ui/app/ducks/send.duck.js rename to ui/app/ducks/send/send.duck.js diff --git a/ui/app/constants/common.js b/ui/app/helpers/constants/common.js similarity index 100% rename from ui/app/constants/common.js rename to ui/app/helpers/constants/common.js diff --git a/ui/app/constants/error-keys.js b/ui/app/helpers/constants/error-keys.js similarity index 100% rename from ui/app/constants/error-keys.js rename to ui/app/helpers/constants/error-keys.js diff --git a/ui/app/infura-conversion.json b/ui/app/helpers/constants/infura-conversion.json similarity index 100% rename from ui/app/infura-conversion.json rename to ui/app/helpers/constants/infura-conversion.json diff --git a/ui/app/routes.js b/ui/app/helpers/constants/routes.js similarity index 100% rename from ui/app/routes.js rename to ui/app/helpers/constants/routes.js diff --git a/ui/app/constants/transactions.js b/ui/app/helpers/constants/transactions.js similarity index 100% rename from ui/app/constants/transactions.js rename to ui/app/helpers/constants/transactions.js diff --git a/ui/app/higher-order-components/authenticated/authenticated.component.js b/ui/app/helpers/higher-order-components/authenticated/authenticated.component.js similarity index 88% rename from ui/app/higher-order-components/authenticated/authenticated.component.js rename to ui/app/helpers/higher-order-components/authenticated/authenticated.component.js index 7b64d4895..c195d0e21 100644 --- a/ui/app/higher-order-components/authenticated/authenticated.component.js +++ b/ui/app/helpers/higher-order-components/authenticated/authenticated.component.js @@ -1,7 +1,7 @@ import React from 'react' import PropTypes from 'prop-types' import { Redirect, Route } from 'react-router-dom' -import { UNLOCK_ROUTE, INITIALIZE_ROUTE } from '../../routes' +import { UNLOCK_ROUTE, INITIALIZE_ROUTE } from '../../constants/routes' export default function Authenticated (props) { const { isUnlocked, completedOnboarding } = props diff --git a/ui/app/higher-order-components/authenticated/authenticated.container.js b/ui/app/helpers/higher-order-components/authenticated/authenticated.container.js similarity index 100% rename from ui/app/higher-order-components/authenticated/authenticated.container.js rename to ui/app/helpers/higher-order-components/authenticated/authenticated.container.js diff --git a/ui/app/higher-order-components/authenticated/index.js b/ui/app/helpers/higher-order-components/authenticated/index.js similarity index 100% rename from ui/app/higher-order-components/authenticated/index.js rename to ui/app/helpers/higher-order-components/authenticated/index.js diff --git a/ui/app/i18n-provider.js b/ui/app/helpers/higher-order-components/i18n-provider.js similarity index 96% rename from ui/app/i18n-provider.js rename to ui/app/helpers/higher-order-components/i18n-provider.js index 3419474c4..0e34e17e0 100644 --- a/ui/app/i18n-provider.js +++ b/ui/app/helpers/higher-order-components/i18n-provider.js @@ -3,7 +3,7 @@ const connect = require('react-redux').connect const PropTypes = require('prop-types') const { withRouter } = require('react-router-dom') const { compose } = require('recompose') -const t = require('../i18n-helper').getMessage +const t = require('../utils/i18n-helper').getMessage class I18nProvider extends Component { tOrDefault = (key, defaultValue, ...args) => { diff --git a/ui/app/higher-order-components/initialized/index.js b/ui/app/helpers/higher-order-components/initialized/index.js similarity index 100% rename from ui/app/higher-order-components/initialized/index.js rename to ui/app/helpers/higher-order-components/initialized/index.js diff --git a/ui/app/higher-order-components/initialized/initialized.component.js b/ui/app/helpers/higher-order-components/initialized/initialized.component.js similarity index 85% rename from ui/app/higher-order-components/initialized/initialized.component.js rename to ui/app/helpers/higher-order-components/initialized/initialized.component.js index 0736ceff4..2042c0046 100644 --- a/ui/app/higher-order-components/initialized/initialized.component.js +++ b/ui/app/helpers/higher-order-components/initialized/initialized.component.js @@ -1,7 +1,7 @@ import React from 'react' import PropTypes from 'prop-types' import { Redirect, Route } from 'react-router-dom' -import { INITIALIZE_ROUTE } from '../../routes' +import { INITIALIZE_ROUTE } from '../../constants/routes' export default function Initialized (props) { return props.completedOnboarding diff --git a/ui/app/higher-order-components/initialized/initialized.container.js b/ui/app/helpers/higher-order-components/initialized/initialized.container.js similarity index 100% rename from ui/app/higher-order-components/initialized/initialized.container.js rename to ui/app/helpers/higher-order-components/initialized/initialized.container.js diff --git a/ui/app/metametrics/metametrics.provider.js b/ui/app/helpers/higher-order-components/metametrics/metametrics.provider.js similarity index 93% rename from ui/app/metametrics/metametrics.provider.js rename to ui/app/helpers/higher-order-components/metametrics/metametrics.provider.js index 5ff0294e5..6086e03fb 100644 --- a/ui/app/metametrics/metametrics.provider.js +++ b/ui/app/helpers/higher-order-components/metametrics/metametrics.provider.js @@ -9,15 +9,15 @@ import { getAccountType, getNumberOfAccounts, getNumberOfTokens, -} from '../selectors' +} from '../../../selectors/selectors' import { txDataSelector, -} from '../selectors/confirm-transaction' -import { getEnvironmentType } from '../../../app/scripts/lib/util' +} from '../../../selectors/confirm-transaction' +import { getEnvironmentType } from '../../../../../app/scripts/lib/util' import { sendMetaMetricsEvent, sendCountIsTrackable, -} from './metametrics.util' +} from '../../utils/metametrics.util' class MetaMetricsProvider extends Component { static propTypes = { diff --git a/ui/app/higher-order-components/with-method-data/index.js b/ui/app/helpers/higher-order-components/with-method-data/index.js similarity index 100% rename from ui/app/higher-order-components/with-method-data/index.js rename to ui/app/helpers/higher-order-components/with-method-data/index.js diff --git a/ui/app/higher-order-components/with-method-data/with-method-data.component.js b/ui/app/helpers/higher-order-components/with-method-data/with-method-data.component.js similarity index 95% rename from ui/app/higher-order-components/with-method-data/with-method-data.component.js rename to ui/app/helpers/higher-order-components/with-method-data/with-method-data.component.js index 08b9083e1..efa9ad0a2 100644 --- a/ui/app/higher-order-components/with-method-data/with-method-data.component.js +++ b/ui/app/helpers/higher-order-components/with-method-data/with-method-data.component.js @@ -1,6 +1,6 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' -import { getMethodData, getFourBytePrefix } from '../../helpers/transactions.util' +import { getMethodData, getFourBytePrefix } from '../../utils/transactions.util' export default function withMethodData (WrappedComponent) { return class MethodDataWrappedComponent extends PureComponent { diff --git a/ui/app/higher-order-components/with-modal-props/index.js b/ui/app/helpers/higher-order-components/with-modal-props/index.js similarity index 100% rename from ui/app/higher-order-components/with-modal-props/index.js rename to ui/app/helpers/higher-order-components/with-modal-props/index.js diff --git a/ui/app/higher-order-components/with-modal-props/tests/with-modal-props.test.js b/ui/app/helpers/higher-order-components/with-modal-props/tests/with-modal-props.test.js similarity index 100% rename from ui/app/higher-order-components/with-modal-props/tests/with-modal-props.test.js rename to ui/app/helpers/higher-order-components/with-modal-props/tests/with-modal-props.test.js diff --git a/ui/app/higher-order-components/with-modal-props/with-modal-props.js b/ui/app/helpers/higher-order-components/with-modal-props/with-modal-props.js similarity index 89% rename from ui/app/higher-order-components/with-modal-props/with-modal-props.js rename to ui/app/helpers/higher-order-components/with-modal-props/with-modal-props.js index 02f3855af..aac6b5a61 100644 --- a/ui/app/higher-order-components/with-modal-props/with-modal-props.js +++ b/ui/app/helpers/higher-order-components/with-modal-props/with-modal-props.js @@ -1,5 +1,5 @@ import { connect } from 'react-redux' -import { hideModal } from '../../actions' +import { hideModal } from '../../../store/actions' const mapStateToProps = state => { const { appState } = state diff --git a/ui/app/higher-order-components/with-token-tracker/index.js b/ui/app/helpers/higher-order-components/with-token-tracker/index.js similarity index 100% rename from ui/app/higher-order-components/with-token-tracker/index.js rename to ui/app/helpers/higher-order-components/with-token-tracker/index.js diff --git a/ui/app/higher-order-components/with-token-tracker/with-token-tracker.component.js b/ui/app/helpers/higher-order-components/with-token-tracker/with-token-tracker.component.js similarity index 100% rename from ui/app/higher-order-components/with-token-tracker/with-token-tracker.component.js rename to ui/app/helpers/higher-order-components/with-token-tracker/with-token-tracker.component.js diff --git a/ui/app/helpers/common.util.js b/ui/app/helpers/utils/common.util.js similarity index 100% rename from ui/app/helpers/common.util.js rename to ui/app/helpers/utils/common.util.js diff --git a/ui/app/helpers/tests/common.util.test.js b/ui/app/helpers/utils/common.util.test.js similarity index 93% rename from ui/app/helpers/tests/common.util.test.js rename to ui/app/helpers/utils/common.util.test.js index a52b91a10..6259f4a89 100644 --- a/ui/app/helpers/tests/common.util.test.js +++ b/ui/app/helpers/utils/common.util.test.js @@ -1,4 +1,4 @@ -import * as utils from '../common.util' +import * as utils from './common.util' import assert from 'assert' describe('Common utils', () => { diff --git a/ui/app/helpers/confirm-transaction/util.js b/ui/app/helpers/utils/confirm-tx.util.js similarity index 99% rename from ui/app/helpers/confirm-transaction/util.js rename to ui/app/helpers/utils/confirm-tx.util.js index 0451824e8..f843db118 100644 --- a/ui/app/helpers/confirm-transaction/util.js +++ b/ui/app/helpers/utils/confirm-tx.util.js @@ -8,7 +8,7 @@ import { addCurrencies, multiplyCurrencies, conversionGreaterThan, -} from '../../conversion-util' +} from './conversion-util' import { unconfirmedTransactionsCountSelector } from '../../selectors/confirm-transaction' diff --git a/ui/app/helpers/confirm-transaction/util.test.js b/ui/app/helpers/utils/confirm-tx.util.test.js similarity index 98% rename from ui/app/helpers/confirm-transaction/util.test.js rename to ui/app/helpers/utils/confirm-tx.util.test.js index 4c1a3e16b..e818601ca 100644 --- a/ui/app/helpers/confirm-transaction/util.test.js +++ b/ui/app/helpers/utils/confirm-tx.util.test.js @@ -1,4 +1,4 @@ -import * as utils from './util' +import * as utils from './confirm-tx.util' import assert from 'assert' describe('Confirm Transaction utils', () => { diff --git a/ui/app/conversion-util.js b/ui/app/helpers/utils/conversion-util.js similarity index 100% rename from ui/app/conversion-util.js rename to ui/app/helpers/utils/conversion-util.js diff --git a/ui/app/conversion-util.test.js b/ui/app/helpers/utils/conversion-util.test.js similarity index 100% rename from ui/app/conversion-util.test.js rename to ui/app/helpers/utils/conversion-util.test.js diff --git a/ui/app/helpers/conversions.util.js b/ui/app/helpers/utils/conversions.util.js similarity index 97% rename from ui/app/helpers/conversions.util.js rename to ui/app/helpers/utils/conversions.util.js index 065d67e8e..b4ec50626 100644 --- a/ui/app/helpers/conversions.util.js +++ b/ui/app/helpers/utils/conversions.util.js @@ -1,6 +1,6 @@ import ethUtil from 'ethereumjs-util' import { ETH, GWEI, WEI } from '../constants/common' -import { conversionUtil, addCurrencies } from '../conversion-util' +import { conversionUtil, addCurrencies } from './conversion-util' export function bnToHex (inputBn) { return ethUtil.addHexPrefix(inputBn.toString(16)) diff --git a/ui/app/helpers/formatters.js b/ui/app/helpers/utils/formatters.js similarity index 100% rename from ui/app/helpers/formatters.js rename to ui/app/helpers/utils/formatters.js diff --git a/ui/i18n-helper.js b/ui/app/helpers/utils/i18n-helper.js similarity index 100% rename from ui/i18n-helper.js rename to ui/app/helpers/utils/i18n-helper.js diff --git a/ui/app/metametrics/metametrics.util.js b/ui/app/helpers/utils/metametrics.util.js similarity index 100% rename from ui/app/metametrics/metametrics.util.js rename to ui/app/helpers/utils/metametrics.util.js diff --git a/ui/app/token-util.js b/ui/app/helpers/utils/token-util.js similarity index 100% rename from ui/app/token-util.js rename to ui/app/helpers/utils/token-util.js diff --git a/ui/app/helpers/transactions.util.js b/ui/app/helpers/utils/transactions.util.js similarity index 97% rename from ui/app/helpers/transactions.util.js rename to ui/app/helpers/utils/transactions.util.js index d5b7f4958..edf2e24f6 100644 --- a/ui/app/helpers/transactions.util.js +++ b/ui/app/helpers/utils/transactions.util.js @@ -5,7 +5,7 @@ import abiDecoder from 'abi-decoder' import { TRANSACTION_TYPE_CANCEL, TRANSACTION_STATUS_CONFIRMED, -} from '../../../app/scripts/controllers/transactions/enums' +} from '../../../../app/scripts/controllers/transactions/enums' import { TOKEN_METHOD_TRANSFER, @@ -21,7 +21,7 @@ import { CANCEL_ATTEMPT_ACTION_KEY, } from '../constants/transactions' -import { addCurrencies } from '../conversion-util' +import { addCurrencies } from './conversion-util' abiDecoder.addABI(abi) diff --git a/ui/app/helpers/tests/transactions.util.test.js b/ui/app/helpers/utils/transactions.util.test.js similarity index 97% rename from ui/app/helpers/tests/transactions.util.test.js rename to ui/app/helpers/utils/transactions.util.test.js index 838522e35..4a8ca5c9d 100644 --- a/ui/app/helpers/tests/transactions.util.test.js +++ b/ui/app/helpers/utils/transactions.util.test.js @@ -1,4 +1,4 @@ -import * as utils from '../transactions.util' +import * as utils from './transactions.util' import assert from 'assert' describe('Transactions utils', () => { diff --git a/ui/app/util.js b/ui/app/helpers/utils/util.js similarity index 99% rename from ui/app/util.js rename to ui/app/helpers/utils/util.js index 3237e5feb..c50d7cbe5 100644 --- a/ui/app/util.js +++ b/ui/app/helpers/utils/util.js @@ -1,6 +1,6 @@ const abi = require('human-standard-token-abi') const ethUtil = require('ethereumjs-util') -const hexToBn = require('../../app/scripts/lib/hex-to-bn') +const hexToBn = require('../../../../app/scripts/lib/hex-to-bn') import { DateTime } from 'luxon' const MIN_GAS_PRICE_GWEI_BN = new ethUtil.BN(1) diff --git a/ui/app/img/identicon-tardigrade.png b/ui/app/img/identicon-tardigrade.png deleted file mode 100644 index 1742a32b8..000000000 Binary files a/ui/app/img/identicon-tardigrade.png and /dev/null differ diff --git a/ui/app/img/identicon-walrus.png b/ui/app/img/identicon-walrus.png deleted file mode 100644 index d58fae912..000000000 Binary files a/ui/app/img/identicon-walrus.png and /dev/null differ diff --git a/ui/app/keychains/hd/create-vault-complete.js b/ui/app/keychains/hd/create-vault-complete.js deleted file mode 100644 index 5ab5d4c33..000000000 --- a/ui/app/keychains/hd/create-vault-complete.js +++ /dev/null @@ -1,91 +0,0 @@ -const inherits = require('util').inherits -const Component = require('react').Component -const connect = require('react-redux').connect -const h = require('react-hyperscript') -const actions = require('../../actions') -const exportAsFile = require('../../util').exportAsFile - -module.exports = connect(mapStateToProps)(CreateVaultCompleteScreen) - -inherits(CreateVaultCompleteScreen, Component) -function CreateVaultCompleteScreen () { - Component.call(this) -} - -function mapStateToProps (state) { - return { - seed: state.appState.currentView.seedWords, - cachedSeed: state.metamask.seedWords, - } -} - -CreateVaultCompleteScreen.prototype.render = function () { - var state = this.props - var seed = state.seed || state.cachedSeed || '' - - return ( - - h('.initialize-screen.flex-column.flex-center.flex-grow', [ - - // // subtitle and nav - // h('.section-title.flex-row.flex-center', [ - // h('h2.page-subtitle', 'Vault Created'), - // ]), - - h('h3.flex-center.text-transform-uppercase', { - style: { - background: '#EBEBEB', - color: '#AEAEAE', - marginTop: 36, - marginBottom: 8, - width: '100%', - fontSize: '20px', - padding: 6, - }, - }, [ - 'Vault Created', - ]), - - h('div', { - style: { - fontSize: '1em', - marginTop: '10px', - textAlign: 'center', - }, - }, [ - h('span.error', 'These 12 words are the only way to restore your MetaMask accounts.\nSave them somewhere safe and secret.'), - ]), - - h('textarea.twelve-word-phrase', { - readOnly: true, - value: seed, - }), - - h('button.primary', { - onClick: () => this.confirmSeedWords() - .then(account => this.showAccountDetail(account)), - style: { - margin: '24px', - fontSize: '0.9em', - marginBottom: '10px', - }, - }, 'I\'ve copied it somewhere safe'), - - h('button.primary', { - onClick: () => exportAsFile(`MetaMask Seed Words`, seed), - style: { - margin: '10px', - fontSize: '0.9em', - }, - }, 'Save Seed Words As File'), - ]) - ) -} - -CreateVaultCompleteScreen.prototype.confirmSeedWords = function () { - return this.props.dispatch(actions.confirmSeedWords()) -} - -CreateVaultCompleteScreen.prototype.showAccountDetail = function (account) { - return this.props.dispatch(actions.showAccountDetail(account)) -} diff --git a/ui/app/keychains/hd/restore-vault.js b/ui/app/keychains/hd/restore-vault.js deleted file mode 100644 index 913d20505..000000000 --- a/ui/app/keychains/hd/restore-vault.js +++ /dev/null @@ -1,181 +0,0 @@ -const inherits = require('util').inherits -const PropTypes = require('prop-types') -const PersistentForm = require('../../../lib/persistent-form') -const connect = require('react-redux').connect -const h = require('react-hyperscript') -const actions = require('../../actions') -const log = require('loglevel') - -RestoreVaultScreen.contextTypes = { - t: PropTypes.func, -} - -module.exports = connect(mapStateToProps)(RestoreVaultScreen) - - -inherits(RestoreVaultScreen, PersistentForm) -function RestoreVaultScreen () { - PersistentForm.call(this) -} - -function mapStateToProps (state) { - return { - warning: state.appState.warning, - forgottenPassword: state.appState.forgottenPassword, - } -} - -RestoreVaultScreen.prototype.render = function () { - var state = this.props - this.persistentFormParentId = 'restore-vault-form' - - return ( - - h('.initialize-screen.flex-column.flex-center.flex-grow', [ - - h('h3.flex-center.text-transform-uppercase', { - style: { - background: '#EBEBEB', - color: '#AEAEAE', - marginBottom: 24, - width: '100%', - fontSize: '20px', - padding: 6, - }, - }, [ - this.context.t('restoreVault'), - ]), - - // wallet seed entry - h('h3', this.context.t('walletSeed')), - h('textarea.twelve-word-phrase.letter-spacey', { - dataset: { - persistentFormId: 'wallet-seed', - }, - placeholder: this.context.t('secretPhrase'), - }), - - // password - h('input.large-input.letter-spacey', { - type: 'password', - id: 'password-box', - placeholder: this.context.t('newPassword8Chars'), - dataset: { - persistentFormId: 'password', - }, - style: { - width: 260, - marginTop: 12, - }, - }), - - // confirm password - h('input.large-input.letter-spacey', { - type: 'password', - id: 'password-box-confirm', - placeholder: this.context.t('confirmPassword'), - onKeyPress: this.createOnEnter.bind(this), - dataset: { - persistentFormId: 'password-confirmation', - }, - style: { - width: 260, - marginTop: 16, - }, - }), - - (state.warning) && ( - h('span.error.in-progress-notification', state.warning) - ), - - // submit - - h('.flex-row.flex-space-between', { - style: { - marginTop: 30, - width: '50%', - }, - }, [ - - // cancel - h('button.primary', { - onClick: this.showInitializeMenu.bind(this), - style: { - textTransform: 'uppercase', - }, - }, this.context.t('cancel')), - - // submit - h('button.primary', { - onClick: this.createNewVaultAndRestore.bind(this), - style: { - textTransform: 'uppercase', - }, - }, this.context.t('ok')), - ]), - ]) - ) -} - -RestoreVaultScreen.prototype.showInitializeMenu = function () { - const { dispatch, forgottenPassword } = this.props - dispatch(actions.unMarkPasswordForgotten()) - .then(() => { - if (forgottenPassword) { - dispatch(actions.backToUnlockView()) - } else { - dispatch(actions.showInitializeMenu()) - } - }) -} - -RestoreVaultScreen.prototype.createOnEnter = function (event) { - if (event.key === 'Enter') { - this.createNewVaultAndRestore() - } -} - -RestoreVaultScreen.prototype.createNewVaultAndRestore = function () { - // check password - var passwordBox = document.getElementById('password-box') - var password = passwordBox.value - var passwordConfirmBox = document.getElementById('password-box-confirm') - var passwordConfirm = passwordConfirmBox.value - if (password.length < 8) { - this.warning = this.context.t('passwordNotLongEnough') - - this.props.dispatch(actions.displayWarning(this.warning)) - return - } - if (password !== passwordConfirm) { - this.warning = this.context.t('passwordsDontMatch') - this.props.dispatch(actions.displayWarning(this.warning)) - return - } - // check seed - var seedBox = document.querySelector('textarea.twelve-word-phrase') - var seed = seedBox.value.trim() - - // true if the string has more than a space between words. - if (seed.split(' ').length > 1) { - this.warning = this.context.t('spaceBetween') - this.props.dispatch(actions.displayWarning(this.warning)) - return - } - // true if seed contains a character that is not between a-z or a space - if (!seed.match(/^[a-z ]+$/)) { - this.warning = this.context.t('loweCaseWords') - this.props.dispatch(actions.displayWarning(this.warning)) - return - } - if (seed.split(' ').length !== 12) { - this.warning = this.context.t('seedPhraseReq') - this.props.dispatch(actions.displayWarning(this.warning)) - return - } - // submit - this.warning = null - this.props.dispatch(actions.displayWarning(this.warning)) - this.props.dispatch(actions.createNewVaultAndRestore(password, seed)) - .catch(err => log.error(err.message)) -} diff --git a/ui/app/components/pages/add-token/add-token.component.js b/ui/app/pages/add-token/add-token.component.js similarity index 96% rename from ui/app/components/pages/add-token/add-token.component.js rename to ui/app/pages/add-token/add-token.component.js index 198889cf2..40c1ff7fd 100644 --- a/ui/app/components/pages/add-token/add-token.component.js +++ b/ui/app/pages/add-token/add-token.component.js @@ -2,13 +2,13 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' import ethUtil from 'ethereumjs-util' import { checkExistingAddresses } from './util' -import { tokenInfoGetter } from '../../../token-util' -import { DEFAULT_ROUTE, CONFIRM_ADD_TOKEN_ROUTE } from '../../../routes' -import TextField from '../../text-field' +import { tokenInfoGetter } from '../../helpers/utils/token-util' +import { DEFAULT_ROUTE, CONFIRM_ADD_TOKEN_ROUTE } from '../../helpers/constants/routes' +import TextField from '../../components/ui/text-field' import TokenList from './token-list' import TokenSearch from './token-search' -import PageContainer from '../../page-container' -import { Tabs, Tab } from '../../tabs' +import PageContainer from '../../components/ui/page-container' +import { Tabs, Tab } from '../../components/ui/tabs' const emptyAddr = '0x0000000000000000000000000000000000000000' const SEARCH_TAB = 'SEARCH' diff --git a/ui/app/components/pages/add-token/add-token.container.js b/ui/app/pages/add-token/add-token.container.js similarity index 97% rename from ui/app/components/pages/add-token/add-token.container.js rename to ui/app/pages/add-token/add-token.container.js index 87671b156..eee16dfc7 100644 --- a/ui/app/components/pages/add-token/add-token.container.js +++ b/ui/app/pages/add-token/add-token.container.js @@ -1,7 +1,7 @@ import { connect } from 'react-redux' import AddToken from './add-token.component' -const { setPendingTokens, clearPendingTokens } = require('../../../actions') +const { setPendingTokens, clearPendingTokens } = require('../../store/actions') const mapStateToProps = ({ metamask }) => { const { identities, tokens, pendingTokens } = metamask diff --git a/ui/app/components/pages/add-token/index.js b/ui/app/pages/add-token/index.js similarity index 100% rename from ui/app/components/pages/add-token/index.js rename to ui/app/pages/add-token/index.js diff --git a/ui/app/components/pages/add-token/index.scss b/ui/app/pages/add-token/index.scss similarity index 95% rename from ui/app/components/pages/add-token/index.scss rename to ui/app/pages/add-token/index.scss index 1690c7654..ef6802f96 100644 --- a/ui/app/components/pages/add-token/index.scss +++ b/ui/app/pages/add-token/index.scss @@ -1,4 +1,4 @@ -@import './token-list/index'; +@import 'token-list/index'; .add-token { &__custom-token-form { diff --git a/ui/app/components/pages/add-token/token-list/index.js b/ui/app/pages/add-token/token-list/index.js similarity index 100% rename from ui/app/components/pages/add-token/token-list/index.js rename to ui/app/pages/add-token/token-list/index.js diff --git a/ui/app/components/pages/add-token/token-list/index.scss b/ui/app/pages/add-token/token-list/index.scss similarity index 96% rename from ui/app/components/pages/add-token/token-list/index.scss rename to ui/app/pages/add-token/token-list/index.scss index e32739d59..b7787a18e 100644 --- a/ui/app/components/pages/add-token/token-list/index.scss +++ b/ui/app/pages/add-token/token-list/index.scss @@ -1,4 +1,4 @@ -@import './token-list-placeholder/index'; +@import 'token-list-placeholder/index'; .token-list { &__title { diff --git a/ui/app/components/pages/add-token/token-list/token-list-placeholder/index.js b/ui/app/pages/add-token/token-list/token-list-placeholder/index.js similarity index 100% rename from ui/app/components/pages/add-token/token-list/token-list-placeholder/index.js rename to ui/app/pages/add-token/token-list/token-list-placeholder/index.js diff --git a/ui/app/components/pages/add-token/token-list/token-list-placeholder/index.scss b/ui/app/pages/add-token/token-list/token-list-placeholder/index.scss similarity index 100% rename from ui/app/components/pages/add-token/token-list/token-list-placeholder/index.scss rename to ui/app/pages/add-token/token-list/token-list-placeholder/index.scss diff --git a/ui/app/components/pages/add-token/token-list/token-list-placeholder/token-list-placeholder.component.js b/ui/app/pages/add-token/token-list/token-list-placeholder/token-list-placeholder.component.js similarity index 100% rename from ui/app/components/pages/add-token/token-list/token-list-placeholder/token-list-placeholder.component.js rename to ui/app/pages/add-token/token-list/token-list-placeholder/token-list-placeholder.component.js diff --git a/ui/app/components/pages/add-token/token-list/token-list.component.js b/ui/app/pages/add-token/token-list/token-list.component.js similarity index 100% rename from ui/app/components/pages/add-token/token-list/token-list.component.js rename to ui/app/pages/add-token/token-list/token-list.component.js diff --git a/ui/app/components/pages/add-token/token-list/token-list.container.js b/ui/app/pages/add-token/token-list/token-list.container.js similarity index 100% rename from ui/app/components/pages/add-token/token-list/token-list.container.js rename to ui/app/pages/add-token/token-list/token-list.container.js diff --git a/ui/app/components/pages/add-token/token-search/index.js b/ui/app/pages/add-token/token-search/index.js similarity index 100% rename from ui/app/components/pages/add-token/token-search/index.js rename to ui/app/pages/add-token/token-search/index.js diff --git a/ui/app/components/pages/add-token/token-search/token-search.component.js b/ui/app/pages/add-token/token-search/token-search.component.js similarity index 97% rename from ui/app/components/pages/add-token/token-search/token-search.component.js rename to ui/app/pages/add-token/token-search/token-search.component.js index 036b2db1e..5542a19ff 100644 --- a/ui/app/components/pages/add-token/token-search/token-search.component.js +++ b/ui/app/pages/add-token/token-search/token-search.component.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types' import contractMap from 'eth-contract-metadata' import Fuse from 'fuse.js' import InputAdornment from '@material-ui/core/InputAdornment' -import TextField from '../../../text-field' +import TextField from '../../../components/ui/text-field' const contractList = Object.entries(contractMap) .map(([ _, tokenData]) => tokenData) diff --git a/ui/app/components/pages/add-token/util.js b/ui/app/pages/add-token/util.js similarity index 100% rename from ui/app/components/pages/add-token/util.js rename to ui/app/pages/add-token/util.js diff --git a/ui/app/components/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js b/ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js similarity index 94% rename from ui/app/components/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js rename to ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js index ee5d6fa64..7edb8f541 100644 --- a/ui/app/components/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js +++ b/ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js @@ -1,9 +1,9 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' -import { DEFAULT_ROUTE } from '../../../routes' -import Button from '../../button' -import Identicon from '../../../components/identicon' -import TokenBalance from '../../token-balance' +import { DEFAULT_ROUTE } from '../../helpers/constants/routes' +import Button from '../../components/ui/button' +import Identicon from '../../components/ui/identicon' +import TokenBalance from '../../components/ui/token-balance' export default class ConfirmAddSuggestedToken extends Component { static contextTypes = { diff --git a/ui/app/components/pages/confirm-add-suggested-token/confirm-add-suggested-token.container.js b/ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.container.js similarity index 91% rename from ui/app/components/pages/confirm-add-suggested-token/confirm-add-suggested-token.container.js rename to ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.container.js index 1f2737e52..a90fe148f 100644 --- a/ui/app/components/pages/confirm-add-suggested-token/confirm-add-suggested-token.container.js +++ b/ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.container.js @@ -5,7 +5,7 @@ import { withRouter } from 'react-router-dom' const extend = require('xtend') -const { addToken, removeSuggestedTokens } = require('../../../actions') +const { addToken, removeSuggestedTokens } = require('../../store/actions') const mapStateToProps = ({ metamask }) => { const { pendingTokens, suggestedTokens } = metamask diff --git a/ui/app/components/pages/confirm-add-suggested-token/index.js b/ui/app/pages/confirm-add-suggested-token/index.js similarity index 100% rename from ui/app/components/pages/confirm-add-suggested-token/index.js rename to ui/app/pages/confirm-add-suggested-token/index.js diff --git a/ui/app/components/pages/confirm-add-token/confirm-add-token.component.js b/ui/app/pages/confirm-add-token/confirm-add-token.component.js similarity index 93% rename from ui/app/components/pages/confirm-add-token/confirm-add-token.component.js rename to ui/app/pages/confirm-add-token/confirm-add-token.component.js index d3fec79d7..c0ec624ac 100644 --- a/ui/app/components/pages/confirm-add-token/confirm-add-token.component.js +++ b/ui/app/pages/confirm-add-token/confirm-add-token.component.js @@ -1,9 +1,9 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' -import { DEFAULT_ROUTE, ADD_TOKEN_ROUTE } from '../../../routes' -import Button from '../../button' -import Identicon from '../../identicon' -import TokenBalance from '../../token-balance' +import { DEFAULT_ROUTE, ADD_TOKEN_ROUTE } from '../../helpers/constants/routes' +import Button from '../../components/ui/button' +import Identicon from '../../components/ui/identicon' +import TokenBalance from '../../components/ui/token-balance' export default class ConfirmAddToken extends Component { static contextTypes = { diff --git a/ui/app/components/pages/confirm-add-token/confirm-add-token.container.js b/ui/app/pages/confirm-add-token/confirm-add-token.container.js similarity index 86% rename from ui/app/components/pages/confirm-add-token/confirm-add-token.container.js rename to ui/app/pages/confirm-add-token/confirm-add-token.container.js index 0190024d9..961626177 100644 --- a/ui/app/components/pages/confirm-add-token/confirm-add-token.container.js +++ b/ui/app/pages/confirm-add-token/confirm-add-token.container.js @@ -1,7 +1,7 @@ import { connect } from 'react-redux' import ConfirmAddToken from './confirm-add-token.component' -const { addTokens, clearPendingTokens } = require('../../../actions') +const { addTokens, clearPendingTokens } = require('../../store/actions') const mapStateToProps = ({ metamask }) => { const { pendingTokens } = metamask diff --git a/ui/app/components/pages/confirm-add-token/index.js b/ui/app/pages/confirm-add-token/index.js similarity index 100% rename from ui/app/components/pages/confirm-add-token/index.js rename to ui/app/pages/confirm-add-token/index.js diff --git a/ui/app/components/pages/confirm-add-token/index.scss b/ui/app/pages/confirm-add-token/index.scss similarity index 100% rename from ui/app/components/pages/confirm-add-token/index.scss rename to ui/app/pages/confirm-add-token/index.scss diff --git a/ui/app/components/pages/confirm-approve/confirm-approve.component.js b/ui/app/pages/confirm-approve/confirm-approve.component.js similarity index 100% rename from ui/app/components/pages/confirm-approve/confirm-approve.component.js rename to ui/app/pages/confirm-approve/confirm-approve.component.js diff --git a/ui/app/components/pages/confirm-approve/confirm-approve.container.js b/ui/app/pages/confirm-approve/confirm-approve.container.js similarity index 80% rename from ui/app/components/pages/confirm-approve/confirm-approve.container.js rename to ui/app/pages/confirm-approve/confirm-approve.container.js index 4ef9f4ced..5f8bb8f0b 100644 --- a/ui/app/components/pages/confirm-approve/confirm-approve.container.js +++ b/ui/app/pages/confirm-approve/confirm-approve.container.js @@ -1,6 +1,6 @@ import { connect } from 'react-redux' import ConfirmApprove from './confirm-approve.component' -import { approveTokenAmountAndToAddressSelector } from '../../../selectors/confirm-transaction' +import { approveTokenAmountAndToAddressSelector } from '../../selectors/confirm-transaction' const mapStateToProps = state => { const { confirmTransaction: { tokenProps: { tokenSymbol } = {} } } = state diff --git a/ui/app/components/pages/confirm-approve/index.js b/ui/app/pages/confirm-approve/index.js similarity index 100% rename from ui/app/components/pages/confirm-approve/index.js rename to ui/app/pages/confirm-approve/index.js diff --git a/ui/app/components/pages/confirm-deploy-contract/confirm-deploy-contract.component.js b/ui/app/pages/confirm-deploy-contract/confirm-deploy-contract.component.js similarity index 100% rename from ui/app/components/pages/confirm-deploy-contract/confirm-deploy-contract.component.js rename to ui/app/pages/confirm-deploy-contract/confirm-deploy-contract.component.js diff --git a/ui/app/components/pages/confirm-deploy-contract/confirm-deploy-contract.container.js b/ui/app/pages/confirm-deploy-contract/confirm-deploy-contract.container.js similarity index 100% rename from ui/app/components/pages/confirm-deploy-contract/confirm-deploy-contract.container.js rename to ui/app/pages/confirm-deploy-contract/confirm-deploy-contract.container.js diff --git a/ui/app/components/pages/confirm-deploy-contract/index.js b/ui/app/pages/confirm-deploy-contract/index.js similarity index 100% rename from ui/app/components/pages/confirm-deploy-contract/index.js rename to ui/app/pages/confirm-deploy-contract/index.js diff --git a/ui/app/components/pages/confirm-send-ether/confirm-send-ether.component.js b/ui/app/pages/confirm-send-ether/confirm-send-ether.component.js similarity index 93% rename from ui/app/components/pages/confirm-send-ether/confirm-send-ether.component.js rename to ui/app/pages/confirm-send-ether/confirm-send-ether.component.js index 442a478b8..8daad675e 100644 --- a/ui/app/components/pages/confirm-send-ether/confirm-send-ether.component.js +++ b/ui/app/pages/confirm-send-ether/confirm-send-ether.component.js @@ -1,7 +1,7 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' import ConfirmTransactionBase from '../confirm-transaction-base' -import { SEND_ROUTE } from '../../../routes' +import { SEND_ROUTE } from '../../helpers/constants/routes' export default class ConfirmSendEther extends Component { static contextTypes = { diff --git a/ui/app/components/pages/confirm-send-ether/confirm-send-ether.container.js b/ui/app/pages/confirm-send-ether/confirm-send-ether.container.js similarity index 86% rename from ui/app/components/pages/confirm-send-ether/confirm-send-ether.container.js rename to ui/app/pages/confirm-send-ether/confirm-send-ether.container.js index e48ef54a8..713da702d 100644 --- a/ui/app/components/pages/confirm-send-ether/confirm-send-ether.container.js +++ b/ui/app/pages/confirm-send-ether/confirm-send-ether.container.js @@ -1,8 +1,8 @@ import { connect } from 'react-redux' import { compose } from 'recompose' import { withRouter } from 'react-router-dom' -import { updateSend } from '../../../actions' -import { clearConfirmTransaction } from '../../../ducks/confirm-transaction.duck' +import { updateSend } from '../../store/actions' +import { clearConfirmTransaction } from '../../ducks/confirm-transaction/confirm-transaction.duck' import ConfirmSendEther from './confirm-send-ether.component' const mapStateToProps = state => { diff --git a/ui/app/components/pages/confirm-send-ether/index.js b/ui/app/pages/confirm-send-ether/index.js similarity index 100% rename from ui/app/components/pages/confirm-send-ether/index.js rename to ui/app/pages/confirm-send-ether/index.js diff --git a/ui/app/components/pages/confirm-send-token/confirm-send-token.component.js b/ui/app/pages/confirm-send-token/confirm-send-token.component.js similarity index 92% rename from ui/app/components/pages/confirm-send-token/confirm-send-token.component.js rename to ui/app/pages/confirm-send-token/confirm-send-token.component.js index cb39e3d7b..7f3b1c082 100644 --- a/ui/app/components/pages/confirm-send-token/confirm-send-token.component.js +++ b/ui/app/pages/confirm-send-token/confirm-send-token.component.js @@ -1,7 +1,7 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' import ConfirmTokenTransactionBase from '../confirm-token-transaction-base' -import { SEND_ROUTE } from '../../../routes' +import { SEND_ROUTE } from '../../helpers/constants/routes' export default class ConfirmSendToken extends Component { static propTypes = { diff --git a/ui/app/components/pages/confirm-send-token/confirm-send-token.container.js b/ui/app/pages/confirm-send-token/confirm-send-token.container.js similarity index 87% rename from ui/app/components/pages/confirm-send-token/confirm-send-token.container.js rename to ui/app/pages/confirm-send-token/confirm-send-token.container.js index d60911e59..db9b08c48 100644 --- a/ui/app/components/pages/confirm-send-token/confirm-send-token.container.js +++ b/ui/app/pages/confirm-send-token/confirm-send-token.container.js @@ -2,10 +2,10 @@ import { connect } from 'react-redux' import { compose } from 'recompose' import { withRouter } from 'react-router-dom' import ConfirmSendToken from './confirm-send-token.component' -import { clearConfirmTransaction } from '../../../ducks/confirm-transaction.duck' -import { setSelectedToken, updateSend, showSendTokenPage } from '../../../actions' -import { conversionUtil } from '../../../conversion-util' -import { sendTokenTokenAmountAndToAddressSelector } from '../../../selectors/confirm-transaction' +import { clearConfirmTransaction } from '../../ducks/confirm-transaction/confirm-transaction.duck' +import { setSelectedToken, updateSend, showSendTokenPage } from '../../store/actions' +import { conversionUtil } from '../../helpers/utils/conversion-util' +import { sendTokenTokenAmountAndToAddressSelector } from '../../selectors/confirm-transaction' const mapStateToProps = state => { const { tokenAmount } = sendTokenTokenAmountAndToAddressSelector(state) diff --git a/ui/app/components/pages/confirm-send-token/index.js b/ui/app/pages/confirm-send-token/index.js similarity index 100% rename from ui/app/components/pages/confirm-send-token/index.js rename to ui/app/pages/confirm-send-token/index.js diff --git a/ui/app/components/pages/confirm-token-transaction-base/confirm-token-transaction-base.component.js b/ui/app/pages/confirm-token-transaction-base/confirm-token-transaction-base.component.js similarity index 91% rename from ui/app/components/pages/confirm-token-transaction-base/confirm-token-transaction-base.component.js rename to ui/app/pages/confirm-token-transaction-base/confirm-token-transaction-base.component.js index 7f1fb4e49..dbda3c1dc 100644 --- a/ui/app/components/pages/confirm-token-transaction-base/confirm-token-transaction-base.component.js +++ b/ui/app/pages/confirm-token-transaction-base/confirm-token-transaction-base.component.js @@ -1,15 +1,15 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' import ConfirmTransactionBase from '../confirm-transaction-base' -import UserPreferencedCurrencyDisplay from '../../user-preferenced-currency-display' +import UserPreferencedCurrencyDisplay from '../../components/app/user-preferenced-currency-display' import { formatCurrency, convertTokenToFiat, addFiat, roundExponential, -} from '../../../helpers/confirm-transaction/util' -import { getWeiHexFromDecimalValue } from '../../../helpers/conversions.util' -import { ETH, PRIMARY } from '../../../constants/common' +} from '../../helpers/utils/confirm-tx.util' +import { getWeiHexFromDecimalValue } from '../../helpers/utils/conversions.util' +import { ETH, PRIMARY } from '../../helpers/constants/common' export default class ConfirmTokenTransactionBase extends Component { static contextTypes = { diff --git a/ui/app/components/pages/confirm-token-transaction-base/confirm-token-transaction-base.container.js b/ui/app/pages/confirm-token-transaction-base/confirm-token-transaction-base.container.js similarity index 95% rename from ui/app/components/pages/confirm-token-transaction-base/confirm-token-transaction-base.container.js rename to ui/app/pages/confirm-token-transaction-base/confirm-token-transaction-base.container.js index be38acdb0..f5f30a460 100644 --- a/ui/app/components/pages/confirm-token-transaction-base/confirm-token-transaction-base.container.js +++ b/ui/app/pages/confirm-token-transaction-base/confirm-token-transaction-base.container.js @@ -3,7 +3,7 @@ import ConfirmTokenTransactionBase from './confirm-token-transaction-base.compon import { tokenAmountAndToAddressSelector, contractExchangeRateSelector, -} from '../../../selectors/confirm-transaction' +} from '../../selectors/confirm-transaction' const mapStateToProps = (state, ownProps) => { const { tokenAmount: ownTokenAmount } = ownProps diff --git a/ui/app/components/pages/confirm-token-transaction-base/index.js b/ui/app/pages/confirm-token-transaction-base/index.js similarity index 100% rename from ui/app/components/pages/confirm-token-transaction-base/index.js rename to ui/app/pages/confirm-token-transaction-base/index.js diff --git a/ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.component.js b/ui/app/pages/confirm-transaction-base/confirm-transaction-base.component.js similarity index 96% rename from ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.component.js rename to ui/app/pages/confirm-transaction-base/confirm-transaction-base.component.js index 8b101b1ba..1da9c34bd 100644 --- a/ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.component.js +++ b/ui/app/pages/confirm-transaction-base/confirm-transaction-base.component.js @@ -1,17 +1,17 @@ import ethUtil from 'ethereumjs-util' import React, { Component } from 'react' import PropTypes from 'prop-types' -import ConfirmPageContainer, { ConfirmDetailRow } from '../../confirm-page-container' -import { isBalanceSufficient } from '../../send/send.utils' -import { DEFAULT_ROUTE, CONFIRM_TRANSACTION_ROUTE } from '../../../routes' +import ConfirmPageContainer, { ConfirmDetailRow } from '../../components/app/confirm-page-container' +import { isBalanceSufficient } from '../../components/app/send/send.utils' +import { DEFAULT_ROUTE, CONFIRM_TRANSACTION_ROUTE } from '../../helpers/constants/routes' import { INSUFFICIENT_FUNDS_ERROR_KEY, TRANSACTION_ERROR_KEY, -} from '../../../constants/error-keys' -import { CONFIRMED_STATUS, DROPPED_STATUS } from '../../../constants/transactions' -import UserPreferencedCurrencyDisplay from '../../user-preferenced-currency-display' -import { PRIMARY, SECONDARY } from '../../../constants/common' -import AdvancedGasInputs from '../../gas-customization/advanced-gas-inputs' +} from '../../helpers/constants/error-keys' +import { CONFIRMED_STATUS, DROPPED_STATUS } from '../../helpers/constants/transactions' +import UserPreferencedCurrencyDisplay from '../../components/app/user-preferenced-currency-display' +import { PRIMARY, SECONDARY } from '../../helpers/constants/common' +import AdvancedGasInputs from '../../components/app/gas-customization/advanced-gas-inputs' export default class ConfirmTransactionBase extends Component { static contextTypes = { diff --git a/ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.container.js b/ui/app/pages/confirm-transaction-base/confirm-transaction-base.container.js similarity index 92% rename from ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.container.js rename to ui/app/pages/confirm-transaction-base/confirm-transaction-base.container.js index 22f509905..83543f1a4 100644 --- a/ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.container.js +++ b/ui/app/pages/confirm-transaction-base/confirm-transaction-base.container.js @@ -7,18 +7,18 @@ import ConfirmTransactionBase from './confirm-transaction-base.component' import { clearConfirmTransaction, updateGasAndCalculate, -} from '../../../ducks/confirm-transaction.duck' -import { clearSend, cancelTx, cancelTxs, updateAndApproveTx, showModal, setMetaMetricsSendCount } from '../../../actions' +} from '../../ducks/confirm-transaction/confirm-transaction.duck' +import { clearSend, cancelTx, cancelTxs, updateAndApproveTx, showModal, setMetaMetricsSendCount } from '../../store/actions' import { INSUFFICIENT_FUNDS_ERROR_KEY, GAS_LIMIT_TOO_LOW_ERROR_KEY, -} from '../../../constants/error-keys' -import { getHexGasTotal } from '../../../helpers/confirm-transaction/util' -import { isBalanceSufficient, calcGasTotal } from '../../send/send.utils' -import { conversionGreaterThan } from '../../../conversion-util' -import { MIN_GAS_LIMIT_DEC } from '../../send/send.constants' -import { checksumAddress, addressSlicer, valuesFor } from '../../../util' -import {getMetaMaskAccounts, getAdvancedInlineGasShown, preferencesSelector, getIsMainnet} from '../../../selectors' +} from '../../helpers/constants/error-keys' +import { getHexGasTotal } from '../../helpers/utils/confirm-tx.util' +import { isBalanceSufficient, calcGasTotal } from '../../components/app/send/send.utils' +import { conversionGreaterThan } from '../../helpers/utils/conversion-util' +import { MIN_GAS_LIMIT_DEC } from '../../components/app/send/send.constants' +import { checksumAddress, addressSlicer, valuesFor } from '../../helpers/utils/util' +import {getMetaMaskAccounts, getAdvancedInlineGasShown, preferencesSelector, getIsMainnet} from '../../selectors/selectors' const casedContractMap = Object.keys(contractMap).reduce((acc, base) => { return { diff --git a/ui/app/components/pages/confirm-transaction-base/index.js b/ui/app/pages/confirm-transaction-base/index.js similarity index 100% rename from ui/app/components/pages/confirm-transaction-base/index.js rename to ui/app/pages/confirm-transaction-base/index.js diff --git a/ui/app/components/pages/confirm-transaction-base/tests/confirm-transaction-base.component.test.js b/ui/app/pages/confirm-transaction-base/tests/confirm-transaction-base.component.test.js similarity index 100% rename from ui/app/components/pages/confirm-transaction-base/tests/confirm-transaction-base.component.test.js rename to ui/app/pages/confirm-transaction-base/tests/confirm-transaction-base.component.test.js diff --git a/ui/app/components/pages/confirm-transaction-switch/confirm-transaction-switch.component.js b/ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.component.js similarity index 92% rename from ui/app/components/pages/confirm-transaction-switch/confirm-transaction-switch.component.js rename to ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.component.js index cf79b94bc..cd471b822 100644 --- a/ui/app/components/pages/confirm-transaction-switch/confirm-transaction-switch.component.js +++ b/ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.component.js @@ -1,7 +1,7 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' import { Redirect } from 'react-router-dom' -import Loading from '../../loading-screen' +import Loading from '../../components/ui/loading-screen' import { CONFIRM_TRANSACTION_ROUTE, CONFIRM_DEPLOY_CONTRACT_PATH, @@ -11,13 +11,13 @@ import { CONFIRM_TRANSFER_FROM_PATH, CONFIRM_TOKEN_METHOD_PATH, SIGNATURE_REQUEST_PATH, -} from '../../../routes' -import { isConfirmDeployContract } from '../../../helpers/transactions.util' +} from '../../helpers/constants/routes' +import { isConfirmDeployContract } from '../../helpers/utils/transactions.util' import { TOKEN_METHOD_TRANSFER, TOKEN_METHOD_APPROVE, TOKEN_METHOD_TRANSFER_FROM, -} from '../../../constants/transactions' +} from '../../helpers/constants/transactions' export default class ConfirmTransactionSwitch extends Component { static propTypes = { diff --git a/ui/app/components/pages/confirm-transaction-switch/confirm-transaction-switch.container.js b/ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.container.js similarity index 100% rename from ui/app/components/pages/confirm-transaction-switch/confirm-transaction-switch.container.js rename to ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.container.js diff --git a/ui/app/components/pages/confirm-transaction-switch/confirm-transaction-switch.util.js b/ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.util.js similarity index 100% rename from ui/app/components/pages/confirm-transaction-switch/confirm-transaction-switch.util.js rename to ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.util.js diff --git a/ui/app/components/pages/confirm-transaction-switch/index.js b/ui/app/pages/confirm-transaction-switch/index.js similarity index 100% rename from ui/app/components/pages/confirm-transaction-switch/index.js rename to ui/app/pages/confirm-transaction-switch/index.js diff --git a/ui/app/conf-tx.js b/ui/app/pages/confirm-transaction/conf-tx.js similarity index 94% rename from ui/app/conf-tx.js rename to ui/app/pages/confirm-transaction/conf-tx.js index 34f5466e2..f9af6624e 100644 --- a/ui/app/conf-tx.js +++ b/ui/app/pages/confirm-transaction/conf-tx.js @@ -4,15 +4,15 @@ const h = require('react-hyperscript') const connect = require('react-redux').connect const { withRouter } = require('react-router-dom') const { compose } = require('recompose') -const actions = require('./actions') -const txHelper = require('../lib/tx-helper') +const actions = require('../../store/actions') +const txHelper = require('../../../lib/tx-helper') const log = require('loglevel') const R = require('ramda') -const SignatureRequest = require('./components/signature-request') -const Loading = require('./components/loading-screen') -const { DEFAULT_ROUTE } = require('./routes') -const { getMetaMaskAccounts } = require('./selectors') +const SignatureRequest = require('../../components/app/signature-request') +const Loading = require('../../components/ui/loading-screen') +const { DEFAULT_ROUTE } = require('../../helpers/constants/routes') +const { getMetaMaskAccounts } = require('../../selectors/selectors') module.exports = compose( withRouter, diff --git a/ui/app/components/pages/confirm-transaction/confirm-transaction.component.js b/ui/app/pages/confirm-transaction/confirm-transaction.component.js similarity index 97% rename from ui/app/components/pages/confirm-transaction/confirm-transaction.component.js rename to ui/app/pages/confirm-transaction/confirm-transaction.component.js index 2e460f377..35b8dc5aa 100644 --- a/ui/app/components/pages/confirm-transaction/confirm-transaction.component.js +++ b/ui/app/pages/confirm-transaction/confirm-transaction.component.js @@ -1,7 +1,7 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' import { Switch, Route } from 'react-router-dom' -import Loading from '../../loading-screen' +import Loading from '../../components/ui/loading-screen' import ConfirmTransactionSwitch from '../confirm-transaction-switch' import ConfirmTransactionBase from '../confirm-transaction-base' import ConfirmSendEther from '../confirm-send-ether' @@ -9,7 +9,7 @@ import ConfirmSendToken from '../confirm-send-token' import ConfirmDeployContract from '../confirm-deploy-contract' import ConfirmApprove from '../confirm-approve' import ConfirmTokenTransactionBase from '../confirm-token-transaction-base' -import ConfTx from '../../../conf-tx' +import ConfTx from './conf-tx' import { DEFAULT_ROUTE, CONFIRM_TRANSACTION_ROUTE, @@ -20,7 +20,7 @@ import { CONFIRM_TRANSFER_FROM_PATH, CONFIRM_TOKEN_METHOD_PATH, SIGNATURE_REQUEST_PATH, -} from '../../../routes' +} from '../../helpers/constants/routes' export default class ConfirmTransaction extends Component { static propTypes = { diff --git a/ui/app/components/pages/confirm-transaction/confirm-transaction.container.js b/ui/app/pages/confirm-transaction/confirm-transaction.container.js similarity index 79% rename from ui/app/components/pages/confirm-transaction/confirm-transaction.container.js rename to ui/app/pages/confirm-transaction/confirm-transaction.container.js index 46342dc76..2dd5e833e 100644 --- a/ui/app/components/pages/confirm-transaction/confirm-transaction.container.js +++ b/ui/app/pages/confirm-transaction/confirm-transaction.container.js @@ -4,13 +4,13 @@ import { withRouter } from 'react-router-dom' import { setTransactionToConfirm, clearConfirmTransaction, -} from '../../../ducks/confirm-transaction.duck' +} from '../../ducks/confirm-transaction/confirm-transaction.duck' import { fetchBasicGasAndTimeEstimates, -} from '../../../ducks/gas.duck' +} from '../../ducks/gas/gas.duck' import ConfirmTransaction from './confirm-transaction.component' -import { getTotalUnapprovedCount } from '../../../selectors' -import { unconfirmedTransactionsListSelector } from '../../../selectors/confirm-transaction' +import { getTotalUnapprovedCount } from '../../selectors/selectors' +import { unconfirmedTransactionsListSelector } from '../../selectors/confirm-transaction' const mapStateToProps = state => { const { metamask: { send }, confirmTransaction } = state diff --git a/ui/app/components/pages/confirm-transaction/index.js b/ui/app/pages/confirm-transaction/index.js similarity index 100% rename from ui/app/components/pages/confirm-transaction/index.js rename to ui/app/pages/confirm-transaction/index.js diff --git a/ui/app/components/pages/create-account/connect-hardware/account-list.js b/ui/app/pages/create-account/connect-hardware/account-list.js similarity index 98% rename from ui/app/components/pages/create-account/connect-hardware/account-list.js rename to ui/app/pages/create-account/connect-hardware/account-list.js index c63de234a..617fb8833 100644 --- a/ui/app/components/pages/create-account/connect-hardware/account-list.js +++ b/ui/app/pages/create-account/connect-hardware/account-list.js @@ -1,9 +1,9 @@ const { Component } = require('react') const PropTypes = require('prop-types') const h = require('react-hyperscript') -const genAccountLink = require('../../../../../lib/account-link.js') +const genAccountLink = require('../../../../lib/account-link.js') const Select = require('react-select').default -import Button from '../../../button' +import Button from '../../../components/ui/button' class AccountList extends Component { constructor (props, context) { diff --git a/ui/app/components/pages/create-account/connect-hardware/connect-screen.js b/ui/app/pages/create-account/connect-hardware/connect-screen.js similarity index 99% rename from ui/app/components/pages/create-account/connect-hardware/connect-screen.js rename to ui/app/pages/create-account/connect-hardware/connect-screen.js index 49a5610c1..7e9dee970 100644 --- a/ui/app/components/pages/create-account/connect-hardware/connect-screen.js +++ b/ui/app/pages/create-account/connect-hardware/connect-screen.js @@ -1,7 +1,7 @@ const { Component } = require('react') const PropTypes = require('prop-types') const h = require('react-hyperscript') -import Button from '../../../button' +import Button from '../../../components/ui/button' class ConnectScreen extends Component { constructor (props, context) { diff --git a/ui/app/components/pages/create-account/connect-hardware/index.js b/ui/app/pages/create-account/connect-hardware/index.js similarity index 95% rename from ui/app/components/pages/create-account/connect-hardware/index.js rename to ui/app/pages/create-account/connect-hardware/index.js index 712cc5cbb..1398fa680 100644 --- a/ui/app/components/pages/create-account/connect-hardware/index.js +++ b/ui/app/pages/create-account/connect-hardware/index.js @@ -2,14 +2,14 @@ const { Component } = require('react') const PropTypes = require('prop-types') const h = require('react-hyperscript') const connect = require('react-redux').connect -const actions = require('../../../../actions') -const { getMetaMaskAccounts } = require('../../../../selectors') +const actions = require('../../../store/actions') +const { getMetaMaskAccounts } = require('../../../selectors/selectors') const ConnectScreen = require('./connect-screen') const AccountList = require('./account-list') -const { DEFAULT_ROUTE } = require('../../../../routes') -const { formatBalance } = require('../../../../util') -const { getPlatform } = require('../../../../../../app/scripts/lib/util') -const { PLATFORM_FIREFOX } = require('../../../../../../app/scripts/lib/enums') +const { DEFAULT_ROUTE } = require('../../../helpers/constants/routes') +const { formatBalance } = require('../../../helpers/utils/util') +const { getPlatform } = require('../../../../../app/scripts/lib/util') +const { PLATFORM_FIREFOX } = require('../../../../../app/scripts/lib/enums') class ConnectHardwareForm extends Component { constructor (props, context) { diff --git a/ui/app/components/pages/create-account/import-account/index.js b/ui/app/pages/create-account/import-account/index.js similarity index 100% rename from ui/app/components/pages/create-account/import-account/index.js rename to ui/app/pages/create-account/import-account/index.js diff --git a/ui/app/components/pages/create-account/import-account/json.js b/ui/app/pages/create-account/import-account/json.js similarity index 94% rename from ui/app/components/pages/create-account/import-account/json.js rename to ui/app/pages/create-account/import-account/json.js index 9aeea5579..17bef763c 100644 --- a/ui/app/components/pages/create-account/import-account/json.js +++ b/ui/app/pages/create-account/import-account/json.js @@ -4,12 +4,12 @@ const h = require('react-hyperscript') const { withRouter } = require('react-router-dom') const { compose } = require('recompose') const connect = require('react-redux').connect -const actions = require('../../../../actions') +const actions = require('../../../store/actions') const FileInput = require('react-simple-file-input').default -const { DEFAULT_ROUTE } = require('../../../../routes') -const { getMetaMaskAccounts } = require('../../../../selectors') +const { DEFAULT_ROUTE } = require('../../../helpers/constants/routes') +const { getMetaMaskAccounts } = require('../../../selectors/selectors') const HELP_LINK = 'https://support.metamask.io/kb/article/7-importing-accounts' -import Button from '../../../button' +import Button from '../../../components/ui/button' class JsonImportSubview extends Component { constructor (props) { diff --git a/ui/app/components/pages/create-account/import-account/private-key.js b/ui/app/pages/create-account/import-account/private-key.js similarity index 93% rename from ui/app/components/pages/create-account/import-account/private-key.js rename to ui/app/pages/create-account/import-account/private-key.js index 4ba31806f..450614e87 100644 --- a/ui/app/components/pages/create-account/import-account/private-key.js +++ b/ui/app/pages/create-account/import-account/private-key.js @@ -5,10 +5,10 @@ const { withRouter } = require('react-router-dom') const { compose } = require('recompose') const PropTypes = require('prop-types') const connect = require('react-redux').connect -const actions = require('../../../../actions') -const { DEFAULT_ROUTE } = require('../../../../routes') -const { getMetaMaskAccounts } = require('../../../../selectors') -import Button from '../../../button' +const actions = require('../../../store/actions') +const { DEFAULT_ROUTE } = require('../../../helpers/constants/routes') +const { getMetaMaskAccounts } = require('../../../selectors/selectors') +import Button from '../../../components/ui/button' PrivateKeyImportView.contextTypes = { t: PropTypes.func, diff --git a/ui/app/components/pages/create-account/import-account/seed.js b/ui/app/pages/create-account/import-account/seed.js similarity index 100% rename from ui/app/components/pages/create-account/import-account/seed.js rename to ui/app/pages/create-account/import-account/seed.js diff --git a/ui/app/components/pages/create-account/index.js b/ui/app/pages/create-account/index.js similarity index 95% rename from ui/app/components/pages/create-account/index.js rename to ui/app/pages/create-account/index.js index d3de1ea01..ce84db028 100644 --- a/ui/app/components/pages/create-account/index.js +++ b/ui/app/pages/create-account/index.js @@ -3,8 +3,8 @@ const { Switch, Route, matchPath } = require('react-router-dom') const PropTypes = require('prop-types') const h = require('react-hyperscript') const connect = require('react-redux').connect -const actions = require('../../../actions') -const { getCurrentViewContext } = require('../../../selectors') +const actions = require('../../store/actions') +const { getCurrentViewContext } = require('../../selectors/selectors') const classnames = require('classnames') const NewAccountCreateForm = require('./new-account') const NewAccountImportForm = require('./import-account') @@ -13,7 +13,7 @@ const { NEW_ACCOUNT_ROUTE, IMPORT_ACCOUNT_ROUTE, CONNECT_HARDWARE_ROUTE, -} = require('../../../routes') +} = require('../../helpers/constants/routes') class CreateAccountPage extends Component { renderTabs () { diff --git a/ui/app/components/pages/create-account/new-account.js b/ui/app/pages/create-account/new-account.js similarity index 95% rename from ui/app/components/pages/create-account/new-account.js rename to ui/app/pages/create-account/new-account.js index a7595e346..316fbe6f1 100644 --- a/ui/app/components/pages/create-account/new-account.js +++ b/ui/app/pages/create-account/new-account.js @@ -2,9 +2,9 @@ const { Component } = require('react') const PropTypes = require('prop-types') const h = require('react-hyperscript') const connect = require('react-redux').connect -const actions = require('../../../actions') -const { DEFAULT_ROUTE } = require('../../../routes') -import Button from '../../button' +const actions = require('../../store/actions') +const { DEFAULT_ROUTE } = require('../../helpers/constants/routes') +import Button from '../../components/ui/button' class NewAccountCreateForm extends Component { constructor (props, context) { diff --git a/ui/app/components/pages/first-time-flow/create-password/create-password.component.js b/ui/app/pages/first-time-flow/create-password/create-password.component.js similarity index 97% rename from ui/app/components/pages/first-time-flow/create-password/create-password.component.js rename to ui/app/pages/first-time-flow/create-password/create-password.component.js index 070361652..5e67a2244 100644 --- a/ui/app/components/pages/first-time-flow/create-password/create-password.component.js +++ b/ui/app/pages/first-time-flow/create-password/create-password.component.js @@ -7,7 +7,7 @@ import { INITIALIZE_CREATE_PASSWORD_ROUTE, INITIALIZE_IMPORT_WITH_SEED_PHRASE_ROUTE, INITIALIZE_SEED_PHRASE_ROUTE, -} from '../../../../routes' +} from '../../../helpers/constants/routes' export default class CreatePassword extends PureComponent { static propTypes = { diff --git a/ui/app/components/pages/first-time-flow/create-password/create-password.container.js b/ui/app/pages/first-time-flow/create-password/create-password.container.js similarity index 100% rename from ui/app/components/pages/first-time-flow/create-password/create-password.container.js rename to ui/app/pages/first-time-flow/create-password/create-password.container.js diff --git a/ui/app/components/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js b/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js similarity index 97% rename from ui/app/components/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js rename to ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js index 4ecaa5895..433dad6e2 100644 --- a/ui/app/components/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js +++ b/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js @@ -1,12 +1,12 @@ import {validateMnemonic} from 'bip39' import React, { PureComponent } from 'react' import PropTypes from 'prop-types' -import TextField from '../../../../text-field' -import Button from '../../../../button' +import TextField from '../../../../components/ui/text-field' +import Button from '../../../../components/ui/button' import { INITIALIZE_SELECT_ACTION_ROUTE, INITIALIZE_END_OF_FLOW_ROUTE, -} from '../../../../../routes' +} from '../../../../helpers/constants/routes' export default class ImportWithSeedPhrase extends PureComponent { static contextTypes = { diff --git a/ui/app/components/pages/first-time-flow/create-password/import-with-seed-phrase/index.js b/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/index.js similarity index 100% rename from ui/app/components/pages/first-time-flow/create-password/import-with-seed-phrase/index.js rename to ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/index.js diff --git a/ui/app/components/pages/first-time-flow/create-password/index.js b/ui/app/pages/first-time-flow/create-password/index.js similarity index 100% rename from ui/app/components/pages/first-time-flow/create-password/index.js rename to ui/app/pages/first-time-flow/create-password/index.js diff --git a/ui/app/components/pages/first-time-flow/create-password/new-account/index.js b/ui/app/pages/first-time-flow/create-password/new-account/index.js similarity index 100% rename from ui/app/components/pages/first-time-flow/create-password/new-account/index.js rename to ui/app/pages/first-time-flow/create-password/new-account/index.js diff --git a/ui/app/components/pages/first-time-flow/create-password/new-account/new-account.component.js b/ui/app/pages/first-time-flow/create-password/new-account/new-account.component.js similarity index 97% rename from ui/app/components/pages/first-time-flow/create-password/new-account/new-account.component.js rename to ui/app/pages/first-time-flow/create-password/new-account/new-account.component.js index 11d10e2d9..c040cff88 100644 --- a/ui/app/components/pages/first-time-flow/create-password/new-account/new-account.component.js +++ b/ui/app/pages/first-time-flow/create-password/new-account/new-account.component.js @@ -1,12 +1,12 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' -import Button from '../../../../button' +import Button from '../../../../components/ui/button' import { INITIALIZE_SEED_PHRASE_ROUTE, INITIALIZE_IMPORT_WITH_SEED_PHRASE_ROUTE, INITIALIZE_SELECT_ACTION_ROUTE, -} from '../../../../../routes' -import TextField from '../../../../text-field' +} from '../../../../helpers/constants/routes' +import TextField from '../../../../components/ui/text-field' export default class NewAccount extends PureComponent { static contextTypes = { diff --git a/ui/app/components/pages/first-time-flow/create-password/unique-image/index.js b/ui/app/pages/first-time-flow/create-password/unique-image/index.js similarity index 100% rename from ui/app/components/pages/first-time-flow/create-password/unique-image/index.js rename to ui/app/pages/first-time-flow/create-password/unique-image/index.js diff --git a/ui/app/components/pages/first-time-flow/create-password/unique-image/unique-image.component.js b/ui/app/pages/first-time-flow/create-password/unique-image/unique-image.component.js similarity index 90% rename from ui/app/components/pages/first-time-flow/create-password/unique-image/unique-image.component.js rename to ui/app/pages/first-time-flow/create-password/unique-image/unique-image.component.js index cbc85c0e4..3434d117a 100644 --- a/ui/app/components/pages/first-time-flow/create-password/unique-image/unique-image.component.js +++ b/ui/app/pages/first-time-flow/create-password/unique-image/unique-image.component.js @@ -1,7 +1,7 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' -import Button from '../../../../button' -import { INITIALIZE_END_OF_FLOW_ROUTE } from '../../../../../routes' +import Button from '../../../../components/ui/button' +import { INITIALIZE_END_OF_FLOW_ROUTE } from '../../../../helpers/constants/routes' export default class UniqueImageScreen extends PureComponent { static contextTypes = { diff --git a/ui/app/components/pages/first-time-flow/create-password/unique-image/unique-image.container.js b/ui/app/pages/first-time-flow/create-password/unique-image/unique-image.container.js similarity index 100% rename from ui/app/components/pages/first-time-flow/create-password/unique-image/unique-image.container.js rename to ui/app/pages/first-time-flow/create-password/unique-image/unique-image.container.js diff --git a/ui/app/components/pages/first-time-flow/end-of-flow/end-of-flow.component.js b/ui/app/pages/first-time-flow/end-of-flow/end-of-flow.component.js similarity index 96% rename from ui/app/components/pages/first-time-flow/end-of-flow/end-of-flow.component.js rename to ui/app/pages/first-time-flow/end-of-flow/end-of-flow.component.js index c0e2f59d9..c4292331b 100644 --- a/ui/app/components/pages/first-time-flow/end-of-flow/end-of-flow.component.js +++ b/ui/app/pages/first-time-flow/end-of-flow/end-of-flow.component.js @@ -1,7 +1,7 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' -import Button from '../../../button' -import { DEFAULT_ROUTE } from '../../../../routes' +import Button from '../../../components/ui/button' +import { DEFAULT_ROUTE } from '../../../helpers/constants/routes' export default class EndOfFlowScreen extends PureComponent { static contextTypes = { diff --git a/ui/app/components/pages/first-time-flow/end-of-flow/end-of-flow.container.js b/ui/app/pages/first-time-flow/end-of-flow/end-of-flow.container.js similarity index 89% rename from ui/app/components/pages/first-time-flow/end-of-flow/end-of-flow.container.js rename to ui/app/pages/first-time-flow/end-of-flow/end-of-flow.container.js index 91ae5a941..38313806c 100644 --- a/ui/app/components/pages/first-time-flow/end-of-flow/end-of-flow.container.js +++ b/ui/app/pages/first-time-flow/end-of-flow/end-of-flow.container.js @@ -1,6 +1,6 @@ import { connect } from 'react-redux' import EndOfFlow from './end-of-flow.component' -import { setCompletedOnboarding } from '../../../../actions' +import { setCompletedOnboarding } from '../../../store/actions' const firstTimeFlowTypeNameMap = { create: 'New Wallet Created', diff --git a/ui/app/components/pages/first-time-flow/end-of-flow/index.js b/ui/app/pages/first-time-flow/end-of-flow/index.js similarity index 100% rename from ui/app/components/pages/first-time-flow/end-of-flow/index.js rename to ui/app/pages/first-time-flow/end-of-flow/index.js diff --git a/ui/app/components/pages/first-time-flow/end-of-flow/index.scss b/ui/app/pages/first-time-flow/end-of-flow/index.scss similarity index 100% rename from ui/app/components/pages/first-time-flow/end-of-flow/index.scss rename to ui/app/pages/first-time-flow/end-of-flow/index.scss diff --git a/ui/app/components/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.component.js b/ui/app/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.component.js similarity index 97% rename from ui/app/components/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.component.js rename to ui/app/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.component.js index 5c2294393..4fd028482 100644 --- a/ui/app/components/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.component.js +++ b/ui/app/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.component.js @@ -8,7 +8,7 @@ import { INITIALIZE_UNLOCK_ROUTE, INITIALIZE_SEED_PHRASE_ROUTE, INITIALIZE_METAMETRICS_OPT_IN_ROUTE, -} from '../../../../routes' +} from '../../../helpers/constants/routes' export default class FirstTimeFlowSwitch extends PureComponent { static propTypes = { diff --git a/ui/app/components/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.container.js b/ui/app/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.container.js similarity index 100% rename from ui/app/components/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.container.js rename to ui/app/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.container.js diff --git a/ui/app/components/pages/first-time-flow/first-time-flow-switch/index.js b/ui/app/pages/first-time-flow/first-time-flow-switch/index.js similarity index 100% rename from ui/app/components/pages/first-time-flow/first-time-flow-switch/index.js rename to ui/app/pages/first-time-flow/first-time-flow-switch/index.js diff --git a/ui/app/components/pages/first-time-flow/first-time-flow.component.js b/ui/app/pages/first-time-flow/first-time-flow.component.js similarity index 99% rename from ui/app/components/pages/first-time-flow/first-time-flow.component.js rename to ui/app/pages/first-time-flow/first-time-flow.component.js index a1f629431..bf6e80ca9 100644 --- a/ui/app/components/pages/first-time-flow/first-time-flow.component.js +++ b/ui/app/pages/first-time-flow/first-time-flow.component.js @@ -18,7 +18,7 @@ import { INITIALIZE_SELECT_ACTION_ROUTE, INITIALIZE_END_OF_FLOW_ROUTE, INITIALIZE_METAMETRICS_OPT_IN_ROUTE, -} from '../../../routes' +} from '../../helpers/constants/routes' export default class FirstTimeFlow extends PureComponent { static propTypes = { diff --git a/ui/app/components/pages/first-time-flow/first-time-flow.container.js b/ui/app/pages/first-time-flow/first-time-flow.container.js similarity index 97% rename from ui/app/components/pages/first-time-flow/first-time-flow.container.js rename to ui/app/pages/first-time-flow/first-time-flow.container.js index 293f94c47..16025a489 100644 --- a/ui/app/components/pages/first-time-flow/first-time-flow.container.js +++ b/ui/app/pages/first-time-flow/first-time-flow.container.js @@ -5,7 +5,7 @@ import { createNewVaultAndGetSeedPhrase, createNewVaultAndRestore, unlockAndGetSeedPhrase, -} from '../../../actions' +} from '../../store/actions' const mapStateToProps = state => { const { metamask: { completedOnboarding, isInitialized, isUnlocked } } = state diff --git a/ui/app/components/pages/first-time-flow/first-time-flow.selectors.js b/ui/app/pages/first-time-flow/first-time-flow.selectors.js similarity index 93% rename from ui/app/components/pages/first-time-flow/first-time-flow.selectors.js rename to ui/app/pages/first-time-flow/first-time-flow.selectors.js index 1286afed9..e6cd5a84a 100644 --- a/ui/app/components/pages/first-time-flow/first-time-flow.selectors.js +++ b/ui/app/pages/first-time-flow/first-time-flow.selectors.js @@ -2,7 +2,7 @@ import { INITIALIZE_CREATE_PASSWORD_ROUTE, INITIALIZE_IMPORT_WITH_SEED_PHRASE_ROUTE, DEFAULT_ROUTE, -} from '../../../routes' +} from '../../helpers/constants/routes' const selectors = { getFirstTimeFlowTypeRoute, diff --git a/ui/app/components/pages/first-time-flow/index.js b/ui/app/pages/first-time-flow/index.js similarity index 100% rename from ui/app/components/pages/first-time-flow/index.js rename to ui/app/pages/first-time-flow/index.js diff --git a/ui/app/components/pages/first-time-flow/index.scss b/ui/app/pages/first-time-flow/index.scss similarity index 93% rename from ui/app/components/pages/first-time-flow/index.scss rename to ui/app/pages/first-time-flow/index.scss index d41748575..6c65cfdae 100644 --- a/ui/app/components/pages/first-time-flow/index.scss +++ b/ui/app/pages/first-time-flow/index.scss @@ -1,12 +1,12 @@ -@import './welcome/index'; +@import 'welcome/index'; -@import './select-action/index'; +@import 'select-action/index'; -@import './seed-phrase/index'; +@import 'seed-phrase/index'; -@import './end-of-flow/index'; +@import 'end-of-flow/index'; -@import './metametrics-opt-in/index'; +@import 'metametrics-opt-in/index'; .first-time-flow { diff --git a/ui/app/components/pages/first-time-flow/metametrics-opt-in/index.js b/ui/app/pages/first-time-flow/metametrics-opt-in/index.js similarity index 100% rename from ui/app/components/pages/first-time-flow/metametrics-opt-in/index.js rename to ui/app/pages/first-time-flow/metametrics-opt-in/index.js diff --git a/ui/app/components/pages/first-time-flow/metametrics-opt-in/index.scss b/ui/app/pages/first-time-flow/metametrics-opt-in/index.scss similarity index 100% rename from ui/app/components/pages/first-time-flow/metametrics-opt-in/index.scss rename to ui/app/pages/first-time-flow/metametrics-opt-in/index.scss diff --git a/ui/app/components/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.component.js b/ui/app/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.component.js similarity index 98% rename from ui/app/components/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.component.js rename to ui/app/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.component.js index 2b4af27ad..19c668278 100644 --- a/ui/app/components/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.component.js +++ b/ui/app/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.component.js @@ -1,6 +1,6 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' -import PageContainerFooter from '../../../page-container/page-container-footer' +import PageContainerFooter from '../../../components/ui/page-container/page-container-footer' export default class MetaMetricsOptIn extends Component { static propTypes = { diff --git a/ui/app/components/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.container.js b/ui/app/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.container.js similarity index 92% rename from ui/app/components/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.container.js rename to ui/app/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.container.js index b13af8bf6..2566a2a56 100644 --- a/ui/app/components/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.container.js +++ b/ui/app/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.container.js @@ -1,6 +1,6 @@ import { connect } from 'react-redux' import MetaMetricsOptIn from './metametrics-opt-in.component' -import { setParticipateInMetaMetrics } from '../../../../actions' +import { setParticipateInMetaMetrics } from '../../../store/actions' import { getFirstTimeFlowTypeRoute } from '../first-time-flow.selectors' const firstTimeFlowTypeNameMap = { diff --git a/ui/app/components/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.component.js b/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.component.js similarity index 96% rename from ui/app/components/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.component.js rename to ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.component.js index bd5ab8a84..59b4f73a6 100644 --- a/ui/app/components/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.component.js +++ b/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.component.js @@ -2,12 +2,12 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' import shuffle from 'lodash.shuffle' -import Button from '../../../../button' +import Button from '../../../../components/ui/button' import { INITIALIZE_END_OF_FLOW_ROUTE, INITIALIZE_SEED_PHRASE_ROUTE, -} from '../../../../../routes' -import { exportAsFile } from '../../../../../../app/util' +} from '../../../../helpers/constants/routes' +import { exportAsFile } from '../../../../helpers/utils/util' import { selectSeedWord, deselectSeedWord } from './confirm-seed-phrase.state' export default class ConfirmSeedPhrase extends PureComponent { diff --git a/ui/app/components/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.state.js b/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.state.js similarity index 100% rename from ui/app/components/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.state.js rename to ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.state.js diff --git a/ui/app/components/pages/first-time-flow/seed-phrase/confirm-seed-phrase/index.js b/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/index.js similarity index 100% rename from ui/app/components/pages/first-time-flow/seed-phrase/confirm-seed-phrase/index.js rename to ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/index.js diff --git a/ui/app/components/pages/first-time-flow/seed-phrase/confirm-seed-phrase/index.scss b/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/index.scss similarity index 100% rename from ui/app/components/pages/first-time-flow/seed-phrase/confirm-seed-phrase/index.scss rename to ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/index.scss diff --git a/ui/app/components/pages/first-time-flow/seed-phrase/index.js b/ui/app/pages/first-time-flow/seed-phrase/index.js similarity index 100% rename from ui/app/components/pages/first-time-flow/seed-phrase/index.js rename to ui/app/pages/first-time-flow/seed-phrase/index.js diff --git a/ui/app/components/pages/first-time-flow/seed-phrase/index.scss b/ui/app/pages/first-time-flow/seed-phrase/index.scss similarity index 87% rename from ui/app/components/pages/first-time-flow/seed-phrase/index.scss rename to ui/app/pages/first-time-flow/seed-phrase/index.scss index e4fd7be4f..24da45ded 100644 --- a/ui/app/components/pages/first-time-flow/seed-phrase/index.scss +++ b/ui/app/pages/first-time-flow/seed-phrase/index.scss @@ -1,6 +1,6 @@ -@import './confirm-seed-phrase/index'; +@import 'confirm-seed-phrase/index'; -@import './reveal-seed-phrase/index'; +@import 'reveal-seed-phrase/index'; .seed-phrase { diff --git a/ui/app/components/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.js b/ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.js similarity index 100% rename from ui/app/components/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.js rename to ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.js diff --git a/ui/app/components/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.scss b/ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.scss similarity index 100% rename from ui/app/components/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.scss rename to ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.scss diff --git a/ui/app/components/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.component.js b/ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.component.js similarity index 95% rename from ui/app/components/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.component.js rename to ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.component.js index cb8a01322..ee352d74e 100644 --- a/ui/app/components/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.component.js +++ b/ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.component.js @@ -1,10 +1,10 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' -import LockIcon from '../../../../lock-icon' -import Button from '../../../../button' -import { INITIALIZE_CONFIRM_SEED_PHRASE_ROUTE } from '../../../../../routes' -import { exportAsFile } from '../../../../../../app/util' +import LockIcon from '../../../../components/ui/lock-icon' +import Button from '../../../../components/ui/button' +import { INITIALIZE_CONFIRM_SEED_PHRASE_ROUTE } from '../../../../helpers/constants/routes' +import { exportAsFile } from '../../../../helpers/utils/util' export default class RevealSeedPhrase extends PureComponent { static contextTypes = { diff --git a/ui/app/components/pages/first-time-flow/seed-phrase/seed-phrase.component.js b/ui/app/pages/first-time-flow/seed-phrase/seed-phrase.component.js similarity index 97% rename from ui/app/components/pages/first-time-flow/seed-phrase/seed-phrase.component.js rename to ui/app/pages/first-time-flow/seed-phrase/seed-phrase.component.js index 9eec89cdd..9a9f84049 100644 --- a/ui/app/components/pages/first-time-flow/seed-phrase/seed-phrase.component.js +++ b/ui/app/pages/first-time-flow/seed-phrase/seed-phrase.component.js @@ -7,7 +7,7 @@ import { INITIALIZE_SEED_PHRASE_ROUTE, INITIALIZE_CONFIRM_SEED_PHRASE_ROUTE, DEFAULT_ROUTE, -} from '../../../../routes' +} from '../../../helpers/constants/routes' export default class SeedPhrase extends PureComponent { static propTypes = { diff --git a/ui/app/components/pages/first-time-flow/select-action/index.js b/ui/app/pages/first-time-flow/select-action/index.js similarity index 100% rename from ui/app/components/pages/first-time-flow/select-action/index.js rename to ui/app/pages/first-time-flow/select-action/index.js diff --git a/ui/app/components/pages/first-time-flow/select-action/index.scss b/ui/app/pages/first-time-flow/select-action/index.scss similarity index 100% rename from ui/app/components/pages/first-time-flow/select-action/index.scss rename to ui/app/pages/first-time-flow/select-action/index.scss diff --git a/ui/app/components/pages/first-time-flow/select-action/select-action.component.js b/ui/app/pages/first-time-flow/select-action/select-action.component.js similarity index 97% rename from ui/app/components/pages/first-time-flow/select-action/select-action.component.js rename to ui/app/pages/first-time-flow/select-action/select-action.component.js index b6a6942c3..b25a15514 100644 --- a/ui/app/components/pages/first-time-flow/select-action/select-action.component.js +++ b/ui/app/pages/first-time-flow/select-action/select-action.component.js @@ -1,9 +1,9 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' -import Button from '../../../button' +import Button from '../../../components/ui/button' import { INITIALIZE_METAMETRICS_OPT_IN_ROUTE, -} from '../../../../routes' +} from '../../../helpers/constants/routes' export default class SelectAction extends PureComponent { static propTypes = { diff --git a/ui/app/components/pages/first-time-flow/select-action/select-action.container.js b/ui/app/pages/first-time-flow/select-action/select-action.container.js similarity index 90% rename from ui/app/components/pages/first-time-flow/select-action/select-action.container.js rename to ui/app/pages/first-time-flow/select-action/select-action.container.js index 42fac7af2..9dc988430 100644 --- a/ui/app/components/pages/first-time-flow/select-action/select-action.container.js +++ b/ui/app/pages/first-time-flow/select-action/select-action.container.js @@ -1,7 +1,7 @@ import { connect } from 'react-redux' import { withRouter } from 'react-router-dom' import { compose } from 'recompose' -import { setFirstTimeFlowType } from '../../../../actions' +import { setFirstTimeFlowType } from '../../../store/actions' import { getFirstTimeFlowTypeRoute } from '../first-time-flow.selectors' import Welcome from './select-action.component' diff --git a/ui/app/components/pages/first-time-flow/welcome/index.js b/ui/app/pages/first-time-flow/welcome/index.js similarity index 100% rename from ui/app/components/pages/first-time-flow/welcome/index.js rename to ui/app/pages/first-time-flow/welcome/index.js diff --git a/ui/app/components/pages/first-time-flow/welcome/index.scss b/ui/app/pages/first-time-flow/welcome/index.scss similarity index 100% rename from ui/app/components/pages/first-time-flow/welcome/index.scss rename to ui/app/pages/first-time-flow/welcome/index.scss diff --git a/ui/app/components/pages/first-time-flow/welcome/welcome.component.js b/ui/app/pages/first-time-flow/welcome/welcome.component.js similarity index 91% rename from ui/app/components/pages/first-time-flow/welcome/welcome.component.js rename to ui/app/pages/first-time-flow/welcome/welcome.component.js index 88cdb936c..3b8d6eb17 100644 --- a/ui/app/components/pages/first-time-flow/welcome/welcome.component.js +++ b/ui/app/pages/first-time-flow/welcome/welcome.component.js @@ -1,9 +1,9 @@ import EventEmitter from 'events' import React, { PureComponent } from 'react' import PropTypes from 'prop-types' -import Mascot from '../../../mascot' -import Button from '../../../button' -import { INITIALIZE_CREATE_PASSWORD_ROUTE, INITIALIZE_SELECT_ACTION_ROUTE } from '../../../../routes' +import Mascot from '../../../components/ui/mascot' +import Button from '../../../components/ui/button' +import { INITIALIZE_CREATE_PASSWORD_ROUTE, INITIALIZE_SELECT_ACTION_ROUTE } from '../../../helpers/constants/routes' export default class Welcome extends PureComponent { static propTypes = { diff --git a/ui/app/components/pages/first-time-flow/welcome/welcome.container.js b/ui/app/pages/first-time-flow/welcome/welcome.container.js similarity index 90% rename from ui/app/components/pages/first-time-flow/welcome/welcome.container.js rename to ui/app/pages/first-time-flow/welcome/welcome.container.js index 47753e16f..ce4b2b471 100644 --- a/ui/app/components/pages/first-time-flow/welcome/welcome.container.js +++ b/ui/app/pages/first-time-flow/welcome/welcome.container.js @@ -1,7 +1,7 @@ import { connect } from 'react-redux' import { withRouter } from 'react-router-dom' import { compose } from 'recompose' -import { closeWelcomeScreen } from '../../../../actions' +import { closeWelcomeScreen } from '../../../store/actions' import Welcome from './welcome.component' const mapStateToProps = ({ metamask }) => { diff --git a/ui/app/components/pages/home/home.component.js b/ui/app/pages/home/home.component.js similarity index 91% rename from ui/app/components/pages/home/home.component.js rename to ui/app/pages/home/home.component.js index 953d43aba..29d93a9fa 100644 --- a/ui/app/components/pages/home/home.component.js +++ b/ui/app/pages/home/home.component.js @@ -2,8 +2,8 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' import Media from 'react-media' import { Redirect } from 'react-router-dom' -import WalletView from '../../wallet-view' -import TransactionView from '../../transaction-view' +import WalletView from '../../components/app/wallet-view' +import TransactionView from '../../components/app/transaction-view' import ProviderApproval from '../provider-approval' import { @@ -11,7 +11,7 @@ import { RESTORE_VAULT_ROUTE, CONFIRM_TRANSACTION_ROUTE, CONFIRM_ADD_SUGGESTED_TOKEN_ROUTE, -} from '../../../routes' +} from '../../helpers/constants/routes' export default class Home extends PureComponent { static propTypes = { diff --git a/ui/app/components/pages/home/home.container.js b/ui/app/pages/home/home.container.js similarity index 87% rename from ui/app/components/pages/home/home.container.js rename to ui/app/pages/home/home.container.js index bb8cf5e81..02ec4b9c6 100644 --- a/ui/app/components/pages/home/home.container.js +++ b/ui/app/pages/home/home.container.js @@ -2,7 +2,7 @@ import Home from './home.component' import { compose } from 'recompose' import { connect } from 'react-redux' import { withRouter } from 'react-router-dom' -import { unconfirmedTransactionsCountSelector } from '../../../selectors/confirm-transaction' +import { unconfirmedTransactionsCountSelector } from '../../selectors/confirm-transaction' const mapStateToProps = state => { const { metamask, appState } = state diff --git a/ui/app/components/pages/home/index.js b/ui/app/pages/home/index.js similarity index 100% rename from ui/app/components/pages/home/index.js rename to ui/app/pages/home/index.js diff --git a/ui/app/pages/index.js b/ui/app/pages/index.js new file mode 100644 index 000000000..56fc4af04 --- /dev/null +++ b/ui/app/pages/index.js @@ -0,0 +1,31 @@ +import React, { Component } from 'react' +const PropTypes = require('prop-types') +const { Provider } = require('react-redux') +const { HashRouter } = require('react-router-dom') +const Routes = require('./routes') +const I18nProvider = require('../helpers/higher-order-components/i18n-provider') +const MetaMetricsProvider = require('../helpers/higher-order-components/metametrics/metametrics.provider') + +class Index extends Component { + render () { + const { store } = this.props + + return ( + + + + + + + + + + ) + } +} + +Index.propTypes = { + store: PropTypes.object, +} + +module.exports = Index diff --git a/ui/app/pages/index.scss b/ui/app/pages/index.scss new file mode 100644 index 000000000..cb9f0d80c --- /dev/null +++ b/ui/app/pages/index.scss @@ -0,0 +1,11 @@ +@import 'unlock-page/index'; + +@import 'add-token/index'; + +@import 'confirm-add-token/index'; + +@import 'settings/index'; + +@import 'first-time-flow/index'; + +@import 'keychains/index'; diff --git a/ui/app/components/pages/keychains/index.scss b/ui/app/pages/keychains/index.scss similarity index 100% rename from ui/app/components/pages/keychains/index.scss rename to ui/app/pages/keychains/index.scss diff --git a/ui/app/components/pages/keychains/restore-vault.js b/ui/app/pages/keychains/restore-vault.js similarity index 96% rename from ui/app/components/pages/keychains/restore-vault.js rename to ui/app/pages/keychains/restore-vault.js index 73ff5191a..574949258 100644 --- a/ui/app/components/pages/keychains/restore-vault.js +++ b/ui/app/pages/keychains/restore-vault.js @@ -4,10 +4,10 @@ import {connect} from 'react-redux' import { createNewVaultAndRestore, unMarkPasswordForgotten, -} from '../../../actions' -import { DEFAULT_ROUTE } from '../../../routes' -import TextField from '../../text-field' -import Button from '../../button' +} from '../../store/actions' +import { DEFAULT_ROUTE } from '../../helpers/constants/routes' +import TextField from '../../components/ui/text-field' +import Button from '../../components/ui/button' class RestoreVaultPage extends Component { static contextTypes = { diff --git a/ui/app/components/pages/keychains/reveal-seed.js b/ui/app/pages/keychains/reveal-seed.js similarity index 94% rename from ui/app/components/pages/keychains/reveal-seed.js rename to ui/app/pages/keychains/reveal-seed.js index 32557066f..edc9db5a0 100644 --- a/ui/app/components/pages/keychains/reveal-seed.js +++ b/ui/app/pages/keychains/reveal-seed.js @@ -4,11 +4,11 @@ const PropTypes = require('prop-types') const h = require('react-hyperscript') const classnames = require('classnames') -const { requestRevealSeedWords } = require('../../../actions') -const { DEFAULT_ROUTE } = require('../../../routes') -const ExportTextContainer = require('../../export-text-container') +const { requestRevealSeedWords } = require('../../store/actions') +const { DEFAULT_ROUTE } = require('../../helpers/constants/routes') +const ExportTextContainer = require('../../components/ui/export-text-container') -import Button from '../../button' +import Button from '../../components/ui/button' const PASSWORD_PROMPT_SCREEN = 'PASSWORD_PROMPT_SCREEN' const REVEAL_SEED_SCREEN = 'REVEAL_SEED_SCREEN' diff --git a/ui/app/components/pages/lock/index.js b/ui/app/pages/lock/index.js similarity index 100% rename from ui/app/components/pages/lock/index.js rename to ui/app/pages/lock/index.js diff --git a/ui/app/components/pages/lock/lock.component.js b/ui/app/pages/lock/lock.component.js similarity index 81% rename from ui/app/components/pages/lock/lock.component.js rename to ui/app/pages/lock/lock.component.js index 51f8742ed..1145158c5 100644 --- a/ui/app/components/pages/lock/lock.component.js +++ b/ui/app/pages/lock/lock.component.js @@ -1,7 +1,7 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' -import Loading from '../../loading-screen' -import { DEFAULT_ROUTE } from '../../../routes' +import Loading from '../../components/ui/loading-screen' +import { DEFAULT_ROUTE } from '../../helpers/constants/routes' export default class Lock extends PureComponent { static propTypes = { diff --git a/ui/app/components/pages/lock/lock.container.js b/ui/app/pages/lock/lock.container.js similarity index 90% rename from ui/app/components/pages/lock/lock.container.js rename to ui/app/pages/lock/lock.container.js index 81d89ba21..6a20b6ed1 100644 --- a/ui/app/components/pages/lock/lock.container.js +++ b/ui/app/pages/lock/lock.container.js @@ -2,7 +2,7 @@ import Lock from './lock.component' import { compose } from 'recompose' import { connect } from 'react-redux' import { withRouter } from 'react-router-dom' -import { lockMetamask } from '../../../actions' +import { lockMetamask } from '../../store/actions' const mapStateToProps = state => { const { metamask: { isUnlocked } } = state diff --git a/ui/app/components/pages/mobile-sync/index.js b/ui/app/pages/mobile-sync/index.js similarity index 97% rename from ui/app/components/pages/mobile-sync/index.js rename to ui/app/pages/mobile-sync/index.js index 22a69d092..0938ad103 100644 --- a/ui/app/components/pages/mobile-sync/index.js +++ b/ui/app/pages/mobile-sync/index.js @@ -5,14 +5,14 @@ const h = require('react-hyperscript') const classnames = require('classnames') const PubNub = require('pubnub') -const { requestRevealSeedWords, fetchInfoToSync } = require('../../../actions') -const { DEFAULT_ROUTE } = require('../../../routes') -const actions = require('../../../actions') +const { requestRevealSeedWords, fetchInfoToSync } = require('../../store/actions') +const { DEFAULT_ROUTE } = require('../../helpers/constants/routes') +const actions = require('../../store/actions') const qrCode = require('qrcode-generator') -import Button from '../../button' -import LoadingScreen from '../../loading-screen' +import Button from '../../components/ui/button' +import LoadingScreen from '../../components/ui/loading-screen' const PASSWORD_PROMPT_SCREEN = 'PASSWORD_PROMPT_SCREEN' const REVEAL_SEED_SCREEN = 'REVEAL_SEED_SCREEN' diff --git a/ui/app/components/pages/notice.js b/ui/app/pages/notice/notice.js similarity index 97% rename from ui/app/components/pages/notice.js rename to ui/app/pages/notice/notice.js index a9077b98b..d8274dfcb 100644 --- a/ui/app/components/pages/notice.js +++ b/ui/app/pages/notice/notice.js @@ -6,8 +6,8 @@ const ReactMarkdown = require('react-markdown') const linker = require('extension-link-enabler') const generateLostAccountsNotice = require('../../../lib/lost-accounts-notice') const findDOMNode = require('react-dom').findDOMNode -const actions = require('../../actions') -const { DEFAULT_ROUTE } = require('../../routes') +const actions = require('../../store/actions') +const { DEFAULT_ROUTE } = require('../../helpers/constants/routes') class Notice extends Component { constructor (props) { diff --git a/ui/app/components/pages/provider-approval/index.js b/ui/app/pages/provider-approval/index.js similarity index 100% rename from ui/app/components/pages/provider-approval/index.js rename to ui/app/pages/provider-approval/index.js diff --git a/ui/app/components/pages/provider-approval/provider-approval.component.js b/ui/app/pages/provider-approval/provider-approval.component.js similarity index 91% rename from ui/app/components/pages/provider-approval/provider-approval.component.js rename to ui/app/pages/provider-approval/provider-approval.component.js index 11895327a..1f1d68da7 100644 --- a/ui/app/components/pages/provider-approval/provider-approval.component.js +++ b/ui/app/pages/provider-approval/provider-approval.component.js @@ -1,6 +1,6 @@ import PropTypes from 'prop-types' import React, { Component } from 'react' -import ProviderPageContainer from '../../provider-page-container' +import ProviderPageContainer from '../../components/app/provider-page-container' export default class ProviderApproval extends Component { static propTypes = { diff --git a/ui/app/components/pages/provider-approval/provider-approval.container.js b/ui/app/pages/provider-approval/provider-approval.container.js similarity index 95% rename from ui/app/components/pages/provider-approval/provider-approval.container.js rename to ui/app/pages/provider-approval/provider-approval.container.js index 28e4531a9..d53c0ae4d 100644 --- a/ui/app/components/pages/provider-approval/provider-approval.container.js +++ b/ui/app/pages/provider-approval/provider-approval.container.js @@ -1,6 +1,6 @@ import { connect } from 'react-redux' import ProviderApproval from './provider-approval.component' -import { approveProviderRequest, rejectProviderRequest } from '../../../actions' +import { approveProviderRequest, rejectProviderRequest } from '../../store/actions' function mapDispatchToProps (dispatch) { return { diff --git a/ui/app/app.js b/ui/app/pages/routes/index.js similarity index 85% rename from ui/app/app.js rename to ui/app/pages/routes/index.js index efec4e49a..460cec958 100644 --- a/ui/app/app.js +++ b/ui/app/pages/routes/index.js @@ -3,52 +3,52 @@ import PropTypes from 'prop-types' import { connect } from 'react-redux' import { Route, Switch, withRouter, matchPath } from 'react-router-dom' import { compose } from 'recompose' -import actions from './actions' +import actions from '../../store/actions' import log from 'loglevel' -import { getMetaMaskAccounts, getNetworkIdentifier } from './selectors' +import { getMetaMaskAccounts, getNetworkIdentifier } from '../../selectors/selectors' // init -import FirstTimeFlow from './components/pages/first-time-flow' +import FirstTimeFlow from '../first-time-flow' // accounts -const SendTransactionScreen = require('./components/send/send.container') -const ConfirmTransaction = require('./components/pages/confirm-transaction') +const SendTransactionScreen = require('../../components/app/send/send.container') +const ConfirmTransaction = require('../confirm-transaction') // slideout menu -const Sidebar = require('./components/sidebars').default -const { WALLET_VIEW_SIDEBAR } = require('./components/sidebars/sidebar.constants') +const Sidebar = require('../../components/app/sidebars').default +const { WALLET_VIEW_SIDEBAR } = require('../../components/app/sidebars/sidebar.constants') // other views -import Home from './components/pages/home' -import Settings from './components/pages/settings' -import Authenticated from './higher-order-components/authenticated' -import Initialized from './higher-order-components/initialized' -import Lock from './components/pages/lock' -import UiMigrationAnnouncement from './components/ui-migration-annoucement' -const RestoreVaultPage = require('./components/pages/keychains/restore-vault').default -const RevealSeedConfirmation = require('./components/pages/keychains/reveal-seed') -const MobileSyncPage = require('./components/pages/mobile-sync') -const AddTokenPage = require('./components/pages/add-token') -const ConfirmAddTokenPage = require('./components/pages/confirm-add-token') -const ConfirmAddSuggestedTokenPage = require('./components/pages/confirm-add-suggested-token') -const CreateAccountPage = require('./components/pages/create-account') -const NoticeScreen = require('./components/pages/notice') +import Home from '../home' +import Settings from '../settings' +import Authenticated from '../../helpers/higher-order-components/authenticated' +import Initialized from '../../helpers/higher-order-components/initialized' +import Lock from '../lock' +import UiMigrationAnnouncement from '../../components/app/ui-migration-annoucement' +const RestoreVaultPage = require('../keychains/restore-vault').default +const RevealSeedConfirmation = require('../keychains/reveal-seed') +const MobileSyncPage = require('../mobile-sync') +const AddTokenPage = require('../add-token') +const ConfirmAddTokenPage = require('../confirm-add-token') +const ConfirmAddSuggestedTokenPage = require('../confirm-add-suggested-token') +const CreateAccountPage = require('../create-account') +const NoticeScreen = require('../notice/notice') -const Loading = require('./components/loading-screen') -const LoadingNetwork = require('./components/loading-network-screen').default -const NetworkDropdown = require('./components/dropdowns/network-dropdown') -import AccountMenu from './components/account-menu' +const Loading = require('../../components/ui/loading-screen') +const LoadingNetwork = require('../../components/app/loading-network-screen').default +const NetworkDropdown = require('../../components/app/dropdowns/network-dropdown') +import AccountMenu from '../../components/app/account-menu' // Global Modals -const Modal = require('./components/modals/index').Modal +const Modal = require('../../components/app/modals').Modal // Global Alert -const Alert = require('./components/alert') +const Alert = require('../../components/ui/alert') -import AppHeader from './components/app-header' -import UnlockPage from './components/pages/unlock-page' +import AppHeader from '../../components/app/app-header' +import UnlockPage from '../unlock-page' import { submittedPendingTransactionsSelector, -} from './selectors/transactions' +} from '../../selectors/transactions' // Routes import { @@ -68,15 +68,15 @@ import { INITIALIZE_ROUTE, INITIALIZE_UNLOCK_ROUTE, NOTICE_ROUTE, -} from './routes' +} from '../../helpers/constants/routes' // enums import { ENVIRONMENT_TYPE_NOTIFICATION, ENVIRONMENT_TYPE_POPUP, -} from '../../app/scripts/lib/enums' +} from '../../../../app/scripts/lib/enums' -class App extends Component { +class Routes extends Component { componentWillMount () { const { currentCurrency, setCurrentCurrencyToUSD } = this.props @@ -299,7 +299,7 @@ class App extends Component { } } -App.propTypes = { +Routes.propTypes = { currentCurrency: PropTypes.string, setCurrentCurrencyToUSD: PropTypes.func, isLoading: PropTypes.bool, @@ -430,7 +430,7 @@ function mapDispatchToProps (dispatch, ownProps) { } } -App.contextTypes = { +Routes.contextTypes = { t: PropTypes.func, metricsEvent: PropTypes.func, } @@ -438,4 +438,4 @@ App.contextTypes = { module.exports = compose( withRouter, connect(mapStateToProps, mapDispatchToProps) -)(App) +)(Routes) diff --git a/ui/app/components/pages/settings/index.js b/ui/app/pages/settings/index.js similarity index 100% rename from ui/app/components/pages/settings/index.js rename to ui/app/pages/settings/index.js diff --git a/ui/app/components/pages/settings/index.scss b/ui/app/pages/settings/index.scss similarity index 95% rename from ui/app/components/pages/settings/index.scss rename to ui/app/pages/settings/index.scss index 138ebcfc5..0e8482c63 100644 --- a/ui/app/components/pages/settings/index.scss +++ b/ui/app/pages/settings/index.scss @@ -1,6 +1,6 @@ -@import './info-tab/index'; +@import 'info-tab/index'; -@import './settings-tab/index'; +@import 'settings-tab/index'; .settings-page { position: relative; diff --git a/ui/app/components/pages/settings/info-tab/index.js b/ui/app/pages/settings/info-tab/index.js similarity index 100% rename from ui/app/components/pages/settings/info-tab/index.js rename to ui/app/pages/settings/info-tab/index.js diff --git a/ui/app/components/pages/settings/info-tab/index.scss b/ui/app/pages/settings/info-tab/index.scss similarity index 100% rename from ui/app/components/pages/settings/info-tab/index.scss rename to ui/app/pages/settings/info-tab/index.scss diff --git a/ui/app/components/pages/settings/info-tab/info-tab.component.js b/ui/app/pages/settings/info-tab/info-tab.component.js similarity index 100% rename from ui/app/components/pages/settings/info-tab/info-tab.component.js rename to ui/app/pages/settings/info-tab/info-tab.component.js diff --git a/ui/app/components/pages/settings/settings-tab/index.js b/ui/app/pages/settings/settings-tab/index.js similarity index 100% rename from ui/app/components/pages/settings/settings-tab/index.js rename to ui/app/pages/settings/settings-tab/index.js diff --git a/ui/app/components/pages/settings/settings-tab/index.scss b/ui/app/pages/settings/settings-tab/index.scss similarity index 100% rename from ui/app/components/pages/settings/settings-tab/index.scss rename to ui/app/pages/settings/settings-tab/index.scss diff --git a/ui/app/components/pages/settings/settings-tab/settings-tab.component.js b/ui/app/pages/settings/settings-tab/settings-tab.component.js similarity index 97% rename from ui/app/components/pages/settings/settings-tab/settings-tab.component.js rename to ui/app/pages/settings/settings-tab/settings-tab.component.js index ba2e81754..f69c21e82 100644 --- a/ui/app/components/pages/settings/settings-tab/settings-tab.component.js +++ b/ui/app/pages/settings/settings-tab/settings-tab.component.js @@ -1,14 +1,14 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' -import infuraCurrencies from '../../../../infura-conversion.json' +import infuraCurrencies from '../../../helpers/constants/infura-conversion.json' import validUrl from 'valid-url' -import { exportAsFile } from '../../../../util' -import SimpleDropdown from '../../../dropdowns/simple-dropdown' +import { exportAsFile } from '../../../helpers/utils/util' +import SimpleDropdown from '../../../components/app/dropdowns/simple-dropdown' import ToggleButton from 'react-toggle-button' -import { REVEAL_SEED_ROUTE, MOBILE_SYNC_ROUTE } from '../../../../routes' -import locales from '../../../../../../app/_locales/index.json' -import TextField from '../../../text-field' -import Button from '../../../button' +import { REVEAL_SEED_ROUTE, MOBILE_SYNC_ROUTE } from '../../../helpers/constants/routes' +import locales from '../../../../../app/_locales/index.json' +import TextField from '../../../components/ui/text-field' +import Button from '../../../components/ui/button' const sortedCurrencies = infuraCurrencies.objects.sort((a, b) => { return a.quote.name.toLocaleLowerCase().localeCompare(b.quote.name.toLocaleLowerCase()) diff --git a/ui/app/components/pages/settings/settings-tab/settings-tab.container.js b/ui/app/pages/settings/settings-tab/settings-tab.container.js similarity index 96% rename from ui/app/components/pages/settings/settings-tab/settings-tab.container.js rename to ui/app/pages/settings/settings-tab/settings-tab.container.js index e266c8c9a..3ae4985d7 100644 --- a/ui/app/components/pages/settings/settings-tab/settings-tab.container.js +++ b/ui/app/pages/settings/settings-tab/settings-tab.container.js @@ -14,8 +14,8 @@ import { setUseNativeCurrencyAsPrimaryCurrencyPreference, setShowFiatConversionOnTestnetsPreference, setParticipateInMetaMetrics, -} from '../../../../actions' -import { preferencesSelector } from '../../../../selectors' +} from '../../../store/actions' +import { preferencesSelector } from '../../../selectors/selectors' const mapStateToProps = state => { const { appState: { warning }, metamask } = state diff --git a/ui/app/components/pages/settings/settings.component.js b/ui/app/pages/settings/settings.component.js similarity index 95% rename from ui/app/components/pages/settings/settings.component.js rename to ui/app/pages/settings/settings.component.js index 94a97bba1..d67d3fcfe 100644 --- a/ui/app/components/pages/settings/settings.component.js +++ b/ui/app/pages/settings/settings.component.js @@ -1,10 +1,10 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' import { Switch, Route, matchPath } from 'react-router-dom' -import TabBar from '../../tab-bar' +import TabBar from '../../components/app/tab-bar' import SettingsTab from './settings-tab' import InfoTab from './info-tab' -import { DEFAULT_ROUTE, SETTINGS_ROUTE, INFO_ROUTE } from '../../../routes' +import { DEFAULT_ROUTE, SETTINGS_ROUTE, INFO_ROUTE } from '../../helpers/constants/routes' export default class SettingsPage extends PureComponent { static propTypes = { diff --git a/ui/app/components/pages/unlock-page/index.js b/ui/app/pages/unlock-page/index.js similarity index 100% rename from ui/app/components/pages/unlock-page/index.js rename to ui/app/pages/unlock-page/index.js diff --git a/ui/app/components/pages/unlock-page/index.scss b/ui/app/pages/unlock-page/index.scss similarity index 100% rename from ui/app/components/pages/unlock-page/index.scss rename to ui/app/pages/unlock-page/index.scss diff --git a/ui/app/components/pages/unlock-page/unlock-page.component.js b/ui/app/pages/unlock-page/unlock-page.component.js similarity index 96% rename from ui/app/components/pages/unlock-page/unlock-page.component.js rename to ui/app/pages/unlock-page/unlock-page.component.js index cc86d5872..3aeb2a59b 100644 --- a/ui/app/components/pages/unlock-page/unlock-page.component.js +++ b/ui/app/pages/unlock-page/unlock-page.component.js @@ -1,11 +1,11 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' import Button from '@material-ui/core/Button' -import TextField from '../../text-field' +import TextField from '../../components/ui/text-field' import getCaretCoordinates from 'textarea-caret' import { EventEmitter } from 'events' -import Mascot from '../../mascot' -import { DEFAULT_ROUTE } from '../../../routes' +import Mascot from '../../components/ui/mascot' +import { DEFAULT_ROUTE } from '../../helpers/constants/routes' export default class UnlockPage extends Component { static contextTypes = { diff --git a/ui/app/components/pages/unlock-page/unlock-page.container.js b/ui/app/pages/unlock-page/unlock-page.container.js similarity index 86% rename from ui/app/components/pages/unlock-page/unlock-page.container.js rename to ui/app/pages/unlock-page/unlock-page.container.js index fe51c8095..bd43666fc 100644 --- a/ui/app/components/pages/unlock-page/unlock-page.container.js +++ b/ui/app/pages/unlock-page/unlock-page.container.js @@ -1,16 +1,16 @@ import { connect } from 'react-redux' import { withRouter } from 'react-router-dom' import { compose } from 'recompose' -import { getEnvironmentType } from '../../../../../app/scripts/lib/util' -import { ENVIRONMENT_TYPE_POPUP } from '../../../../../app/scripts/lib/enums' -import { DEFAULT_ROUTE, RESTORE_VAULT_ROUTE } from '../../../routes' +import { getEnvironmentType } from '../../../../app/scripts/lib/util' +import { ENVIRONMENT_TYPE_POPUP } from '../../../../app/scripts/lib/enums' +import { DEFAULT_ROUTE, RESTORE_VAULT_ROUTE } from '../../helpers/constants/routes' import { tryUnlockMetamask, forgotPassword, markPasswordForgotten, forceUpdateMetamaskState, showModal, -} from '../../../actions' +} from '../../store/actions' import UnlockPage from './unlock-page.component' const mapStateToProps = state => { diff --git a/ui/app/root.js b/ui/app/root.js deleted file mode 100644 index c95c56581..000000000 --- a/ui/app/root.js +++ /dev/null @@ -1,34 +0,0 @@ -const { Component } = require('react') -const PropTypes = require('prop-types') -const { Provider } = require('react-redux') -const h = require('react-hyperscript') -const { HashRouter } = require('react-router-dom') -const App = require('./app') -const I18nProvider = require('./i18n-provider') -const MetaMetricsProvider = require('./metametrics/metametrics.provider') - -class Root extends Component { - render () { - const { store } = this.props - - return ( - h(Provider, { store }, [ - h(HashRouter, { - hashType: 'noslash', - }, [ - h(MetaMetricsProvider, [ - h(I18nProvider, [ - h(App), - ]), - ]), - ]), - ]) - ) - } -} - -Root.propTypes = { - store: PropTypes.object, -} - -module.exports = Root diff --git a/ui/app/selectors/confirm-transaction.js b/ui/app/selectors/confirm-transaction.js index ccd16fadd..9b5eda82f 100644 --- a/ui/app/selectors/confirm-transaction.js +++ b/ui/app/selectors/confirm-transaction.js @@ -1,7 +1,7 @@ import { createSelector } from 'reselect' import txHelper from '../../lib/tx-helper' -import { calcTokenAmount } from '../token-util' -import { roundExponential } from '../helpers/confirm-transaction/util' +import { calcTokenAmount } from '../helpers/utils/token-util' +import { roundExponential } from '../helpers/utils/confirm-tx.util' const unapprovedTxsSelector = state => state.metamask.unapprovedTxs const unapprovedMsgsSelector = state => state.metamask.unapprovedMsgs diff --git a/ui/app/selectors/custom-gas.js b/ui/app/selectors/custom-gas.js index 8039c0746..ecffb37ca 100644 --- a/ui/app/selectors/custom-gas.js +++ b/ui/app/selectors/custom-gas.js @@ -3,22 +3,22 @@ import { conversionUtil, multiplyCurrencies, conversionGreaterThan, -} from '../conversion-util' +} from '../helpers/utils/conversion-util' import { getCurrentCurrency, getIsMainnet, preferencesSelector, -} from '../selectors' +} from './selectors' import { formatCurrency, -} from '../helpers/confirm-transaction/util' +} from '../helpers/utils/confirm-tx.util' import { decEthToConvertedCurrency as ethTotalToConvertedCurrency, -} from '../helpers/conversions.util' +} from '../helpers/utils/conversions.util' import { formatETHFee, -} from '../helpers/formatters' +} from '../helpers/utils/formatters' import { calcGasTotal, -} from '../components/send/send.utils' +} from '../components/app/send/send.utils' import { addHexPrefix } from 'ethereumjs-util' const selectors = { diff --git a/ui/app/selectors/tests/custom-gas.test.js b/ui/app/selectors/custom-gas.test.js similarity index 99% rename from ui/app/selectors/tests/custom-gas.test.js rename to ui/app/selectors/custom-gas.test.js index 73240d997..6df4a60c7 100644 --- a/ui/app/selectors/tests/custom-gas.test.js +++ b/ui/app/selectors/custom-gas.test.js @@ -11,7 +11,7 @@ const { getPriceAndTimeEstimates, getRenderableBasicEstimateData, getRenderableEstimateDataForSmallButtonsFromGWEI, -} = proxyquire('../custom-gas', {}) +} = proxyquire('./custom-gas', {}) describe('custom-gas selectors', () => { diff --git a/ui/app/selectors.js b/ui/app/selectors/selectors.js similarity index 98% rename from ui/app/selectors.js rename to ui/app/selectors/selectors.js index 663c3f12b..ac226900f 100644 --- a/ui/app/selectors.js +++ b/ui/app/selectors/selectors.js @@ -1,13 +1,13 @@ -import {NETWORK_TYPES} from './constants/common' +import {NETWORK_TYPES} from '../helpers/constants/common' import { stripHexPrefix } from 'ethereumjs-util' const abi = require('human-standard-token-abi') import { transactionsSelector, -} from './selectors/transactions' +} from './transactions' const { multiplyCurrencies, -} = require('./conversion-util') +} = require('../helpers/utils/conversion-util') const selectors = { getSelectedAddress, diff --git a/ui/app/selectors/transactions.js b/ui/app/selectors/transactions.js index fc1271c59..b1d27b333 100644 --- a/ui/app/selectors/transactions.js +++ b/ui/app/selectors/transactions.js @@ -4,12 +4,12 @@ import { APPROVED_STATUS, SUBMITTED_STATUS, CONFIRMED_STATUS, -} from '../constants/transactions' +} from '../helpers/constants/transactions' import { TRANSACTION_TYPE_CANCEL, TRANSACTION_TYPE_RETRY, } from '../../../app/scripts/controllers/transactions/enums' -import { hexToDecimal } from '../helpers/conversions.util' +import { hexToDecimal } from '../helpers/utils/conversions.util' import { selectedTokenAddressSelector } from './tokens' import txHelper from '../../lib/tx-helper' diff --git a/ui/app/actions.js b/ui/app/store/actions.js similarity index 99% rename from ui/app/actions.js rename to ui/app/store/actions.js index d8363eba6..b99b051cb 100644 --- a/ui/app/actions.js +++ b/ui/app/store/actions.js @@ -1,18 +1,18 @@ const abi = require('human-standard-token-abi') const pify = require('pify') -const getBuyEthUrl = require('../../app/scripts/lib/buy-eth-url') -const { getTokenAddressFromTokenObject } = require('./util') +const getBuyEthUrl = require('../../../app/scripts/lib/buy-eth-url') +const { getTokenAddressFromTokenObject } = require('../helpers/utils/util') const { calcTokenBalance, estimateGas, -} = require('./components/send/send.utils') +} = require('../components/app/send/send.utils') const ethUtil = require('ethereumjs-util') -const { fetchLocale } = require('../i18n-helper') +const { fetchLocale } = require('../helpers/utils/i18n-helper') const log = require('loglevel') -const { ENVIRONMENT_TYPE_NOTIFICATION } = require('../../app/scripts/lib/enums') -const { hasUnconfirmedTransactions } = require('./helpers/confirm-transaction/util') -const gasDuck = require('./ducks/gas.duck') -const WebcamUtils = require('../lib/webcam-utils') +const { ENVIRONMENT_TYPE_NOTIFICATION } = require('../../../app/scripts/lib/enums') +const { hasUnconfirmedTransactions } = require('../helpers/utils/confirm-tx.util') +const gasDuck = require('../ducks/gas/gas.duck') +const WebcamUtils = require('../../lib/webcam-utils') var actions = { _setBackgroundConnection: _setBackgroundConnection, diff --git a/ui/app/store.js b/ui/app/store/store.js similarity index 93% rename from ui/app/store.js rename to ui/app/store/store.js index feebbabc0..9f12f469e 100644 --- a/ui/app/store.js +++ b/ui/app/store/store.js @@ -1,7 +1,7 @@ const createStore = require('redux').createStore const applyMiddleware = require('redux').applyMiddleware const thunkMiddleware = require('redux-thunk').default -const rootReducer = require('./reducers') +const rootReducer = require('../ducks') const createLogger = require('redux-logger').createLogger global.METAMASK_DEBUG = process.env.METAMASK_DEBUG diff --git a/ui/index.js b/ui/index.js index bd9ecc28b..ac860e0db 100644 --- a/ui/index.js +++ b/ui/index.js @@ -1,10 +1,10 @@ const render = require('react-dom').render const h = require('react-hyperscript') -const Root = require('./app/root') -const actions = require('./app/actions') -const configureStore = require('./app/store') +const Root = require('./app/pages') +const actions = require('./app/store/actions') +const configureStore = require('./app/store/store') const txHelper = require('./lib/tx-helper') -const { fetchLocale } = require('./i18n-helper') +const { fetchLocale } = require('./app/helpers/utils/i18n-helper') const log = require('loglevel') module.exports = launchMetamaskUi diff --git a/ui/lib/icon-factory.js b/ui/lib/icon-factory.js index 7fadbceff..2ea943297 100644 --- a/ui/lib/icon-factory.js +++ b/ui/lib/icon-factory.js @@ -1,6 +1,6 @@ var iconFactory const isValidAddress = require('ethereumjs-util').isValidAddress -const { checksumAddress } = require('../app/util') +const { checksumAddress } = require('../app/helpers/utils/util') const contractMap = require('eth-contract-metadata') module.exports = function (jazzicon) { diff --git a/ui/lib/lost-accounts-notice.js b/ui/lib/lost-accounts-notice.js index 948b13db6..840bd8dca 100644 --- a/ui/lib/lost-accounts-notice.js +++ b/ui/lib/lost-accounts-notice.js @@ -1,4 +1,4 @@ -const summary = require('../app/util').addressSummary +const summary = require('../app/helpers/utils/util').addressSummary module.exports = function (lostAccounts) { return { diff --git a/ui/lib/tx-helper.js b/ui/lib/tx-helper.js index 260dbaa39..cdacc5ed7 100644 --- a/ui/lib/tx-helper.js +++ b/ui/lib/tx-helper.js @@ -1,4 +1,4 @@ -const valuesFor = require('../app/util').valuesFor +const valuesFor = require('../app/helpers/utils/util').valuesFor const log = require('loglevel') module.exports = function (unapprovedTxs, unapprovedMsgs, personalMsgs, typedMessages, network) {