)
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 98%
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
index 53cb84791..20a503018 100644
--- 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
@@ -63,6 +63,10 @@
font-size: 10px;
color: #888EA3;
}
+
+ .loading-overlay {
+ height: auto;
+ }
}
&__slider-container {
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 95%
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..5f7d90922 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(),
@@ -32,6 +32,7 @@ describe('AdvancedTabContent Component', function () {
insufficientBalance={false}
customPriceIsSafe={true}
isSpeedUp={false}
+ isEthereumNetwork={true}
/>, { context: { t: (str1, str2) => str2 ? str1 + str2 : str1 } })
})
@@ -59,9 +60,9 @@ describe('AdvancedTabContent Component', function () {
const feeChartDiv = advancedTabChildren.at(1)
assert(feeChartDiv.childAt(0).hasClass('advanced-tab__gas-edit-rows'))
- assert(feeChartDiv.childAt(1).hasClass('advanced-tab__fee-chart__title'))
- assert(feeChartDiv.childAt(2).is(GasPriceChart))
- assert(feeChartDiv.childAt(3).hasClass('advanced-tab__fee-chart__speed-buttons'))
+ assert(feeChartDiv.childAt(1).childAt(0).hasClass('advanced-tab__fee-chart__title'))
+ assert(feeChartDiv.childAt(1).childAt(1).is(GasPriceChart))
+ assert(feeChartDiv.childAt(1).childAt(2).hasClass('advanced-tab__fee-chart__speed-buttons'))
})
it('should render a loading component instead of the chart if gasEstimatesLoading is true', () => {
@@ -75,9 +76,9 @@ describe('AdvancedTabContent Component', function () {
const feeChartDiv = advancedTabChildren.at(1)
assert(feeChartDiv.childAt(0).hasClass('advanced-tab__gas-edit-rows'))
- assert(feeChartDiv.childAt(1).hasClass('advanced-tab__fee-chart__title'))
- assert(feeChartDiv.childAt(2).is(Loading))
- assert(feeChartDiv.childAt(3).hasClass('advanced-tab__fee-chart__speed-buttons'))
+ assert(feeChartDiv.childAt(1).childAt(0).hasClass('advanced-tab__fee-chart__title'))
+ assert(feeChartDiv.childAt(1).childAt(1).is(Loading))
+ assert(feeChartDiv.childAt(1).childAt(2).hasClass('advanced-tab__fee-chart__speed-buttons'))
})
it('should call renderDataSummary with the expected params', () => {
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 97%
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..d242f59f5 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'
@@ -177,7 +177,7 @@ export default class GasModalPageContainer extends Component {
onSubmit(customModalGasLimitInHex, customModalGasPriceInHex)
}}
submitText={this.context.t('save')}
- headerCloseText={'Close'}
+ headerCloseText={this.context.t('close')}
hideCancel={true}
/>
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..d541056f4 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,22 @@ 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,
+ getCurrentCurrency,
getCurrentEthBalance,
-} from '../../../selectors.js'
+ getIsMainnet,
+ getSelectedToken,
+ isEthereumNetwork,
+ preferencesSelector,
+} from '../../../../selectors/selectors.js'
import {
formatTimeEstimate,
getFastPriceEstimateInHexWEI,
@@ -41,29 +44,28 @@ 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'
const mapStateToProps = (state, ownProps) => {
const { transaction = {} } = ownProps
@@ -138,6 +140,8 @@ const mapStateToProps = (state, ownProps) => {
txId: transaction.id,
insufficientBalance,
gasEstimatesLoading,
+ isMainnet,
+ isEthereumNetwork: isEthereumNetwork(state),
}
}
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 96%
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..b9eb67d2b 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',
},
})
@@ -118,7 +118,7 @@ describe('gas-modal-page-container container', () => {
gasChartProps: {
'currentPrice': 4.294967295,
estimatedTimes: [31, 62, 93, 124],
- estimatedTimesMax: '31',
+ estimatedTimesMax: 31,
gasPrices: [3, 4, 5, 6],
gasPricesMax: 6,
},
@@ -140,6 +140,8 @@ describe('gas-modal-page-container container', () => {
insufficientBalance: true,
isSpeedUp: false,
txId: 34,
+ isEthereumNetwork: false,
+ isMainnet: true,
}
const baseMockOwnProps = { transaction: { id: 34 } }
const tests = [
@@ -179,6 +181,7 @@ describe('gas-modal-page-container container', () => {
...baseExpectedResult.infoRowProps,
newTotalFiat: '',
},
+ isMainnet: false,
},
},
{
@@ -196,7 +199,10 @@ describe('gas-modal-page-container container', () => {
},
}),
mockOwnProps: baseMockOwnProps,
- expectedResult: baseExpectedResult,
+ expectedResult: {
+ ...baseExpectedResult,
+ isMainnet: false,
+ },
},
{
mockState: Object.assign({}, baseMockState, {
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 91%
rename from ui/app/components/modals/deposit-ether-modal.js
rename to ui/app/components/app/modals/deposit-ether-modal.js
index 09137d39a..082ff76a9 100644
--- a/ui/app/components/modals/deposit-ether-modal.js
+++ b/ui/app/components/app/modals/deposit-ether-modal.js
@@ -3,16 +3,16 @@ 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
-let COINBASE_ROW_TITLE
-let COINBASE_ROW_TEXT
+let WYRE_ROW_TITLE
+let WYRE_ROW_TEXT
let SHAPESHIFT_ROW_TITLE
let SHAPESHIFT_ROW_TEXT
let FAUCET_ROW_TITLE
@@ -49,8 +49,8 @@ function DepositEtherModal (props, context) {
// need to set after i18n locale has loaded
DIRECT_DEPOSIT_ROW_TITLE = context.t('directDepositEther')
DIRECT_DEPOSIT_ROW_TEXT = context.t('directDepositEtherExplainer')
- COINBASE_ROW_TITLE = context.t('buyCoinbase')
- COINBASE_ROW_TEXT = context.t('buyCoinbaseExplainer')
+ WYRE_ROW_TITLE = context.t('buyWithWyre')
+ WYRE_ROW_TEXT = context.t('buyWithWyreDescription')
SHAPESHIFT_ROW_TITLE = context.t('depositShapeShift')
SHAPESHIFT_ROW_TEXT = context.t('depositShapeShiftExplainer')
FAUCET_ROW_TITLE = context.t('testFaucet')
@@ -176,13 +176,13 @@ DepositEtherModal.prototype.render = function () {
this.renderRow({
logo: h('div.deposit-ether-modal__logo', {
style: {
- backgroundImage: 'url(\'./images/coinbase logo.png\')',
+ backgroundImage: 'url(\'./images/wyre.svg\')',
height: '40px',
},
}),
- title: COINBASE_ROW_TITLE,
- text: COINBASE_ROW_TEXT,
- buttonLabel: this.context.t('continueToCoinbase'),
+ title: WYRE_ROW_TITLE,
+ text: WYRE_ROW_TEXT,
+ buttonLabel: this.context.t('continueToWyre'),
onButtonClick: () => toCoinbase(address),
hide: isTestNetwork || buyingWithShapeshift,
}),
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 97%
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 de3d1d3a3..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 = {
@@ -40,7 +40,7 @@ export default class MetaMetricsOptInModal extends Component {
MetaMask would like to gather usage data to better understand how our users interact with the extension. This data
- will be used to continually improve the usability and user experience of our product and the etheruem ecosystem.
+ will be used to continually improve the usability and user experience of our product and the Ethereum ecosystem.
MetaMask will..
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 83%
rename from ui/app/components/signature-request.js
rename to ui/app/components/app/signature-request.js
index 25bd9a7b1..e47791b67 100644
--- a/ui/app/components/signature-request.js
+++ b/ui/app/components/app/signature-request.js
@@ -2,7 +2,9 @@ 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 { ENVIRONMENT_TYPE_NOTIFICATION } from '../../../../app/scripts/lib/enums'
+import { getEnvironmentType } from '../../../../app/scripts/lib/util'
+import Identicon from '../ui/identicon'
const connect = require('react-redux').connect
const ethUtil = require('ethereumjs-util')
const classnames = require('classnames')
@@ -10,10 +12,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 +23,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 {
@@ -47,6 +49,42 @@ function mapDispatchToProps (dispatch) {
}
}
+function mergeProps (stateProps, dispatchProps, ownProps) {
+ const {
+ signPersonalMessage,
+ signTypedMessage,
+ cancelPersonalMessage,
+ cancelTypedMessage,
+ signMessage,
+ cancelMessage,
+ txData,
+ } = ownProps
+
+ const { type } = txData
+
+ let cancel
+ let sign
+ if (type === 'personal_sign') {
+ cancel = cancelPersonalMessage
+ sign = signPersonalMessage
+ } else if (type === 'eth_signTypedData') {
+ cancel = cancelTypedMessage
+ sign = signTypedMessage
+ } else if (type === 'eth_sign') {
+ cancel = cancelMessage
+ sign = signMessage
+ }
+
+ return {
+ ...stateProps,
+ ...dispatchProps,
+ ...ownProps,
+ txData,
+ cancel,
+ sign,
+ }
+}
+
SignatureRequest.contextTypes = {
t: PropTypes.func,
metricsEvent: PropTypes.func,
@@ -54,7 +92,7 @@ SignatureRequest.contextTypes = {
module.exports = compose(
withRouter,
- connect(mapStateToProps, mapDispatchToProps)
+ connect(mapStateToProps, mapDispatchToProps, mergeProps)
)(SignatureRequest)
@@ -67,6 +105,24 @@ function SignatureRequest (props) {
}
}
+SignatureRequest.prototype.componentDidMount = function () {
+ const { clearConfirmTransaction, cancel } = this.props
+ const { metricsEvent } = this.context
+ if (getEnvironmentType(window.location.href) === ENVIRONMENT_TYPE_NOTIFICATION) {
+ window.onbeforeunload = event => {
+ metricsEvent({
+ eventOpts: {
+ category: 'Transactions',
+ action: 'Sign Request',
+ name: 'Cancel Sig Request Via Notification Close',
+ },
+ })
+ clearConfirmTransaction()
+ cancel(event)
+ }
+ }
+}
+
SignatureRequest.prototype.renderHeader = function () {
return h('div.request-signature__header', [
@@ -233,30 +289,7 @@ SignatureRequest.prototype.renderBody = function () {
}
SignatureRequest.prototype.renderFooter = function () {
- const {
- signPersonalMessage,
- signTypedMessage,
- cancelPersonalMessage,
- cancelTypedMessage,
- signMessage,
- cancelMessage,
- } = this.props
-
- const { txData } = this.props
- const { type } = txData
-
- let cancel
- let sign
- if (type === 'personal_sign') {
- cancel = cancelPersonalMessage
- sign = signPersonalMessage
- } else if (type === 'eth_signTypedData') {
- cancel = cancelTypedMessage
- sign = signTypedMessage
- } else if (type === 'eth_sign') {
- cancel = cancelMessage
- sign = signMessage
- }
+ const { cancel, sign } = this.props
return h('div.request-signature__footer', [
h(Button, {
diff --git a/ui/app/components/app/tab-bar.js b/ui/app/components/app/tab-bar.js
new file mode 100644
index 000000000..43923989a
--- /dev/null
+++ b/ui/app/components/app/tab-bar.js
@@ -0,0 +1,37 @@
+import React, { Component } from 'react'
+const PropTypes = require('prop-types')
+const classnames = require('classnames')
+
+class TabBar extends Component {
+ render () {
+ const { tabs = [], onSelect, isActive } = this.props
+
+ return (
+
MetaMask would like to gather usage data to better understand how our users interact with the extension. This data
- will be used to continually improve the usability and user experience of our product and the Etheruem ecosystem.
+ will be used to continually improve the usability and user experience of our product and the Ethereum ecosystem.
MetaMask will..
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')
-
-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'
+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/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/settings-tab/settings-tab.component.js b/ui/app/pages/settings/advanced-tab/advanced-tab.component.js
similarity index 51%
rename from ui/app/components/pages/settings/settings-tab/settings-tab.component.js
rename to ui/app/pages/settings/advanced-tab/advanced-tab.component.js
index abddaaee8..d1cad1746 100644
--- a/ui/app/components/pages/settings/settings-tab/settings-tab.component.js
+++ b/ui/app/pages/settings/advanced-tab/advanced-tab.component.js
@@ -1,73 +1,30 @@
import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
-import infuraCurrencies from '../../../../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 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 TextField from '../../../components/ui/text-field'
+import Button from '../../../components/ui/button'
+import { MOBILE_SYNC_ROUTE } from '../../../helpers/constants/routes'
-const sortedCurrencies = infuraCurrencies.objects.sort((a, b) => {
- return a.quote.name.toLocaleLowerCase().localeCompare(b.quote.name.toLocaleLowerCase())
-})
-
-const infuraCurrencyOptions = sortedCurrencies.map(({ quote: { code, name } }) => {
- return {
- displayValue: `${code.toUpperCase()} - ${name}`,
- key: code,
- value: code,
- }
-})
-
-const localeOptions = locales.map(locale => {
- return {
- displayValue: `${locale.name}`,
- key: locale.code,
- value: locale.code,
- }
-})
-
-export default class SettingsTab extends PureComponent {
+export default class AdvancedTab extends PureComponent {
static contextTypes = {
t: PropTypes.func,
metricsEvent: PropTypes.func,
}
static propTypes = {
- metamask: PropTypes.object,
- setUseBlockie: PropTypes.func,
setHexDataFeatureFlag: PropTypes.func,
- setPrivacyMode: PropTypes.func,
- privacyMode: PropTypes.bool,
- setCurrentCurrency: PropTypes.func,
setRpcTarget: PropTypes.func,
- delRpcTarget: PropTypes.func,
displayWarning: PropTypes.func,
- revealSeedConfirmation: PropTypes.func,
- setFeatureFlagToBeta: PropTypes.func,
- showClearApprovalModal: PropTypes.func,
showResetAccountConfirmationModal: PropTypes.func,
warning: PropTypes.string,
history: PropTypes.object,
- updateCurrentLocale: PropTypes.func,
- currentLocale: PropTypes.string,
- useBlockie: PropTypes.bool,
sendHexData: PropTypes.bool,
- currentCurrency: PropTypes.string,
- conversionDate: PropTypes.number,
- nativeCurrency: PropTypes.string,
- useNativeCurrencyAsPrimaryCurrency: PropTypes.bool,
- setUseNativeCurrencyAsPrimaryCurrencyPreference: PropTypes.func,
setAdvancedInlineGasFeatureFlag: PropTypes.func,
advancedInlineGas: PropTypes.bool,
- mobileSync: PropTypes.bool,
showFiatInTestnets: PropTypes.bool,
setShowFiatConversionOnTestnetsPreference: PropTypes.func.isRequired,
- participateInMetaMetrics: PropTypes.bool,
- setParticipateInMetaMetrics: PropTypes.func,
}
state = {
@@ -78,62 +35,6 @@ export default class SettingsTab extends PureComponent {
nickname: '',
}
- renderCurrentConversion () {
- const { t } = this.context
- const { currentCurrency, conversionDate, setCurrentCurrency } = this.props
-
- return (
-