aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/pages
diff options
context:
space:
mode:
authorWhymarrh Whitby <whymarrh.whitby@gmail.com>2019-08-01 04:17:11 +0800
committerFrankie <frankie.diamond@gmail.com>2019-08-01 04:17:11 +0800
commit4d88e1cf862c3ae174780cd888d7703685db23e7 (patch)
tree93f7cd0e7bbcb42c7be310f0e6b12230eace9492 /ui/app/pages
parente9c7df28ed88f6dc3a5074cf873f3920429d1803 (diff)
downloadtangerine-wallet-browser-4d88e1cf862c3ae174780cd888d7703685db23e7.tar.gz
tangerine-wallet-browser-4d88e1cf862c3ae174780cd888d7703685db23e7.tar.zst
tangerine-wallet-browser-4d88e1cf862c3ae174780cd888d7703685db23e7.zip
Enable indent linting via ESLint (#6936)
* Enable indent linting via ESLint * yarn run lint:fix
Diffstat (limited to 'ui/app/pages')
-rw-r--r--ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js2
-rw-r--r--ui/app/pages/confirm-add-token/confirm-add-token.component.js2
-rw-r--r--ui/app/pages/create-account/connect-hardware/account-list.js228
-rw-r--r--ui/app/pages/create-account/connect-hardware/connect-screen.js214
-rw-r--r--ui/app/pages/create-account/connect-hardware/index.js60
-rw-r--r--ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js2
-rw-r--r--ui/app/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.component.js4
-rw-r--r--ui/app/pages/first-time-flow/select-action/select-action.component.js4
-rw-r--r--ui/app/pages/home/home.component.js2
-rw-r--r--ui/app/pages/mobile-sync/index.js74
-rw-r--r--ui/app/pages/routes/index.js20
-rw-r--r--ui/app/pages/send/account-list-item/account-list-item.container.js6
-rw-r--r--ui/app/pages/send/send-content/add-recipient/add-recipient.selectors.js2
-rw-r--r--ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.component.js14
-rw-r--r--ui/app/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js8
-rw-r--r--ui/app/pages/send/send-content/send-gas-row/send-gas-row.component.js42
-rw-r--r--ui/app/pages/send/send-content/send-row-wrapper/send-row-warning-message/send-row-warning-message.component.js2
-rw-r--r--ui/app/pages/send/send-content/send-row-wrapper/tests/send-row-wrapper-component.test.js28
-rw-r--r--ui/app/pages/send/send-header/send-header.selectors.js18
-rw-r--r--ui/app/pages/send/send.utils.js2
-rw-r--r--ui/app/pages/send/tests/send-utils.test.js6
-rw-r--r--ui/app/pages/send/to-autocomplete.component.js16
-rw-r--r--ui/app/pages/settings/advanced-tab/advanced-tab.component.js2
-rw-r--r--ui/app/pages/settings/advanced-tab/tests/advanced-tab-container.test.js14
-rw-r--r--ui/app/pages/settings/contact-list-tab/add-contact/add-contact.component.js12
-rw-r--r--ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.component.js6
-rw-r--r--ui/app/pages/settings/contact-list-tab/view-contact/view-contact.component.js2
-rw-r--r--ui/app/pages/settings/networks-tab/networks-tab.component.js40
28 files changed, 416 insertions, 416 deletions
diff --git a/ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js b/ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js
index 9a118a815..04e9c8dcf 100644
--- a/ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js
+++ b/ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js
@@ -84,7 +84,7 @@ export default class ConfirmAddSuggestedToken extends Component {
</div>
</div>
)
- })
+ })
}
</div>
</div>
diff --git a/ui/app/pages/confirm-add-token/confirm-add-token.component.js b/ui/app/pages/confirm-add-token/confirm-add-token.component.js
index f0a19e8d9..d918d7e39 100644
--- a/ui/app/pages/confirm-add-token/confirm-add-token.component.js
+++ b/ui/app/pages/confirm-add-token/confirm-add-token.component.js
@@ -80,7 +80,7 @@ export default class ConfirmAddToken extends Component {
</div>
</div>
)
- })
+ })
}
</div>
</div>
diff --git a/ui/app/pages/create-account/connect-hardware/account-list.js b/ui/app/pages/create-account/connect-hardware/account-list.js
index 247c27a5d..71684783f 100644
--- a/ui/app/pages/create-account/connect-hardware/account-list.js
+++ b/ui/app/pages/create-account/connect-hardware/account-list.js
@@ -6,18 +6,18 @@ const Select = require('react-select').default
import Button from '../../../components/ui/button'
class AccountList extends Component {
- getHdPaths () {
- return [
- {
- label: `Ledger Live`,
- value: `m/44'/60'/0'/0/0`,
- },
- {
- label: `Legacy (MEW / MyCrypto)`,
- value: `m/44'/60'/0'`,
- },
- ]
- }
+ getHdPaths () {
+ return [
+ {
+ label: `Ledger Live`,
+ value: `m/44'/60'/0'/0/0`,
+ },
+ {
+ label: `Legacy (MEW / MyCrypto)`,
+ value: `m/44'/60'/0'`,
+ },
+ ]
+ }
goToNextPage = () => {
// If we have < 5 accounts, it's restricted by BIP-44
@@ -74,128 +74,128 @@ class AccountList extends Component {
}
renderAccounts () {
- return h('div.hw-account-list', [
- this.props.accounts.map((a, i) => {
-
- return h('div.hw-account-list__item', { key: a.address }, [
- h('div.hw-account-list__item__radio', [
- h('input', {
- type: 'radio',
- name: 'selectedAccount',
- id: `address-${i}`,
- value: a.index,
- onChange: (e) => this.props.onAccountChange(e.target.value),
- checked: this.props.selectedAccount === a.index.toString(),
- }),
- h(
- 'label.hw-account-list__item__label',
- {
- htmlFor: `address-${i}`,
- },
- [
- h('span.hw-account-list__item__index', a.index + 1),
- `${a.address.slice(0, 4)}...${a.address.slice(-4)}`,
- h('span.hw-account-list__item__balance', `${a.balance}`),
- ]),
+ return h('div.hw-account-list', [
+ this.props.accounts.map((a, i) => {
+
+ return h('div.hw-account-list__item', { key: a.address }, [
+ h('div.hw-account-list__item__radio', [
+ h('input', {
+ type: 'radio',
+ name: 'selectedAccount',
+ id: `address-${i}`,
+ value: a.index,
+ onChange: (e) => this.props.onAccountChange(e.target.value),
+ checked: this.props.selectedAccount === a.index.toString(),
+ }),
+ h(
+ 'label.hw-account-list__item__label',
+ {
+ htmlFor: `address-${i}`,
+ },
+ [
+ h('span.hw-account-list__item__index', a.index + 1),
+ `${a.address.slice(0, 4)}...${a.address.slice(-4)}`,
+ h('span.hw-account-list__item__balance', `${a.balance}`),
]),
- h(
- 'a.hw-account-list__item__link',
- {
- href: genAccountLink(a.address, this.props.network),
- target: '_blank',
- title: this.context.t('etherscanView'),
- },
- h('img', { src: 'images/popout.svg' })
- ),
- ])
- }),
- ])
+ ]),
+ h(
+ 'a.hw-account-list__item__link',
+ {
+ href: genAccountLink(a.address, this.props.network),
+ target: '_blank',
+ title: this.context.t('etherscanView'),
+ },
+ h('img', { src: 'images/popout.svg' })
+ ),
+ ])
+ }),
+ ])
}
- renderPagination () {
- return h('div.hw-list-pagination', [
- h(
- 'button.hw-list-pagination__button',
- {
- onClick: this.goToPreviousPage,
- },
- `< ${this.context.t('prev')}`
- ),
-
- h(
- 'button.hw-list-pagination__button',
- {
- onClick: this.goToNextPage,
- },
- `${this.context.t('next')} >`
- ),
- ])
- }
-
- renderButtons () {
- const disabled = this.props.selectedAccount === null
- const buttonProps = {}
- if (disabled) {
- buttonProps.disabled = true
+ renderPagination () {
+ return h('div.hw-list-pagination', [
+ h(
+ 'button.hw-list-pagination__button',
+ {
+ onClick: this.goToPreviousPage,
+ },
+ `< ${this.context.t('prev')}`
+ ),
+
+ h(
+ 'button.hw-list-pagination__button',
+ {
+ onClick: this.goToNextPage,
+ },
+ `${this.context.t('next')} >`
+ ),
+ ])
}
- return h('div.new-account-connect-form__buttons', {}, [
- h(Button, {
- type: 'default',
- large: true,
- className: 'new-account-connect-form__button',
- onClick: this.props.onCancel.bind(this),
- }, [this.context.t('cancel')]),
-
- h(Button, {
- type: 'primary',
- large: true,
- className: 'new-account-connect-form__button unlock',
- disabled,
- onClick: this.props.onUnlockAccount.bind(this, this.props.device),
- }, [this.context.t('unlock')]),
- ])
- }
+ renderButtons () {
+ const disabled = this.props.selectedAccount === null
+ const buttonProps = {}
+ if (disabled) {
+ buttonProps.disabled = true
+ }
- renderForgetDevice () {
- return h('div.hw-forget-device-container', {}, [
- h('a', {
- onClick: this.props.onForgetDevice.bind(this, this.props.device),
- }, this.context.t('forgetDevice')),
- ])
- }
+ return h('div.new-account-connect-form__buttons', {}, [
+ h(Button, {
+ type: 'default',
+ large: true,
+ className: 'new-account-connect-form__button',
+ onClick: this.props.onCancel.bind(this),
+ }, [this.context.t('cancel')]),
+
+ h(Button, {
+ type: 'primary',
+ large: true,
+ className: 'new-account-connect-form__button unlock',
+ disabled,
+ onClick: this.props.onUnlockAccount.bind(this, this.props.device),
+ }, [this.context.t('unlock')]),
+ ])
+ }
- render () {
- return h('div.new-account-connect-form.account-list', {}, [
+ renderForgetDevice () {
+ return h('div.hw-forget-device-container', {}, [
+ h('a', {
+ onClick: this.props.onForgetDevice.bind(this, this.props.device),
+ }, this.context.t('forgetDevice')),
+ ])
+ }
+
+ render () {
+ return h('div.new-account-connect-form.account-list', {}, [
this.renderHeader(),
this.renderAccounts(),
this.renderPagination(),
this.renderButtons(),
this.renderForgetDevice(),
- ])
- }
+ ])
+ }
}
AccountList.propTypes = {
- onPathChange: PropTypes.func.isRequired,
- selectedPath: PropTypes.string.isRequired,
- device: PropTypes.string.isRequired,
- accounts: PropTypes.array.isRequired,
- onAccountChange: PropTypes.func.isRequired,
- onForgetDevice: PropTypes.func.isRequired,
- getPage: PropTypes.func.isRequired,
- network: PropTypes.string,
- selectedAccount: PropTypes.string,
- history: PropTypes.object,
- onUnlockAccount: PropTypes.func,
- onCancel: PropTypes.func,
- onAccountRestriction: PropTypes.func,
+ onPathChange: PropTypes.func.isRequired,
+ selectedPath: PropTypes.string.isRequired,
+ device: PropTypes.string.isRequired,
+ accounts: PropTypes.array.isRequired,
+ onAccountChange: PropTypes.func.isRequired,
+ onForgetDevice: PropTypes.func.isRequired,
+ getPage: PropTypes.func.isRequired,
+ network: PropTypes.string,
+ selectedAccount: PropTypes.string,
+ history: PropTypes.object,
+ onUnlockAccount: PropTypes.func,
+ onCancel: PropTypes.func,
+ onAccountRestriction: PropTypes.func,
}
AccountList.contextTypes = {
- t: PropTypes.func,
+ t: PropTypes.func,
}
module.exports = AccountList
diff --git a/ui/app/pages/create-account/connect-hardware/connect-screen.js b/ui/app/pages/create-account/connect-hardware/connect-screen.js
index a3b8ad246..fe7c1e027 100644
--- a/ui/app/pages/create-account/connect-hardware/connect-screen.js
+++ b/ui/app/pages/create-account/connect-hardware/connect-screen.js
@@ -4,12 +4,12 @@ const h = require('react-hyperscript')
import Button from '../../../components/ui/button'
class ConnectScreen extends Component {
- constructor (props) {
- super(props)
- this.state = {
- selectedDevice: null,
- }
+ constructor (props) {
+ super(props)
+ this.state = {
+ selectedDevice: null,
}
+ }
connect = () => {
if (this.state.selectedDevice) {
@@ -19,23 +19,23 @@ class ConnectScreen extends Component {
}
renderConnectToTrezorButton () {
- return h(
- `button.hw-connect__btn${this.state.selectedDevice === 'trezor' ? '.selected' : ''}`,
- { onClick: _ => this.setState({selectedDevice: 'trezor'}) },
- h('img.hw-connect__btn__img', {
- src: 'images/trezor-logo.svg',
- })
- )
+ return h(
+ `button.hw-connect__btn${this.state.selectedDevice === 'trezor' ? '.selected' : ''}`,
+ { onClick: _ => this.setState({selectedDevice: 'trezor'}) },
+ h('img.hw-connect__btn__img', {
+ src: 'images/trezor-logo.svg',
+ })
+ )
}
renderConnectToLedgerButton () {
- return h(
- `button.hw-connect__btn${this.state.selectedDevice === 'ledger' ? '.selected' : ''}`,
- { onClick: _ => this.setState({selectedDevice: 'ledger'}) },
- h('img.hw-connect__btn__img', {
- src: 'images/ledger-logo.svg',
- })
- )
+ return h(
+ `button.hw-connect__btn${this.state.selectedDevice === 'ledger' ? '.selected' : ''}`,
+ { onClick: _ => this.setState({selectedDevice: 'ledger'}) },
+ h('img.hw-connect__btn__img', {
+ src: 'images/ledger-logo.svg',
+ })
+ )
}
renderButtons () {
@@ -57,30 +57,30 @@ class ConnectScreen extends Component {
}
renderUnsupportedBrowser () {
- return (
- h('div.new-account-connect-form.unsupported-browser', {}, [
- h('div.hw-connect', [
- h('h3.hw-connect__title', {}, this.context.t('browserNotSupported')),
- h('p.hw-connect__msg', {}, this.context.t('chromeRequiredForHardwareWallets')),
- ]),
- h(Button, {
- type: 'primary',
- large: true,
- onClick: () => global.platform.openWindow({
- url: 'https://google.com/chrome',
- }),
- }, this.context.t('downloadGoogleChrome')),
- ])
- )
+ return (
+ h('div.new-account-connect-form.unsupported-browser', {}, [
+ h('div.hw-connect', [
+ h('h3.hw-connect__title', {}, this.context.t('browserNotSupported')),
+ h('p.hw-connect__msg', {}, this.context.t('chromeRequiredForHardwareWallets')),
+ ]),
+ h(Button, {
+ type: 'primary',
+ large: true,
+ onClick: () => global.platform.openWindow({
+ url: 'https://google.com/chrome',
+ }),
+ }, this.context.t('downloadGoogleChrome')),
+ ])
+ )
}
renderHeader () {
- return (
- h('div.hw-connect__header', {}, [
- h('h3.hw-connect__header__title', {}, this.context.t(`hardwareWallets`)),
- h('p.hw-connect__header__msg', {}, this.context.t(`hardwareWalletsMsg`)),
- ])
- )
+ return (
+ h('div.hw-connect__header', {}, [
+ h('h3.hw-connect__header__title', {}, this.context.t(`hardwareWallets`)),
+ h('p.hw-connect__header__msg', {}, this.context.t(`hardwareWalletsMsg`)),
+ ])
+ )
}
getAffiliateLinks () {
@@ -96,10 +96,10 @@ class ConnectScreen extends Component {
}
renderTrezorAffiliateLink () {
- return h('div.hw-connect__get-hw', {}, [
- h('p.hw-connect__get-hw__msg', {}, this.context.t(`dontHaveAHardwareWallet`)),
- this.getAffiliateLinks(),
- ])
+ return h('div.hw-connect__get-hw', {}, [
+ h('p.hw-connect__get-hw__msg', {}, this.context.t(`dontHaveAHardwareWallet`)),
+ this.getAffiliateLinks(),
+ ])
}
@@ -108,89 +108,89 @@ class ConnectScreen extends Component {
}
renderLearnMore () {
- return (
- h('p.hw-connect__learn-more', {
- onClick: this.scrollToTutorial,
- }, [
- this.context.t('learnMore'),
- h('img.hw-connect__learn-more__arrow', { src: 'images/caret-right.svg'}),
- ])
- )
+ return (
+ h('p.hw-connect__learn-more', {
+ onClick: this.scrollToTutorial,
+ }, [
+ this.context.t('learnMore'),
+ h('img.hw-connect__learn-more__arrow', { src: 'images/caret-right.svg'}),
+ ])
+ )
}
renderTutorialSteps () {
- const steps = [
- {
- asset: 'hardware-wallet-step-1',
- dimensions: {width: '225px', height: '75px'},
- },
- {
- asset: 'hardware-wallet-step-2',
- dimensions: {width: '300px', height: '100px'},
- },
- {
- asset: 'hardware-wallet-step-3',
- dimensions: {width: '120px', height: '90px'},
- },
- ]
-
- return h('.hw-tutorial', {
- ref: node => { this.referenceNode = node },
+ const steps = [
+ {
+ asset: 'hardware-wallet-step-1',
+ dimensions: {width: '225px', height: '75px'},
+ },
+ {
+ asset: 'hardware-wallet-step-2',
+ dimensions: {width: '300px', height: '100px'},
},
- steps.map((step, i) => (
- h('div.hw-connect', {}, [
- h('h3.hw-connect__title', {}, this.context.t(`step${i + 1}HardwareWallet`)),
- h('p.hw-connect__msg', {}, this.context.t(`step${i + 1}HardwareWalletMsg`)),
- h('img.hw-connect__step-asset', { src: `images/${step.asset}.svg`, ...step.dimensions }),
- ])
- ))
- )
+ {
+ asset: 'hardware-wallet-step-3',
+ dimensions: {width: '120px', height: '90px'},
+ },
+ ]
+
+ return h('.hw-tutorial', {
+ ref: node => { this.referenceNode = node },
+ },
+ steps.map((step, i) => (
+ h('div.hw-connect', {}, [
+ h('h3.hw-connect__title', {}, this.context.t(`step${i + 1}HardwareWallet`)),
+ h('p.hw-connect__msg', {}, this.context.t(`step${i + 1}HardwareWalletMsg`)),
+ h('img.hw-connect__step-asset', { src: `images/${step.asset}.svg`, ...step.dimensions }),
+ ])
+ ))
+ )
}
renderFooter () {
- return (
- h('div.hw-connect__footer', {}, [
- h('h3.hw-connect__footer__title', {}, this.context.t(`readyToConnect`)),
- this.renderButtons(),
- h('p.hw-connect__footer__msg', {}, [
- this.context.t(`havingTroubleConnecting`),
- h('a.hw-connect__footer__link', {
- href: 'https://support.metamask.io/',
- target: '_blank',
- }, this.context.t('getHelp')),
- ]),
- ])
- )
+ return (
+ h('div.hw-connect__footer', {}, [
+ h('h3.hw-connect__footer__title', {}, this.context.t(`readyToConnect`)),
+ this.renderButtons(),
+ h('p.hw-connect__footer__msg', {}, [
+ this.context.t(`havingTroubleConnecting`),
+ h('a.hw-connect__footer__link', {
+ href: 'https://support.metamask.io/',
+ target: '_blank',
+ }, this.context.t('getHelp')),
+ ]),
+ ])
+ )
}
renderConnectScreen () {
- return (
- h('div.new-account-connect-form', {}, [
- this.renderHeader(),
- this.renderButtons(),
- this.renderTrezorAffiliateLink(),
- this.renderLearnMore(),
- this.renderTutorialSteps(),
- this.renderFooter(),
- ])
- )
+ return (
+ h('div.new-account-connect-form', {}, [
+ this.renderHeader(),
+ this.renderButtons(),
+ this.renderTrezorAffiliateLink(),
+ this.renderLearnMore(),
+ this.renderTutorialSteps(),
+ this.renderFooter(),
+ ])
+ )
}
render () {
- if (this.props.browserSupported) {
- return this.renderConnectScreen()
- }
- return this.renderUnsupportedBrowser()
+ if (this.props.browserSupported) {
+ return this.renderConnectScreen()
+ }
+ return this.renderUnsupportedBrowser()
}
}
ConnectScreen.propTypes = {
- connectToHardwareWallet: PropTypes.func.isRequired,
- browserSupported: PropTypes.bool.isRequired,
+ connectToHardwareWallet: PropTypes.func.isRequired,
+ browserSupported: PropTypes.bool.isRequired,
}
ConnectScreen.contextTypes = {
- t: PropTypes.func,
+ t: PropTypes.func,
}
module.exports = ConnectScreen
diff --git a/ui/app/pages/create-account/connect-hardware/index.js b/ui/app/pages/create-account/connect-hardware/index.js
index 80a160205..66851c780 100644
--- a/ui/app/pages/create-account/connect-hardware/index.js
+++ b/ui/app/pages/create-account/connect-hardware/index.js
@@ -126,16 +126,16 @@ class ConnectHardwareForm extends Component {
onForgetDevice = (device) => {
this.props.forgetDevice(device)
- .then(_ => {
- this.setState({
- error: null,
- selectedAccount: null,
- accounts: [],
- unlocked: false,
+ .then(_ => {
+ this.setState({
+ error: null,
+ selectedAccount: null,
+ accounts: [],
+ unlocked: false,
+ })
+ }).catch(e => {
+ this.setState({ error: e.toString() })
})
- }).catch(e => {
- this.setState({ error: e.toString() })
- })
}
onUnlockAccount = (device) => {
@@ -145,28 +145,28 @@ class ConnectHardwareForm extends Component {
}
this.props.unlockHardwareWalletAccount(this.state.selectedAccount, device)
- .then(_ => {
- this.context.metricsEvent({
- eventOpts: {
- category: 'Accounts',
- action: 'Connected Hardware Wallet',
- name: 'Connected Account with: ' + device,
- },
- })
- this.props.history.push(DEFAULT_ROUTE)
- }).catch(e => {
- this.context.metricsEvent({
- eventOpts: {
- category: 'Accounts',
- action: 'Connected Hardware Wallet',
- name: 'Error connecting hardware wallet',
- },
- customVariables: {
- error: e.toString(),
- },
+ .then(_ => {
+ this.context.metricsEvent({
+ eventOpts: {
+ category: 'Accounts',
+ action: 'Connected Hardware Wallet',
+ name: 'Connected Account with: ' + device,
+ },
+ })
+ this.props.history.push(DEFAULT_ROUTE)
+ }).catch(e => {
+ this.context.metricsEvent({
+ eventOpts: {
+ category: 'Accounts',
+ action: 'Connected Hardware Wallet',
+ name: 'Error connecting hardware wallet',
+ },
+ customVariables: {
+ error: e.toString(),
+ },
+ })
+ this.setState({ error: e.toString() })
})
- this.setState({ error: e.toString() })
- })
}
onCancel = () => {
diff --git a/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js b/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js
index a2fb5a3bf..a5cf0f752 100644
--- a/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js
+++ b/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js
@@ -174,7 +174,7 @@ export default class ImportWithSeedPhrase extends PureComponent {
})
this.setState((prevState) => ({
- termsChecked: !prevState.termsChecked,
+ termsChecked: !prevState.termsChecked,
}))
}
diff --git a/ui/app/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.component.js b/ui/app/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.component.js
index e4d6afb76..bb187d634 100644
--- a/ui/app/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.component.js
+++ b/ui/app/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.component.js
@@ -102,7 +102,7 @@ export default class MetaMetricsOptIn extends Component {
.then(() => {
history.push(nextRoute)
})
- })
+ })
}}
cancelText={'No Thanks'}
hideCancel={false}
@@ -135,7 +135,7 @@ export default class MetaMetricsOptIn extends Component {
.then(() => {
history.push(nextRoute)
})
- })
+ })
}}
submitText={'I agree'}
submitButtonType={'primary'}
diff --git a/ui/app/pages/first-time-flow/select-action/select-action.component.js b/ui/app/pages/first-time-flow/select-action/select-action.component.js
index 9e7b84e93..5379952f1 100644
--- a/ui/app/pages/first-time-flow/select-action/select-action.component.js
+++ b/ui/app/pages/first-time-flow/select-action/select-action.component.js
@@ -40,7 +40,7 @@ export default class SelectAction extends PureComponent {
const { t } = this.context
return (
- <div className="select-action">
+ <div className="select-action">
<MetaFoxLogo />
<div className="select-action__wrapper">
@@ -95,7 +95,7 @@ export default class SelectAction extends PureComponent {
</div>
</div>
- </div>
+ </div>
)
}
}
diff --git a/ui/app/pages/home/home.component.js b/ui/app/pages/home/home.component.js
index 01bec7db6..a3b486c57 100644
--- a/ui/app/pages/home/home.component.js
+++ b/ui/app/pages/home/home.component.js
@@ -40,7 +40,7 @@ export default class Home extends PureComponent {
// suggested new tokens
if (Object.keys(suggestedTokens).length > 0) {
- history.push(CONFIRM_ADD_SUGGESTED_TOKEN_ROUTE)
+ history.push(CONFIRM_ADD_SUGGESTED_TOKEN_ROUTE)
}
}
diff --git a/ui/app/pages/mobile-sync/index.js b/ui/app/pages/mobile-sync/index.js
index a8de4fce9..7fc3b540b 100644
--- a/ui/app/pages/mobile-sync/index.js
+++ b/ui/app/pages/mobile-sync/index.js
@@ -100,15 +100,15 @@ class MobileSyncPage extends Component {
}
if (message.event === 'start-sync') {
- this.startSyncing()
+ this.startSyncing()
} else if (message.event === 'connection-info') {
- this.handle && clearTimeout(this.handle)
- this.disconnectWebsockets()
- this.initWithCipherKeyAndChannelName(message.cipher, message.channel)
- this.initWebsockets()
+ this.handle && clearTimeout(this.handle)
+ this.disconnectWebsockets()
+ this.initWithCipherKeyAndChannelName(message.cipher, message.channel)
+ this.initWebsockets()
} else if (message.event === 'end-sync') {
- this.disconnectWebsockets()
- this.setState({syncing: false, completed: true})
+ this.disconnectWebsockets()
+ this.setState({syncing: false, completed: true})
}
},
})
@@ -126,10 +126,10 @@ class MobileSyncPage extends Component {
}
}
- // Calculating a PubNub Message Payload Size.
+ // Calculating a PubNub Message Payload Size.
calculatePayloadSize (channel, message) {
return encodeURIComponent(
- channel + JSON.stringify(message)
+ channel + JSON.stringify(message)
).length + 100
}
@@ -153,14 +153,14 @@ class MobileSyncPage extends Component {
channel: this.channelName,
sendByPost: false, // true to send via post
storeInHistory: false,
- },
- (status, response) => {
- if (!status.error) {
- resolve()
- } else {
- reject(response)
- }
- })
+ },
+ (status, response) => {
+ if (!status.error) {
+ resolve()
+ } else {
+ reject(response)
+ }
+ })
})
}
@@ -199,16 +199,16 @@ class MobileSyncPage extends Component {
sendMessage (data, pkg, count) {
return new Promise((resolve, reject) => {
this.pubnub.publish(
- {
- message: {
- event: 'syncing-data',
- data,
- totalPkg: count,
- currentPkg: pkg,
- },
- channel: this.channelName,
- sendByPost: false, // true to send via post
- storeInHistory: false,
+ {
+ message: {
+ event: 'syncing-data',
+ data,
+ totalPkg: count,
+ currentPkg: pkg,
+ },
+ channel: this.channelName,
+ sendByPost: false, // true to send via post
+ storeInHistory: false,
},
(status, response) => {
if (!status.error) {
@@ -229,7 +229,7 @@ class MobileSyncPage extends Component {
renderWarning (text) {
return (
h('.page-container__warning-container', [
- h('.page-container__warning-message', [
+ h('.page-container__warning-message', [
h('div', [text]),
]),
])
@@ -245,12 +245,12 @@ class MobileSyncPage extends Component {
if (this.state.completed) {
return h('div.reveal-seed__content', {},
- h('label.reveal-seed__label', {
- style: {
- width: '100%',
- textAlign: 'center',
- },
- }, t('syncWithMobileComplete')),
+ h('label.reveal-seed__label', {
+ style: {
+ width: '100%',
+ textAlign: 'center',
+ },
+ }, t('syncWithMobileComplete')),
)
}
@@ -303,8 +303,8 @@ class MobileSyncPage extends Component {
h('div', [
h('label.reveal-seed__label', {
style: {
- width: '100%',
- textAlign: 'center',
+ width: '100%',
+ textAlign: 'center',
},
}, t('syncWithMobileScanThisCode')),
h('.div.qr-wrapper', {
@@ -370,7 +370,7 @@ class MobileSyncPage extends Component {
this.state.screen === PASSWORD_PROMPT_SCREEN ? h('.page-container__subtitle', this.context.t('syncWithMobileDescNewUsers')) : null,
]),
h('.page-container__content', [
- this.renderContent(),
+ this.renderContent(),
]),
this.renderFooter(),
])
diff --git a/ui/app/pages/routes/index.js b/ui/app/pages/routes/index.js
index 0f4737f22..2f7caf3bf 100644
--- a/ui/app/pages/routes/index.js
+++ b/ui/app/pages/routes/index.js
@@ -194,16 +194,16 @@ class Routes extends Component {
const { transaction: sidebarTransaction } = props || {}
const sidebarOnOverlayClose = sidebarType === WALLET_VIEW_SIDEBAR
- ? () => {
- this.context.metricsEvent({
- eventOpts: {
- category: 'Navigation',
- action: 'Wallet Sidebar',
- name: 'Closed Sidebare Via Overlay',
- },
- })
- }
- : null
+ ? () => {
+ this.context.metricsEvent({
+ eventOpts: {
+ category: 'Navigation',
+ action: 'Wallet Sidebar',
+ name: 'Closed Sidebare Via Overlay',
+ },
+ })
+ }
+ : null
return (
<div
diff --git a/ui/app/pages/send/account-list-item/account-list-item.container.js b/ui/app/pages/send/account-list-item/account-list-item.container.js
index 21f800306..3fadec4f8 100644
--- a/ui/app/pages/send/account-list-item/account-list-item.container.js
+++ b/ui/app/pages/send/account-list-item/account-list-item.container.js
@@ -1,8 +1,8 @@
import { connect } from 'react-redux'
import {
- getConversionRate,
- getCurrentCurrency,
- getNativeCurrency,
+ getConversionRate,
+ getCurrentCurrency,
+ getNativeCurrency,
} from '../send.selectors.js'
import {
getIsMainnet,
diff --git a/ui/app/pages/send/send-content/add-recipient/add-recipient.selectors.js b/ui/app/pages/send/send-content/add-recipient/add-recipient.selectors.js
index a6160d335..a39db7813 100644
--- a/ui/app/pages/send/send-content/add-recipient/add-recipient.selectors.js
+++ b/ui/app/pages/send/send-content/add-recipient/add-recipient.selectors.js
@@ -12,7 +12,7 @@ function getToDropdownOpen (state) {
}
function sendToIsInError (state) {
- return Boolean(state.send.errors.to)
+ return Boolean(state.send.errors.to)
}
function sendToIsInWarning (state) {
diff --git a/ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.component.js b/ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.component.js
index 7901ccef6..05545669a 100644
--- a/ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.component.js
+++ b/ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.component.js
@@ -64,12 +64,12 @@ export default class AmountMaxButton extends Component {
const { maxModeOn, buttonDataLoading, inError } = this.props
return (
- <div className={'send-v2__amount-max'} onClick={buttonDataLoading || inError ? null : this.onMaxClick}>
- <input type="checkbox" checked={maxModeOn} />
- <div className={classnames('send-v2__amount-max__button', { 'send-v2__amount-max__button__disabled': buttonDataLoading || inError })}>
- {this.context.t('max')}
- </div>
- </div>
- )
+ <div className={'send-v2__amount-max'} onClick={buttonDataLoading || inError ? null : this.onMaxClick}>
+ <input type="checkbox" checked={maxModeOn} />
+ <div className={classnames('send-v2__amount-max__button', { 'send-v2__amount-max__button__disabled': buttonDataLoading || inError })}>
+ {this.context.t('max')}
+ </div>
+ </div>
+ )
}
}
diff --git a/ui/app/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js b/ui/app/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js
index 3f5587318..37af59e29 100644
--- a/ui/app/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js
+++ b/ui/app/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js
@@ -39,11 +39,11 @@ export default class GasFeeDisplay extends Component {
)
: gasLoadingError
? <div className="currency-display.currency-display--message">
- {this.context.t('setGasPrice')}
- </div>
+ {this.context.t('setGasPrice')}
+ </div>
: <div className="currency-display">
- {this.context.t('loading')}
- </div>
+ {this.context.t('loading')}
+ </div>
}
<button
className="gas-fee-reset"
diff --git a/ui/app/pages/send/send-content/send-gas-row/send-gas-row.component.js b/ui/app/pages/send/send-content/send-gas-row/send-gas-row.component.js
index 4c09ed564..ed064695e 100644
--- a/ui/app/pages/send/send-content/send-gas-row/send-gas-row.component.js
+++ b/ui/app/pages/send/send-content/send-gas-row/send-gas-row.component.js
@@ -90,26 +90,26 @@ export default class SendGasRow extends Component {
const { metricsEvent } = this.context
const gasPriceButtonGroup = <div>
- <GasPriceButtonGroup
- className="gas-price-button-group--small"
- showCheck={false}
- {...gasPriceButtonGroupProps}
- handleGasPriceSelection={async (...args) => {
- metricsEvent({
- eventOpts: {
- category: 'Transactions',
- action: 'Edit Screen',
- name: 'Changed Gas Button',
- },
- })
- await gasPriceButtonGroupProps.handleGasPriceSelection(...args)
- if (maxModeOn) {
- this.setMaxAmount()
- }
- }}
- />
- { this.renderAdvancedOptionsButton() }
- </div>
+ <GasPriceButtonGroup
+ className="gas-price-button-group--small"
+ showCheck={false}
+ {...gasPriceButtonGroupProps}
+ handleGasPriceSelection={async (...args) => {
+ metricsEvent({
+ eventOpts: {
+ category: 'Transactions',
+ action: 'Edit Screen',
+ name: 'Changed Gas Button',
+ },
+ })
+ await gasPriceButtonGroupProps.handleGasPriceSelection(...args)
+ if (maxModeOn) {
+ this.setMaxAmount()
+ }
+ }}
+ />
+ { this.renderAdvancedOptionsButton() }
+ </div>
const gasFeeDisplay = <GasFeeDisplay
conversionRate={conversionRate}
convertedCurrency={convertedCurrency}
@@ -134,7 +134,7 @@ export default class SendGasRow extends Component {
isSpeedUp={false}
/>
{ this.renderAdvancedOptionsButton() }
- </div>
+ </div>
if (advancedInlineGasShown) {
return advancedGasInputs
diff --git a/ui/app/pages/send/send-content/send-row-wrapper/send-row-warning-message/send-row-warning-message.component.js b/ui/app/pages/send/send-content/send-row-wrapper/send-row-warning-message/send-row-warning-message.component.js
index f1caa8f99..6ddddbb3d 100644
--- a/ui/app/pages/send/send-content/send-row-wrapper/send-row-warning-message/send-row-warning-message.component.js
+++ b/ui/app/pages/send/send-content/send-row-wrapper/send-row-warning-message/send-row-warning-message.component.js
@@ -18,7 +18,7 @@ export default class SendRowWarningMessage extends Component {
const warningMessage = warningType in warnings && warnings[warningType]
return (
- warningMessage
+ warningMessage
? <div className="send-v2__warning">{this.context.t(warningMessage)}</div>
: null
)
diff --git a/ui/app/pages/send/send-content/send-row-wrapper/tests/send-row-wrapper-component.test.js b/ui/app/pages/send/send-content/send-row-wrapper/tests/send-row-wrapper-component.test.js
index 30280e1d0..533ca2ebe 100644
--- a/ui/app/pages/send/send-content/send-row-wrapper/tests/send-row-wrapper-component.test.js
+++ b/ui/app/pages/send/send-content/send-row-wrapper/tests/send-row-wrapper-component.test.js
@@ -54,25 +54,25 @@ describe('SendContent Component', function () {
it('should render its second child as a child of the send-v2__form-field, if it has two children', () => {
wrapper = shallow(<SendRowWrapper
- errorType={'mockErrorType'}
- label={'mockLabel'}
- showError={false}
- >
- <span>Mock Custom Label Content</span>
- <span>Mock Form Field</span>
- </SendRowWrapper>)
+ errorType={'mockErrorType'}
+ label={'mockLabel'}
+ showError={false}
+ >
+ <span>Mock Custom Label Content</span>
+ <span>Mock Form Field</span>
+ </SendRowWrapper>)
assert.equal(wrapper.find('.send-v2__form-row > .send-v2__form-field').childAt(0).text(), 'Mock Form Field')
})
it('should render its first child as the last child of the send-v2__form-label, if it has two children', () => {
wrapper = shallow(<SendRowWrapper
- errorType={'mockErrorType'}
- label={'mockLabel'}
- showError={false}
- >
- <span>Mock Custom Label Content</span>
- <span>Mock Form Field</span>
- </SendRowWrapper>)
+ errorType={'mockErrorType'}
+ label={'mockLabel'}
+ showError={false}
+ >
+ <span>Mock Custom Label Content</span>
+ <span>Mock Form Field</span>
+ </SendRowWrapper>)
assert.equal(wrapper.find('.send-v2__form-row > .send-v2__form-label').childAt(1).text(), 'Mock Custom Label Content')
})
})
diff --git a/ui/app/pages/send/send-header/send-header.selectors.js b/ui/app/pages/send/send-header/send-header.selectors.js
index 2c0a907d8..01b90409b 100644
--- a/ui/app/pages/send/send-header/send-header.selectors.js
+++ b/ui/app/pages/send/send-header/send-header.selectors.js
@@ -29,14 +29,14 @@ function getTitleKey (state) {
}
function getSubtitleParams (state) {
- const isEditing = Boolean(getSendEditingTransactionId(state))
- const token = getSelectedToken(state)
+ const isEditing = Boolean(getSendEditingTransactionId(state))
+ const token = getSelectedToken(state)
- if (isEditing) {
- return [ 'editingTransaction' ]
- } else if (token) {
- return [ 'onlySendTokensToAccountAddress', [ token.symbol ] ]
- } else {
- return [ 'onlySendToEtherAddress' ]
- }
+ if (isEditing) {
+ return [ 'editingTransaction' ]
+ } else if (token) {
+ return [ 'onlySendTokensToAccountAddress', [ token.symbol ] ]
+ } else {
+ return [ 'onlySendToEtherAddress' ]
+ }
}
diff --git a/ui/app/pages/send/send.utils.js b/ui/app/pages/send/send.utils.js
index daf61bc1b..1f9bc202a 100644
--- a/ui/app/pages/send/send.utils.js
+++ b/ui/app/pages/send/send.utils.js
@@ -319,7 +319,7 @@ function estimateGasPriceFromRecentBlocks (recentBlocks) {
return parseInt(next, 16) < parseInt(currentLowest, 16) ? next : currentLowest
})
})
- .sort((a, b) => parseInt(a, 16) > parseInt(b, 16) ? 1 : -1)
+ .sort((a, b) => parseInt(a, 16) > parseInt(b, 16) ? 1 : -1)
return lowestPrices[Math.floor(lowestPrices.length / 2)]
}
diff --git a/ui/app/pages/send/tests/send-utils.test.js b/ui/app/pages/send/tests/send-utils.test.js
index bf9cba14a..4930b7ee1 100644
--- a/ui/app/pages/send/tests/send-utils.test.js
+++ b/ui/app/pages/send/tests/send-utils.test.js
@@ -72,9 +72,9 @@ describe('send utils', () => {
call_,
[12, 15, {
toNumericBase: 'hex',
- multiplicandBase: 16,
- multiplierBase: 16,
- } ]
+ multiplicandBase: 16,
+ multiplierBase: 16,
+ } ]
)
})
})
diff --git a/ui/app/pages/send/to-autocomplete.component.js b/ui/app/pages/send/to-autocomplete.component.js
index 183967c58..c65f93c07 100644
--- a/ui/app/pages/send/to-autocomplete.component.js
+++ b/ui/app/pages/send/to-autocomplete.component.js
@@ -27,10 +27,10 @@ export default class ToAutoComplete extends Component {
getListItemIcon (listItemAddress, toAddress) {
return toAddress && listItemAddress === toAddress
? <i className={'fa fa-check fa-lg'}
- style={{
- color: '#02c9b1',
- }}
- />
+ style={{
+ color: '#02c9b1',
+ }}
+ />
: null
}
@@ -121,8 +121,8 @@ export default class ToAutoComplete extends Component {
/>
{
to
- ? null
- : <i className={'fa fa-caret-down fa-lg send-v2__to-autocomplete__down-caret'}
+ ? null
+ : <i className={'fa fa-caret-down fa-lg send-v2__to-autocomplete__down-caret'}
onClick={() => this.handleInputEvent()}
style={{
style: {color: '#dedede'},
@@ -131,8 +131,8 @@ export default class ToAutoComplete extends Component {
}
{
dropdownOpen
- ? this.renderDropdown()
- : null
+ ? this.renderDropdown()
+ : null
}
</div>
)
diff --git a/ui/app/pages/settings/advanced-tab/advanced-tab.component.js b/ui/app/pages/settings/advanced-tab/advanced-tab.component.js
index 105cd89f9..d92b14501 100644
--- a/ui/app/pages/settings/advanced-tab/advanced-tab.component.js
+++ b/ui/app/pages/settings/advanced-tab/advanced-tab.component.js
@@ -33,7 +33,7 @@ export default class AdvancedTab extends PureComponent {
renderMobileSync () {
const { t } = this.context
const { history } = this.props
-//
+ //
return (
<div className="settings-page__content-row">
<div className="settings-page__content-item">
diff --git a/ui/app/pages/settings/advanced-tab/tests/advanced-tab-container.test.js b/ui/app/pages/settings/advanced-tab/tests/advanced-tab-container.test.js
index 62122073d..3f54350c5 100644
--- a/ui/app/pages/settings/advanced-tab/tests/advanced-tab-container.test.js
+++ b/ui/app/pages/settings/advanced-tab/tests/advanced-tab-container.test.js
@@ -35,12 +35,12 @@ describe('AdvancedTab Container', () => {
it('should map dispatch to props correctly', () => {
const props = mapDispatchToProps(() => 'mockDispatch')
- assert.ok(typeof props.setHexDataFeatureFlag === 'function')
- assert.ok(typeof props.setRpcTarget === 'function')
- assert.ok(typeof props.displayWarning === 'function')
- assert.ok(typeof props.showResetAccountConfirmationModal === 'function')
- assert.ok(typeof props.setAdvancedInlineGasFeatureFlag === 'function')
- assert.ok(typeof props.setShowFiatConversionOnTestnetsPreference === 'function')
- assert.ok(typeof props.setAutoLogoutTimeLimit === 'function')
+ assert.ok(typeof props.setHexDataFeatureFlag === 'function')
+ assert.ok(typeof props.setRpcTarget === 'function')
+ assert.ok(typeof props.displayWarning === 'function')
+ assert.ok(typeof props.showResetAccountConfirmationModal === 'function')
+ assert.ok(typeof props.setAdvancedInlineGasFeatureFlag === 'function')
+ assert.ok(typeof props.setShowFiatConversionOnTestnetsPreference === 'function')
+ assert.ok(typeof props.setAutoLogoutTimeLimit === 'function')
})
})
diff --git a/ui/app/pages/settings/contact-list-tab/add-contact/add-contact.component.js b/ui/app/pages/settings/contact-list-tab/add-contact/add-contact.component.js
index 871b2128b..f8c079fc3 100644
--- a/ui/app/pages/settings/contact-list-tab/add-contact/add-contact.component.js
+++ b/ui/app/pages/settings/contact-list-tab/add-contact/add-contact.component.js
@@ -84,15 +84,15 @@ export default class AddContact extends PureComponent {
return (
<div className="settings-page__content-row address-book__add-contact">
{this.state.ensAddress && <div className="address-book__view-contact__group">
- <Identicon address={this.state.ensAddress} diameter={60} />
- <div className="address-book__view-contact__group__value">
- { this.state.ensAddress }
- </div>
+ <Identicon address={this.state.ensAddress} diameter={60} />
+ <div className="address-book__view-contact__group__value">
+ { this.state.ensAddress }
+ </div>
</div>}
<div className="address-book__add-contact__content">
- <div className="address-book__view-contact__group">
+ <div className="address-book__view-contact__group">
<div className="address-book__view-contact__group__label">
- { t('userName') }
+ { t('userName') }
</div>
<TextField
type="text"
diff --git a/ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.component.js b/ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.component.js
index e9c2fed6f..4852bbc6a 100644
--- a/ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.component.js
+++ b/ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.component.js
@@ -31,7 +31,7 @@ export default class EditContact extends PureComponent {
error: '',
}
- render () {
+ render () {
const { t } = this.context
const { history, name, addToAddressBook, removeFromAddressBook, address, memo, viewRoute, listRoute, setAccountLabel } = this.props
@@ -51,9 +51,9 @@ export default class EditContact extends PureComponent {
</Button>
</div>
<div className="address-book__edit-contact__content">
- <div className="address-book__view-contact__group">
+ <div className="address-book__view-contact__group">
<div className="address-book__view-contact__group__label">
- { t('userName') }
+ { t('userName') }
</div>
<TextField
type="text"
diff --git a/ui/app/pages/settings/contact-list-tab/view-contact/view-contact.component.js b/ui/app/pages/settings/contact-list-tab/view-contact/view-contact.component.js
index 4f37b853b..d4fe045eb 100644
--- a/ui/app/pages/settings/contact-list-tab/view-contact/view-contact.component.js
+++ b/ui/app/pages/settings/contact-list-tab/view-contact/view-contact.component.js
@@ -25,7 +25,7 @@ export default class ViewContact extends PureComponent {
editRoute: PropTypes.string,
}
- render () {
+ render () {
const { t } = this.context
const { history, name, address, checkSummedAddress, memo, editRoute } = this.props
diff --git a/ui/app/pages/settings/networks-tab/networks-tab.component.js b/ui/app/pages/settings/networks-tab/networks-tab.component.js
index cf634058f..db5663036 100644
--- a/ui/app/pages/settings/networks-tab/networks-tab.component.js
+++ b/ui/app/pages/settings/networks-tab/networks-tab.component.js
@@ -50,16 +50,16 @@ export default class NetworksTab extends PureComponent {
return (
<div className="settings-page__sub-header">
- <div
- className="networks-tab__back-button"
- onClick={(networkIsSelected && !networkDefaultedToProvider) || networksTabIsInAddMode
- ? () => {
- setNetworksTabAddMode(false)
- setSelectedSettingsRpcUrl(null)
- }
- : () => this.props.history.push(SETTINGS_ROUTE)
+ <div
+ className="networks-tab__back-button"
+ onClick={(networkIsSelected && !networkDefaultedToProvider) || networksTabIsInAddMode
+ ? () => {
+ setNetworksTabAddMode(false)
+ setSelectedSettingsRpcUrl(null)
}
- />
+ : () => this.props.history.push(SETTINGS_ROUTE)
+ }
+ />
<span className="settings-page__sub-header-text">{ this.context.t('networks') }</span>
<div className="networks-tab__add-network-header-button-wrapper">
<Button
@@ -109,7 +109,7 @@ export default class NetworksTab extends PureComponent {
setNetworksTabAddMode(false)
setSelectedSettingsRpcUrl(rpcUrl)
}}
- >
+ >
<NetworkDropdownIcon
backgroundColor={iconColor || 'white'}
innerBorder={border}
@@ -223,16 +223,16 @@ export default class NetworksTab extends PureComponent {
{this.renderNetworksTabContent()}
{!networkIsSelected && !networksTabIsInAddMode
? <div className="networks-tab__add-network-button-wrapper">
- <Button
- type="primary"
- onClick={event => {
- event.preventDefault()
- setSelectedSettingsRpcUrl(null)
- setNetworksTabAddMode(true)
- }}
- >
- { this.context.t('addNetwork') }
- </Button>
+ <Button
+ type="primary"
+ onClick={event => {
+ event.preventDefault()
+ setSelectedSettingsRpcUrl(null)
+ setNetworksTabAddMode(true)
+ }}
+ >
+ { this.context.t('addNetwork') }
+ </Button>
</div>
: null
}