diff options
author | Chi Kei Chan <chikeichan@gmail.com> | 2017-10-24 16:07:51 +0800 |
---|---|---|
committer | Chi Kei Chan <chikeichan@gmail.com> | 2017-10-24 16:07:51 +0800 |
commit | 6daa8343234cf2a0bc32ed434ee3acae6100fd38 (patch) | |
tree | bed67a581829e87b60d39f4b773b35c1f13fcd54 /ui/app/app.js | |
parent | 966e4cfd1189f7c115cfc552796c1353060d2125 (diff) | |
download | tangerine-wallet-browser-6daa8343234cf2a0bc32ed434ee3acae6100fd38.tar tangerine-wallet-browser-6daa8343234cf2a0bc32ed434ee3acae6100fd38.tar.gz tangerine-wallet-browser-6daa8343234cf2a0bc32ed434ee3acae6100fd38.tar.bz2 tangerine-wallet-browser-6daa8343234cf2a0bc32ed434ee3acae6100fd38.tar.lz tangerine-wallet-browser-6daa8343234cf2a0bc32ed434ee3acae6100fd38.tar.xz tangerine-wallet-browser-6daa8343234cf2a0bc32ed434ee3acae6100fd38.tar.zst tangerine-wallet-browser-6daa8343234cf2a0bc32ed434ee3acae6100fd38.zip |
Disable network dropdown on conf tx screen
Diffstat (limited to 'ui/app/app.js')
-rw-r--r-- | ui/app/app.js | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/ui/app/app.js b/ui/app/app.js index 35ff8603a..0cfbb5af5 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -203,6 +203,16 @@ App.prototype.renderSidebar = function () { } App.prototype.renderAppBar = function () { + const { + isUnlocked, + network, + provider, + networkDropdownOpen, + showNetworkDropdown, + hideNetworkDropdown, + currentView, + } = this.props + if (window.METAMASK_UI_TYPE === 'notification') { return null } @@ -243,22 +253,21 @@ App.prototype.renderAppBar = function () { }, [ // Network Indicator h(NetworkIndicator, { - network: this.props.network, - provider: this.props.provider, + network, + provider, + disabled: currentView.name === 'confTx', onClick: (event) => { event.preventDefault() event.stopPropagation() - if (this.props.networkDropdownOpen === false) { - this.props.showNetworkDropdown() - } else { - this.props.hideNetworkDropdown() - } + return networkDropdownOpen === false + ? showNetworkDropdown() + : hideNetworkDropdown() }, }), ]), - h('div.account-menu__icon', { onClick: this.props.toggleAccountMenu }, [ + isUnlocked && h('div.account-menu__icon', { onClick: this.props.toggleAccountMenu }, [ h(Identicon, { address: this.props.selectedAddress, diameter: 32, |