From a62559909d686d234637ca32d2ac102c7e9289dd Mon Sep 17 00:00:00 2001 From: Szymon Lesisz Date: Wed, 16 May 2018 16:08:30 +0200 Subject: [PATCH] disable device menu when there's only 1 device and it's unacquired --- src/js/components/wallet/aside/DeviceSelection.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/js/components/wallet/aside/DeviceSelection.js b/src/js/components/wallet/aside/DeviceSelection.js index 8de0b35a..8ce60e6c 100644 --- a/src/js/components/wallet/aside/DeviceSelection.js +++ b/src/js/components/wallet/aside/DeviceSelection.js @@ -50,10 +50,13 @@ export const DeviceSelect = (props: Props) => { const deviceCount = devices.length; const webusb: boolean = (transport && transport.version.indexOf('webusb') >= 0) ? true : false; - const disabled: boolean = (devices.length < 1 && !webusb); + const disabled: boolean = (devices.length < 1 && !webusb) || (devices.length === 1 && !selected.features); + if (disabled) { + css += " disabled"; + } return ( -
+
{ selected.instanceLabel } { deviceStatus }