diff options
author | Dan Miller <danjm.com@gmail.com> | 2018-10-26 13:50:36 +0800 |
---|---|---|
committer | Dan Miller <danjm.com@gmail.com> | 2018-12-04 11:36:22 +0800 |
commit | e3f015c88f30fb4243ebbb3d2f109be8f3d68196 (patch) | |
tree | 62f96055f085624acf1a5fe91365f207daee2f0a /ui/app/app.js | |
parent | 9b9a2cc2e00618167d5fac8103e928fc16153b2d (diff) | |
download | tangerine-wallet-browser-e3f015c88f30fb4243ebbb3d2f109be8f3d68196.tar tangerine-wallet-browser-e3f015c88f30fb4243ebbb3d2f109be8f3d68196.tar.gz tangerine-wallet-browser-e3f015c88f30fb4243ebbb3d2f109be8f3d68196.tar.bz2 tangerine-wallet-browser-e3f015c88f30fb4243ebbb3d2f109be8f3d68196.tar.lz tangerine-wallet-browser-e3f015c88f30fb4243ebbb3d2f109be8f3d68196.tar.xz tangerine-wallet-browser-e3f015c88f30fb4243ebbb3d2f109be8f3d68196.tar.zst tangerine-wallet-browser-e3f015c88f30fb4243ebbb3d2f109be8f3d68196.zip |
Adds speed up slide-in gas customization sidebar
Diffstat (limited to 'ui/app/app.js')
-rw-r--r-- | ui/app/app.js | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/ui/app/app.js b/ui/app/app.js index 5405f8495..10428d1fd 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -43,6 +43,10 @@ const Alert = require('./components/alert') import AppHeader from './components/app-header' import UnlockPage from './components/pages/unlock-page' +import { + submittedPendingTransactionsSelector, +} from './selectors/transactions' + // Routes const { DEFAULT_ROUTE, @@ -106,12 +110,20 @@ class App extends Component { currentView, setMouseUserState, sidebar, + submittedPendingTransactions, } = this.props const isLoadingNetwork = network === 'loading' && currentView.name !== 'config' const loadMessage = loadingMessage || isLoadingNetwork ? this.getConnectingLabel(loadingMessage) : null log.debug('Main ui render function') + const { + isOpen: sidebarIsOpen, + transitionName: sidebarTransitionName, + type: sidebarType, + props: { transaction: sidebarTransaction }, + } = sidebar + return ( h('.flex-column.full-height', { className: classnames({ 'mouse-user-styles': isMouseUser }), @@ -139,10 +151,12 @@ class App extends Component { // sidebar h(Sidebar, { - sidebarOpen: sidebar.isOpen, + sidebarOpen: sidebarIsOpen, + sidebarShouldClose: sidebarTransaction && !submittedPendingTransactions.find(({ id }) => id === sidebarTransaction.id), hideSidebar: this.props.hideSidebar, - transitionName: sidebar.transitionName, - type: sidebar.type, + transitionName: sidebarTransitionName, + type: sidebarType, + sidebarProps: sidebar.props, }), // network dropdown @@ -254,6 +268,7 @@ App.propTypes = { activeAddress: PropTypes.string, unapprovedTxs: PropTypes.object, seedWords: PropTypes.string, + submittedPendingTransactions: PropTypes.array, unapprovedMsgCount: PropTypes.number, unapprovedPersonalMsgCount: PropTypes.number, unapprovedTypedMessagesCount: PropTypes.number, @@ -313,6 +328,7 @@ function mapStateToProps (state) { isOnboarding: Boolean(!noActiveNotices || seedWords || !isInitialized), isPopup: state.metamask.isPopup, seedWords: state.metamask.seedWords, + submittedPendingTransactions: submittedPendingTransactionsSelector(state), unapprovedTxs, unapprovedMsgs: state.metamask.unapprovedMsgs, unapprovedMsgCount, |