From cf79638cad26d5ab53086ed0dddf4427d8ac7cce Mon Sep 17 00:00:00 2001 From: Vladimir Volek Date: Thu, 16 Aug 2018 21:47:01 +0200 Subject: [PATCH] Fixed menu state --- src/js/views/Wallet/components/LeftNavigation/index.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/js/views/Wallet/components/LeftNavigation/index.js b/src/js/views/Wallet/components/LeftNavigation/index.js index 9327c554..e99c2cd7 100644 --- a/src/js/views/Wallet/components/LeftNavigation/index.js +++ b/src/js/views/Wallet/components/LeftNavigation/index.js @@ -40,7 +40,7 @@ class LeftNavigation extends Component { componentWillReceiveProps() { const { deviceDropdownOpened } = this.props; const { selectedDevice } = this.props.wallet; - const { network } = this.props.location; + const { network } = this.props.location.state; const hasFeatures = selectedDevice && selectedDevice.features; const deviceReady = hasFeatures && !selectedDevice.features.bootloader_mode && selectedDevice.features.initialized; @@ -81,9 +81,13 @@ class LeftNavigation extends Component { } shouldRenderAccounts() { - const { network } = this.props.location; const { selectedDevice } = this.props.wallet; - return selectedDevice && network && !this.state.shouldRenderDeviceSelection && this.state.animationType === 'slide-left'; + return selectedDevice + && this.props.location + && this.props.location.state + && this.props.location.state.network + && !this.state.shouldRenderDeviceSelection + && this.state.animationType === 'slide-left'; } shouldRenderCoins() {