From f897f414fe5c50d5eceb8b70c44473902cedaba7 Mon Sep 17 00:00:00 2001 From: Thomas Huang Date: Tue, 11 Jun 2019 08:24:47 -0700 Subject: [PATCH 1/7] pin ethereumjs-tx (#6706) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bccc23ef9..8d700c897 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "eth-token-tracker": "^1.1.5", "eth-trezor-keyring": "^0.4.0", "ethereumjs-abi": "^0.6.4", - "ethereumjs-tx": "^1.3.7", + "ethereumjs-tx": "1.3.7", "ethereumjs-util": "github:ethereumjs/ethereumjs-util#ac5d0908536b447083ea422b435da27f26615de9", "ethereumjs-wallet": "^0.6.0", "etherscan-link": "^1.0.2", From 71390db4a3cd98e9a70abaae75b9e2864ebbddc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20Mi=C3=B1o?= Date: Wed, 12 Jun 2019 10:54:45 -0400 Subject: [PATCH 2/7] Feature: sync with mobile v2 (#6673) * handle two steps * generate new qr each 30 secs * handle change of channel cipher without changing qr code * fix typo --- ui/app/pages/mobile-sync/index.js | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/ui/app/pages/mobile-sync/index.js b/ui/app/pages/mobile-sync/index.js index 00a514534..a8de4fce9 100644 --- a/ui/app/pages/mobile-sync/index.js +++ b/ui/app/pages/mobile-sync/index.js @@ -16,6 +16,7 @@ import LoadingScreen from '../../components/ui/loading-screen' const PASSWORD_PROMPT_SCREEN = 'PASSWORD_PROMPT_SCREEN' const REVEAL_SEED_SCREEN = 'REVEAL_SEED_SCREEN' +const KEYS_GENERATION_TIME = 30000 class MobileSyncPage extends Component { static propTypes = { @@ -36,6 +37,8 @@ class MobileSyncPage extends Component { error: null, syncing: false, completed: false, + channelName: undefined, + cipherKey: undefined, } this.syncing = false @@ -53,16 +56,31 @@ class MobileSyncPage extends Component { this.setState({ seedWords: null, error: null }) this.props.requestRevealSeedWords(this.state.password) .then(seedWords => { - this.generateCipherKeyAndChannelName() + this.startKeysGeneration() this.setState({ seedWords, screen: REVEAL_SEED_SCREEN }) - this.initWebsockets() }) .catch(error => this.setState({ error: error.message })) } + startKeysGeneration () { + this.handle && clearTimeout(this.handle) + this.disconnectWebsockets() + this.generateCipherKeyAndChannelName() + this.initWebsockets() + this.handle = setTimeout(() => { + this.startKeysGeneration() + }, KEYS_GENERATION_TIME) + } + generateCipherKeyAndChannelName () { this.cipherKey = `${this.props.selectedAddress.substr(-4)}-${PubNub.generateUUID()}` this.channelName = `mm-${PubNub.generateUUID()}` + this.setState({cipherKey: this.cipherKey, channelName: this.channelName}) + } + + initWithCipherKeyAndChannelName (cipherKey, channelName) { + this.cipherKey = cipherKey + this.channelName = channelName } initWebsockets () { @@ -83,6 +101,11 @@ class MobileSyncPage extends Component { if (message.event === 'start-sync') { this.startSyncing() + } else if (message.event === 'connection-info') { + 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}) @@ -272,7 +295,7 @@ class MobileSyncPage extends Component { renderRevealSeedContent () { const qrImage = qrCode(0, 'M') - qrImage.addData(`metamask-sync:${this.channelName}|@|${this.cipherKey}`) + qrImage.addData(`metamask-sync:${this.state.channelName}|@|${this.state.cipherKey}`) qrImage.make() const { t } = this.context From 9a1a207ffae63962b2ae0ec1bdd7daa7a67eaa27 Mon Sep 17 00:00:00 2001 From: Chi Kei Chan Date: Wed, 12 Jun 2019 19:56:04 -0700 Subject: [PATCH 3/7] MetaMorph - Spacing and Typeface on Extension Main view (#6584) * wip * Style Update: Mobile App Header * wip * Style Update: mobile menu-bar * Style Update: Primary and Secondary balance on mobile main view * Style Update: Spacing for transaction-list and transaction-list-item * Address PR Comments * Fix full-width view * line-height fixes --- app/images/icons/3dots.svg | 5 + app/images/icons/caret-down.svg | 3 + app/images/icons/hamburger.svg | 7 + app/images/logo/metamask-fox.svg | 157 ++++-------------- ui/app/components/app/account-menu/index.scss | 2 +- .../app/app-header/app-header.component.js | 2 - ui/app/components/app/app-header/index.scss | 5 +- ui/app/components/app/menu-bar/index.scss | 19 ++- .../app/menu-bar/menu-bar.component.js | 4 +- ui/app/components/app/network.js | 12 +- .../app/selected-account/index.scss | 11 +- .../app/transaction-list-item/index.scss | 19 ++- .../transaction-list-item.component.js | 2 +- .../app/transaction-list/index.scss | 7 +- .../app/transaction-status/index.scss | 5 +- .../app/transaction-view-balance/index.scss | 14 +- .../components/ui/currency-display/index.scss | 1 + ui/app/css/itcss/components/network.scss | 20 ++- ui/app/css/itcss/settings/variables.scss | 18 ++ 19 files changed, 142 insertions(+), 171 deletions(-) create mode 100644 app/images/icons/3dots.svg create mode 100644 app/images/icons/caret-down.svg create mode 100644 app/images/icons/hamburger.svg diff --git a/app/images/icons/3dots.svg b/app/images/icons/3dots.svg new file mode 100644 index 000000000..07bbad137 --- /dev/null +++ b/app/images/icons/3dots.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/app/images/icons/caret-down.svg b/app/images/icons/caret-down.svg new file mode 100644 index 000000000..06790bf92 --- /dev/null +++ b/app/images/icons/caret-down.svg @@ -0,0 +1,3 @@ + + + diff --git a/app/images/icons/hamburger.svg b/app/images/icons/hamburger.svg new file mode 100644 index 000000000..7a6da3089 --- /dev/null +++ b/app/images/icons/hamburger.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/app/images/logo/metamask-fox.svg b/app/images/logo/metamask-fox.svg index f3c24f79e..60a827b02 100644 --- a/app/images/logo/metamask-fox.svg +++ b/app/images/logo/metamask-fox.svg @@ -1,128 +1,31 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ui/app/components/app/account-menu/index.scss b/ui/app/components/app/account-menu/index.scss index 9a61bf887..435dd6b2a 100644 --- a/ui/app/components/app/account-menu/index.scss +++ b/ui/app/components/app/account-menu/index.scss @@ -21,7 +21,7 @@ } &__icon { - margin-left: 20px; + margin-left: 1rem; cursor: pointer; &--disabled { diff --git a/ui/app/components/app/app-header/app-header.component.js b/ui/app/components/app/app-header/app-header.component.js index 343e0daab..171a3499f 100644 --- a/ui/app/components/app/app-header/app-header.component.js +++ b/ui/app/components/app/app-header/app-header.component.js @@ -101,8 +101,6 @@ export default class AppHeader extends PureComponent {
diff --git a/ui/app/components/app/app-header/index.scss b/ui/app/components/app/app-header/index.scss index d46b16f25..d3f37b7a2 100644 --- a/ui/app/components/app/app-header/index.scss +++ b/ui/app/components/app/app-header/index.scss @@ -1,6 +1,6 @@ .app-header { align-items: center; - background: $gallery; + background: $Grey-000; position: relative; z-index: $header-z-index; display: flex; @@ -9,7 +9,7 @@ flex: 0 0 auto; @media screen and (max-width: 575px) { - padding: 12px; + padding: 1rem; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); z-index: $mobile-header-z-index; } @@ -34,6 +34,7 @@ cursor: pointer; &--icon { + height: 32px; @media screen and (min-width: $break-large) { display: none; } diff --git a/ui/app/components/app/menu-bar/index.scss b/ui/app/components/app/menu-bar/index.scss index f699f4090..eaa50619c 100644 --- a/ui/app/components/app/menu-bar/index.scss +++ b/ui/app/components/app/menu-bar/index.scss @@ -5,19 +5,28 @@ align-items: center; flex: 0 0 auto; margin-bottom: 16px; - padding: 5px; - border-bottom: 1px solid #e5e5e5; + padding: 0 22px; + border-bottom: 1px solid $Grey-100; &__sidebar-button { - font-size: 1.25rem; + width: 20px; + height: 20px; + background-image: url(/images/icons/hamburger.svg); + background-repeat: no-repeat; + background-size: contain; + background-position: center; cursor: pointer; - padding: 10px; } &__open-in-browser { + width: 20px; + height: 20px; + background-image: url(/images/icons/3dots.svg); + background-repeat: no-repeat; + background-size: contain; + background-position: center; cursor: pointer; display: flex; justify-content: center; - padding: 10px; } } diff --git a/ui/app/components/app/menu-bar/menu-bar.component.js b/ui/app/components/app/menu-bar/menu-bar.component.js index e37fddda4..c830d8a19 100644 --- a/ui/app/components/app/menu-bar/menu-bar.component.js +++ b/ui/app/components/app/menu-bar/menu-bar.component.js @@ -30,7 +30,7 @@ export default class MenuBar extends PureComponent { position="bottom" >
{ this.context.metricsEvent({ eventOpts: { @@ -50,7 +50,7 @@ export default class MenuBar extends PureComponent { position="bottom" >
{ this.context.metricsEvent({ eventOpts: { diff --git a/ui/app/components/app/network.js b/ui/app/components/app/network.js index 9ee0a1e17..e778700cd 100644 --- a/ui/app/components/app/network.js +++ b/ui/app/components/app/network.js @@ -82,7 +82,7 @@ Network.prototype.render = function () { loading: networkNumber === 'loading', }), h('.network-name', context.t('mainnet')), - h('i.fa.fa-chevron-down.fa-lg.network-caret'), + h('.network-indicator__down-arrow'), ]) case 'ropsten-test-network': return h('.network-indicator', [ @@ -92,7 +92,7 @@ Network.prototype.render = function () { loading: networkNumber === 'loading', }), h('.network-name', context.t('ropsten')), - h('i.fa.fa-chevron-down.fa-lg.network-caret'), + h('.network-indicator__down-arrow'), ]) case 'kovan-test-network': return h('.network-indicator', [ @@ -102,7 +102,7 @@ Network.prototype.render = function () { loading: networkNumber === 'loading', }), h('.network-name', context.t('kovan')), - h('i.fa.fa-chevron-down.fa-lg.network-caret'), + h('.network-indicator__down-arrow'), ]) case 'rinkeby-test-network': return h('.network-indicator', [ @@ -112,7 +112,7 @@ Network.prototype.render = function () { loading: networkNumber === 'loading', }), h('.network-name', context.t('rinkeby')), - h('i.fa.fa-chevron-down.fa-lg.network-caret'), + h('.network-indicator__down-arrow'), ]) case 'goerli-test-network': return h('.network-indicator', [ @@ -122,7 +122,7 @@ Network.prototype.render = function () { loading: networkNumber === 'loading', }), h('.network-name', context.t('goerli')), - h('i.fa.fa-chevron-down.fa-lg.network-caret'), + h('.network-indicator__down-arrow'), ]) default: return h('.network-indicator', [ @@ -142,7 +142,7 @@ Network.prototype.render = function () { }), h('.network-name', providerName === 'localhost' ? context.t('localhost') : providerNick || context.t('privateNetwork')), - h('i.fa.fa-chevron-down.fa-lg.network-caret'), + h('.network-indicator__down-arrow'), ]) } })(), diff --git a/ui/app/components/app/selected-account/index.scss b/ui/app/components/app/selected-account/index.scss index 5339a228b..fa3079d77 100644 --- a/ui/app/components/app/selected-account/index.scss +++ b/ui/app/components/app/selected-account/index.scss @@ -7,15 +7,21 @@ &__name { max-width: 200px; + font-size: 1rem; + font-weight: 500; + line-height: 19px; + color: $black; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; text-align: center; + margin-bottom: 4px; } &__address { font-size: .75rem; - color: $silver-chalice; + line-height: .75rem; + color: #989a9b; } &__clickable { @@ -23,7 +29,8 @@ flex-direction: column; align-items: center; justify-content: center; - padding: 5px 15px; + margin: 4px 0; + padding: 6px 15px; border-radius: 10px; cursor: pointer; diff --git a/ui/app/components/app/transaction-list-item/index.scss b/ui/app/components/app/transaction-list-item/index.scss index 9e73a546c..4dba4b2c3 100644 --- a/ui/app/components/app/transaction-list-item/index.scss +++ b/ui/app/components/app/transaction-list-item/index.scss @@ -1,7 +1,7 @@ .transaction-list-item { box-sizing: border-box; min-height: 74px; - border-bottom: 1px solid $geyser; + border-bottom: 1px solid $Grey-100; display: flex; justify-content: center; align-items: center; @@ -19,7 +19,7 @@ "identicon nonce status secondary-amount"; @media screen and (max-width: $break-small) { - padding: 8px 20px 12px; + padding: .5rem 1rem; grid-template-columns: 45px 5fr 3fr; grid-template-areas: "nonce nonce nonce" @@ -44,12 +44,13 @@ &__action { text-transform: capitalize; - padding: 0 8px 2px 0; + padding: 0 0 4px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; grid-area: action; - align-self: end; + color: $Grey-800; + line-height: 20px; } &__status { @@ -72,7 +73,8 @@ align-self: start; @media screen and (max-width: $break-small) { - padding-bottom: 4px; + padding-bottom: 8px; + line-height: 12px; } } @@ -88,19 +90,22 @@ grid-area: primary-amount; align-self: end; justify-self: end; + line-height: 20px; @media screen and (max-width: $break-small) { - padding-bottom: 2px; + padding-bottom: 4px; + height: 100%; + color: $Grey-800; } } &--secondary { text-align: end; font-size: .75rem; - color: #5e6064; grid-area: secondary-amount; align-self: start; justify-self: end; + color: $Grey-500; } } diff --git a/ui/app/components/app/transaction-list-item/transaction-list-item.component.js b/ui/app/components/app/transaction-list-item/transaction-list-item.component.js index 0d4127b4f..80b26469b 100644 --- a/ui/app/components/app/transaction-list-item/transaction-list-item.component.js +++ b/ui/app/components/app/transaction-list-item/transaction-list-item.component.js @@ -179,7 +179,7 @@ export default class TransactionListItem extends PureComponent { Date: Mon, 17 Jun 2019 04:02:12 -0700 Subject: [PATCH 4/7] Wrap smaller custom block explorer url text (#6714) --- app/_locales/en/messages.json | 3 +++ .../components/app/dropdowns/account-details-dropdown.js | 5 ++++- ui/app/components/app/dropdowns/components/menu.js | 4 +++- ui/app/css/itcss/components/menu.scss | 7 ++++++- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index 41ba7ef7a..a0b084eb2 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -1742,6 +1742,9 @@ "viewAccount": { "message": "View Account" }, + "viewinExplorer": { + "message": "View in Explorer" + }, "viewOnCustomBlockExplorer": { "message": "View at $1" }, diff --git a/ui/app/components/app/dropdowns/account-details-dropdown.js b/ui/app/components/app/dropdowns/account-details-dropdown.js index cbeccdd81..a4c33620a 100644 --- a/ui/app/components/app/dropdowns/account-details-dropdown.js +++ b/ui/app/components/app/dropdowns/account-details-dropdown.js @@ -119,8 +119,11 @@ AccountDetailsDropdown.prototype.render = function () { this.props.onClose() }, text: (rpcPrefs.blockExplorerUrl - ? this.context.t('blockExplorerView', [rpcPrefs.blockExplorerUrl.match(/^https?:\/\/(.+)/)[1]]) + ? this.context.t('viewinExplorer') : this.context.t('viewOnEtherscan')), + subText: (rpcPrefs.blockExplorerUrl + ? rpcPrefs.blockExplorerUrl.match(/^https?:\/\/(.+)/)[1] + : null), icon: h(`img`, { src: 'images/open-etherscan.svg', style: { height: '15px' } }), }), isRemovable ? h(Item, { diff --git a/ui/app/components/app/dropdowns/components/menu.js b/ui/app/components/app/dropdowns/components/menu.js index f6d8a139e..63501eaa9 100644 --- a/ui/app/components/app/dropdowns/components/menu.js +++ b/ui/app/components/app/dropdowns/components/menu.js @@ -20,16 +20,18 @@ Item.prototype.render = function () { icon, children, text, + subText, className = '', onClick, } = this.props const itemClassName = `menu__item ${className} ${onClick ? 'menu__item--clickable' : ''}` const iconComponent = icon ? h('div.menu__item__icon', [icon]) : null const textComponent = text ? h('div.menu__item__text', text) : null + const subTextComponent = subText ? h('div.menu__item__subtext', subText) : null return children ? h('div', { className: itemClassName, onClick }, children) - : h('div.menu__item', { className: itemClassName, onClick }, [ iconComponent, textComponent ] + : h('div.menu__item', { className: itemClassName, onClick }, [ iconComponent, textComponent, subTextComponent ] .filter(d => Boolean(d)) ) } diff --git a/ui/app/css/itcss/components/menu.scss b/ui/app/css/itcss/components/menu.scss index 6409ad545..7d71ea799 100644 --- a/ui/app/css/itcss/components/menu.scss +++ b/ui/app/css/itcss/components/menu.scss @@ -8,7 +8,7 @@ &__item { padding: 18px; display: flex; - flex-flow: row nowrap; + flex-flow: row wrap; align-items: center; position: relative; z-index: 201; @@ -39,6 +39,11 @@ font-size: 16px; line-height: 21px; } + + &__subtext { + font-size: 12px; + padding: 5px 0px 0px 30px; + } } &__divider { From a47370057e9453e49c1d83a17fcdda275affb940 Mon Sep 17 00:00:00 2001 From: Kirill Goncharov Date: Mon, 17 Jun 2019 14:07:34 +0300 Subject: [PATCH 5/7] Fix styles on 'import account' page, update help link (#6700) * Fix styles on 'import account' page, update help link * Update changelog --- CHANGELOG.md | 2 ++ ui/app/css/itcss/components/new-account.scss | 1 + ui/app/pages/create-account/import-account/json.js | 6 ++++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7f7baddf..cc9f67991 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Current Develop Branch +- [#6700](https://github.com/MetaMask/metamask-extension/pull/6700): Fix styles on 'import account' page, update help link + ## 6.6.1 Thu Jun 06 2019 - [#6691](https://github.com/MetaMask/metamask-extension/pull/6691): Revert "Improve ENS Address Input" to fix bugs on input field on non-main networks. diff --git a/ui/app/css/itcss/components/new-account.scss b/ui/app/css/itcss/components/new-account.scss index 7bfa2d443..b3aae8eec 100644 --- a/ui/app/css/itcss/components/new-account.scss +++ b/ui/app/css/itcss/components/new-account.scss @@ -143,6 +143,7 @@ flex-flow: column; align-items: center; margin-top: 29px; + width: 100%; } &__buttons { diff --git a/ui/app/pages/create-account/import-account/json.js b/ui/app/pages/create-account/import-account/json.js index ad430ba58..2482e49d1 100644 --- a/ui/app/pages/create-account/import-account/json.js +++ b/ui/app/pages/create-account/import-account/json.js @@ -8,9 +8,10 @@ const actions = require('../../../store/actions') const FileInput = require('react-simple-file-input').default const { DEFAULT_ROUTE } = require('../../../helpers/constants/routes') const { getMetaMaskAccounts } = require('../../../selectors/selectors') -const HELP_LINK = 'https://support.metamask.io/kb/article/7-importing-accounts' import Button from '../../../components/ui/button' +const HELP_LINK = 'https://metamask.zendesk.com/hc/en-us/articles/360015489351-Importing-Accounts' + class JsonImportSubview extends Component { constructor (props) { super(props) @@ -37,10 +38,11 @@ class JsonImportSubview extends Component { readAs: 'text', onLoad: this.onLoad.bind(this), style: { - margin: '20px 0px 12px 34%', + padding: '20px 0px 12px 15%', fontSize: '15px', display: 'flex', justifyContent: 'center', + width: '100%', }, }), From 18179fd34551680bd65df7c0c3caaa5945d1e94d Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Mon, 17 Jun 2019 11:35:47 -0230 Subject: [PATCH 6/7] Add delete to custom RPC form (#6718, #6650) --- app/_locales/en/messages.json | 3 + app/_locales/zh_TW/messages.json | 3 + test/e2e/beta/metamask-beta-ui.spec.js | 16 ++- .../page-container-footer.component.js | 4 +- ui/app/pages/settings/index.scss | 10 +- ui/app/pages/settings/networks-tab/index.scss | 30 +++- .../network-form/network-form.component.js | 128 ++++++++++++++---- .../networks-tab/networks-tab.component.js | 80 +++++++---- .../networks-tab/networks-tab.constants.js | 9 ++ .../networks-tab/networks-tab.container.js | 4 + ui/app/pages/settings/settings.component.js | 2 +- 11 files changed, 229 insertions(+), 60 deletions(-) diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index a0b084eb2..774ae4c85 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -454,6 +454,9 @@ "defaultNetwork": { "message": "The default network for Ether transactions is Main Net." }, + "delete": { + "message": "Delete" + }, "denExplainer": { "message": "Your DEN is your password-encrypted storage within MetaMask." }, diff --git a/app/_locales/zh_TW/messages.json b/app/_locales/zh_TW/messages.json index c645f2af1..4df95f72f 100644 --- a/app/_locales/zh_TW/messages.json +++ b/app/_locales/zh_TW/messages.json @@ -366,6 +366,9 @@ "defaultNetwork": { "message": "預設乙太幣交易網路為主網路" }, + "delete": { + "message": "刪除" + }, "denExplainer": { "message": "您的 DEN 是 MetaMask 中您的的密碼加密儲存庫。" }, diff --git a/test/e2e/beta/metamask-beta-ui.spec.js b/test/e2e/beta/metamask-beta-ui.spec.js index 06778ab99..15087c57f 100644 --- a/test/e2e/beta/metamask-beta-ui.spec.js +++ b/test/e2e/beta/metamask-beta-ui.spec.js @@ -1478,7 +1478,7 @@ describe('MetaMask', function () { await customRpcInput.clear() await customRpcInput.sendKeys(customRpcUrl) - const customRpcSave = await findElement(driver, By.css('.page-container__footer-button')) + const customRpcSave = await findElement(driver, By.css('.network-form__footer .btn-secondary')) await customRpcSave.click() await delay(largeDelayMs * 2) }) @@ -1504,5 +1504,19 @@ describe('MetaMask', function () { assert.equal(customRpcs.length, customRpcUrls.length) }) + + it('deletes a custom RPC', async () => { + const networkListItems = await findElements(driver, By.css('.networks-tab__networks-list-name')) + const lastNetworkListItem = networkListItems[networkListItems.length - 1] + await lastNetworkListItem.click() + await delay(100) + + const deleteButton = await findElement(driver, By.css('.btn-danger')) + await deleteButton.click() + await delay(regularDelayMs) + const newNetworkListItems = await findElements(driver, By.css('.networks-tab__networks-list-name')) + + assert.equal(networkListItems.length - 1, newNetworkListItems.length) + }) }) }) diff --git a/ui/app/components/ui/page-container/page-container-footer/page-container-footer.component.js b/ui/app/components/ui/page-container/page-container-footer/page-container-footer.component.js index 4ef203521..a2cf0100b 100644 --- a/ui/app/components/ui/page-container/page-container-footer/page-container-footer.component.js +++ b/ui/app/components/ui/page-container/page-container-footer/page-container-footer.component.js @@ -8,6 +8,7 @@ export default class PageContainerFooter extends Component { children: PropTypes.node, onCancel: PropTypes.func, cancelText: PropTypes.string, + cancelButtonType: PropTypes.string, onSubmit: PropTypes.func, submitText: PropTypes.string, disabled: PropTypes.bool, @@ -29,6 +30,7 @@ export default class PageContainerFooter extends Component { disabled, submitButtonType, hideCancel, + cancelButtonType, } = this.props return ( @@ -36,7 +38,7 @@ export default class PageContainerFooter extends Component {
{!hideCancel && + ) + } + + +
) } 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 2f921a892..f6c8443cf 100644 --- a/ui/app/pages/settings/networks-tab/networks-tab.component.js +++ b/ui/app/pages/settings/networks-tab/networks-tab.component.js @@ -25,6 +25,7 @@ export default class NetworksTab extends PureComponent { setNetworksTabAddMode: PropTypes.func.isRequired, setRpcTarget: PropTypes.func.isRequired, setSelectedSettingsRpcUrl: PropTypes.func.isRequired, + delRpcTarget: PropTypes.func.isRequired, providerUrl: PropTypes.string, providerType: PropTypes.string, networkDefaultedToProvider: PropTypes.bool, @@ -62,7 +63,7 @@ export default class NetworksTab extends PureComponent { { this.context.t('networks') }