From 889132b16cbafbb5a8e35dd2cf6acc9a7fe3d5fa Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 21 Mar 2017 06:57:49 -0700 Subject: Add action to hide loading indication on an incorrect pw. --- ui/app/actions.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'ui') diff --git a/ui/app/actions.js b/ui/app/actions.js index b09021577..13a9cf547 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -269,7 +269,10 @@ function requestRevealSeed (password) { dispatch(actions.showLoadingIndication()) log.debug(`background.submitPassword`) background.submitPassword(password, (err) => { - if (err) return dispatch(actions.displayWarning(err.message)) + if (err) { + dispatch(actions.hideLoadingIndication()) + return dispatch(actions.displayWarning(err.message)) + } log.debug(`background.placeSeedWords`) background.placeSeedWords((err) => { if (err) return dispatch(actions.displayWarning(err.message)) @@ -698,7 +701,7 @@ function setRpcTarget (newRpc) { } } -// Calls the addressBookController to add a new address. +// Calls the addressBookController to add a new address. function addToAddressBook (recipient, nickname) { log.debug(`background.addToAddressBook`) return (dispatch) => { -- cgit From 605c2a7404ba235aa4894a5b6f4b6afa6b41004f Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 21 Mar 2017 09:15:12 -0700 Subject: Remove redundant removal of loading indicator. Integrate loading indicator disappear with display warning. --- ui/app/actions.js | 7 ++----- ui/app/reducers/app.js | 1 + 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'ui') diff --git a/ui/app/actions.js b/ui/app/actions.js index 13a9cf547..ac54158d0 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -215,7 +215,7 @@ function confirmSeedWords () { dispatch(actions.showLoadingIndication()) log.debug(`background.clearSeedWordCache`) background.clearSeedWordCache((err, account) => { - dispatch(actions.hideLoadingIndication()) + // dispatch(actions.hideLoadingIndication()) if (err) { return dispatch(actions.displayWarning(err.message)) } @@ -231,7 +231,7 @@ function createNewVaultAndRestore (password, seed) { dispatch(actions.showLoadingIndication()) log.debug(`background.createNewVaultAndRestore`) background.createNewVaultAndRestore(password, seed, (err) => { - dispatch(actions.hideLoadingIndication()) + // dispatch(actions.hideLoadingIndication()) if (err) return dispatch(actions.displayWarning(err.message)) dispatch(actions.showAccountsPage()) }) @@ -270,13 +270,11 @@ function requestRevealSeed (password) { log.debug(`background.submitPassword`) background.submitPassword(password, (err) => { if (err) { - dispatch(actions.hideLoadingIndication()) return dispatch(actions.displayWarning(err.message)) } log.debug(`background.placeSeedWords`) background.placeSeedWords((err) => { if (err) return dispatch(actions.displayWarning(err.message)) - dispatch(actions.hideLoadingIndication()) }) }) } @@ -299,7 +297,6 @@ function importNewAccount (strategy, args) { dispatch(actions.showLoadingIndication('This may take a while, be patient.')) log.debug(`background.importAccountWithStrategy`) background.importAccountWithStrategy(strategy, args, (err) => { - dispatch(actions.hideLoadingIndication()) if (err) return dispatch(actions.displayWarning(err.message)) log.debug(`background.getState`) background.getState((err, newState) => { diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js index 7ea1e1d7c..b9e3f7b16 100644 --- a/ui/app/reducers/app.js +++ b/ui/app/reducers/app.js @@ -426,6 +426,7 @@ function reduceApp (state, action) { case actions.DISPLAY_WARNING: return extend(appState, { warning: action.value, + isLoading: false, }) case actions.HIDE_WARNING: -- cgit From b0c0c30689773113ce592b0540de10696e54d372 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 21 Mar 2017 13:38:27 -0700 Subject: Uncomment lines relating to showing indicator. --- ui/app/actions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ui') diff --git a/ui/app/actions.js b/ui/app/actions.js index ac54158d0..2fefccf9f 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -215,7 +215,7 @@ function confirmSeedWords () { dispatch(actions.showLoadingIndication()) log.debug(`background.clearSeedWordCache`) background.clearSeedWordCache((err, account) => { - // dispatch(actions.hideLoadingIndication()) + dispatch(actions.hideLoadingIndication()) if (err) { return dispatch(actions.displayWarning(err.message)) } @@ -231,7 +231,7 @@ function createNewVaultAndRestore (password, seed) { dispatch(actions.showLoadingIndication()) log.debug(`background.createNewVaultAndRestore`) background.createNewVaultAndRestore(password, seed, (err) => { - // dispatch(actions.hideLoadingIndication()) + dispatch(actions.hideLoadingIndication()) if (err) return dispatch(actions.displayWarning(err.message)) dispatch(actions.showAccountsPage()) }) -- cgit From f2e40e85b7751e891ce04935ad85a984076495fd Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Wed, 22 Mar 2017 12:18:13 -0400 Subject: Add one more loading indication. --- ui/app/actions.js | 1 + 1 file changed, 1 insertion(+) (limited to 'ui') diff --git a/ui/app/actions.js b/ui/app/actions.js index 2fefccf9f..3b1fc0435 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -300,6 +300,7 @@ function importNewAccount (strategy, args) { if (err) return dispatch(actions.displayWarning(err.message)) log.debug(`background.getState`) background.getState((err, newState) => { + dispatch(actions.hideLoadingIndication()) if (err) { return dispatch(actions.displayWarning(err.message)) } -- cgit From 4116b37d32e467bbd4cbb113851667115d28cf64 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Wed, 22 Mar 2017 16:01:38 -0400 Subject: Modify css rule for unused hollow diamond. --- ui/app/css/lib.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/app/css/lib.css b/ui/app/css/lib.css index 99c6f1b9d..670dc9fd0 100644 --- a/ui/app/css/lib.css +++ b/ui/app/css/lib.css @@ -188,7 +188,7 @@ hr.horizontal-line { .hollow-diamond { transform: rotate(45deg); - border: 1px solid #038789; + border: 3px solid #690496; } .pending-dot { -- cgit From c00544de91caec4d76f34aeaf91f025292ae0384 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Wed, 22 Mar 2017 16:02:17 -0400 Subject: Add conditional kovan logic to etherscan link generators. --- ui/lib/account-link.js | 4 +++- ui/lib/explorer-link.js | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'ui') diff --git a/ui/lib/account-link.js b/ui/lib/account-link.js index 77db0851d..948f32da1 100644 --- a/ui/lib/account-link.js +++ b/ui/lib/account-link.js @@ -1,7 +1,6 @@ module.exports = function (address, network) { const net = parseInt(network) let link - switch (net) { case 1: // main net link = `http://etherscan.io/address/${address}` @@ -12,6 +11,9 @@ module.exports = function (address, network) { case 3: // ropsten test net link = `http://testnet.etherscan.io/address/${address}` break + case 42: // kovan test net + link = `http://kovan.etherscan.io/address/${address}` + break default: link = '' break diff --git a/ui/lib/explorer-link.js b/ui/lib/explorer-link.js index dc6be2984..7ae19cca0 100644 --- a/ui/lib/explorer-link.js +++ b/ui/lib/explorer-link.js @@ -5,9 +5,12 @@ module.exports = function (hash, network) { case 1: // main net prefix = '' break - case 3: // morden test net + case 3: // ropsten test net prefix = 'testnet.' break + case 42: // kovan test net + prefix = 'kovan.' + break default: prefix = '' } -- cgit From b3dfc4e639bf4e73784d8a53227cfc0bc0a650fd Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Wed, 22 Mar 2017 16:03:02 -0400 Subject: Add kovan conditional to config screen. --- ui/app/config.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ui') diff --git a/ui/app/config.js b/ui/app/config.js index 3f0507f48..444365de2 100644 --- a/ui/app/config.js +++ b/ui/app/config.js @@ -161,6 +161,11 @@ function currentProviderDisplay (metamaskState) { value = 'Ropsten Test Network' break + case 'kovan': + title = 'Current Network' + value = 'Kovan Test Network' + break + default: title = 'Current RPC' value = metamaskState.provider.rpcTarget -- cgit From 4757858df0ea63952ec8e435749a0f2df0782612 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Wed, 22 Mar 2017 16:03:51 -0400 Subject: Add conditional kovan to current network component. --- ui/app/components/network.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'ui') diff --git a/ui/app/components/network.js b/ui/app/components/network.js index 77805fd57..d9045167f 100644 --- a/ui/app/components/network.js +++ b/ui/app/components/network.js @@ -40,6 +40,9 @@ Network.prototype.render = function () { } else if (parseInt(networkNumber) === 3) { hoverText = 'Ropsten Test Network' iconName = 'ropsten-test-network' + } else if (providerName === 'kovan') { + hoverText = 'Kovan Test Network' + iconName = 'kovan-test-network' } else { hoverText = 'Unknown Private Network' iconName = 'unknown-private-network' @@ -70,6 +73,15 @@ Network.prototype.render = function () { }}, 'Ropsten Test Net'), ]) + case 'kovan-test-network': + return h('.network-indicator', [ + h('.menu-icon.hollow-diamond'), + h('.network-name', { + style: { + color: '#690496', + }}, + 'Kovan Test Net'), + ]) default: return h('.network-indicator', [ h('i.fa.fa-question-circle.fa-lg', { -- cgit From 34f3889eb00d41920c67ec2d4845626b5b480eb5 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Wed, 22 Mar 2017 16:04:28 -0400 Subject: Add kovan to drop-menu-item --- ui/app/components/drop-menu-item.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/app/components/drop-menu-item.js b/ui/app/components/drop-menu-item.js index 9f002234e..3eb6ec876 100644 --- a/ui/app/components/drop-menu-item.js +++ b/ui/app/components/drop-menu-item.js @@ -42,7 +42,10 @@ DropMenuItem.prototype.activeNetworkRender = function () { if (providerType === 'mainnet') return h('.check', '✓') break case 'Ropsten Test Network': - if (provider.type === 'testnet') return h('.check', '✓') + if (providerType === 'testnet') return h('.check', '✓') + break + case 'Kovan Test Network': + if (providerType === 'kovan') return h('.check', '✓') break case 'Localhost 8545': if (activeNetwork === 'http://localhost:8545') return h('.check', '✓') -- cgit From b26c53452e2817f4f00a4770eae8828731e97808 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Wed, 22 Mar 2017 16:05:04 -0400 Subject: Add Kovan test network to our application. --- ui/app/app.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ui') diff --git a/ui/app/app.js b/ui/app/app.js index 9c1ba8a3a..5a7596aca 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -255,6 +255,15 @@ App.prototype.renderNetworkDropdown = function () { provider: props.provider, }), + h(DropMenuItem, { + label: 'Kovan Test Network', + closeMenu: () => this.setState({ isNetworkMenuOpen: false}), + action: () => props.dispatch(actions.setProviderType('kovan')), + icon: h('.menu-icon.hollow-diamond'), + activeNetworkRender: props.network, + provider: props.provider, + }), + h(DropMenuItem, { label: 'Localhost 8545', closeMenu: () => this.setState({ isNetworkMenuOpen: false }), -- cgit From 5d149258427b25f34dca89e5dfaba57a4f1cb95b Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Wed, 22 Mar 2017 16:54:10 -0400 Subject: Fix styling of error message. --- ui/app/accounts/import/json.js | 3 +-- ui/app/accounts/import/private-key.js | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'ui') diff --git a/ui/app/accounts/import/json.js b/ui/app/accounts/import/json.js index 1c2b331d4..5ed31ab0a 100644 --- a/ui/app/accounts/import/json.js +++ b/ui/app/accounts/import/json.js @@ -60,7 +60,7 @@ JsonImportSubview.prototype.render = function () { }, }, 'Import'), - error ? h('span.warning', error) : null, + error ? h('span.error', error) : null, ]) ) } @@ -95,4 +95,3 @@ JsonImportSubview.prototype.createNewKeychain = function () { this.props.dispatch(actions.importNewAccount('JSON File', [ fileContents, password ])) } - diff --git a/ui/app/accounts/import/private-key.js b/ui/app/accounts/import/private-key.js index b139a0374..68ccee58e 100644 --- a/ui/app/accounts/import/private-key.js +++ b/ui/app/accounts/import/private-key.js @@ -48,7 +48,7 @@ PrivateKeyImportView.prototype.render = function () { }, }, 'Import'), - error ? h('span.warning', error) : null, + error ? h('span.error', error) : null, ]) ) } @@ -65,4 +65,3 @@ PrivateKeyImportView.prototype.createNewKeychain = function () { const privateKey = input.value this.props.dispatch(actions.importNewAccount('Private Key', [ privateKey ])) } - -- cgit From 41e276b0367281bb3e6481d0e7c6af89b7319f90 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Wed, 22 Mar 2017 17:46:51 -0400 Subject: Hide the password in the private key retrieval screen. --- ui/app/components/account-export.js | 1 + 1 file changed, 1 insertion(+) (limited to 'ui') diff --git a/ui/app/components/account-export.js b/ui/app/components/account-export.js index 38a1d28ef..888196c5d 100644 --- a/ui/app/components/account-export.js +++ b/ui/app/components/account-export.js @@ -52,6 +52,7 @@ ExportAccountView.prototype.render = function () { }, [ h('p.error', warning), h('input#exportAccount.sizing-input', { + type: 'password', placeholder: 'confirm password', onKeyPress: this.onExportKeyPress.bind(this), style: { -- cgit From 525c32ae604a148b803be307b6ac3cb7f9b8617a Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Thu, 23 Mar 2017 11:26:39 -0400 Subject: Enable etherscan linking on Kovan transaction list items. --- ui/app/components/transaction-list-item.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/app/components/transaction-list-item.js b/ui/app/components/transaction-list-item.js index 44d2dc587..ee32be7d3 100644 --- a/ui/app/components/transaction-list-item.js +++ b/ui/app/components/transaction-list-item.js @@ -28,7 +28,7 @@ TransactionListItem.prototype.render = function () { let isLinkable = false const numericNet = parseInt(network) - isLinkable = numericNet === 1 || numericNet === 3 + isLinkable = numericNet === 1 || numericNet === 3 || numericNet === 42 var isMsg = ('msgParams' in transaction) var isTx = ('txParams' in transaction) -- cgit