From 3f68ca43c287747c8a6bc3734e3c65c30ade11f5 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Tue, 1 Sep 2020 08:04:58 +0200 Subject: [PATCH] dont show uninitialized devices (trezor t) --- src/main/java/com/sparrowwallet/sparrow/io/Hwi.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/io/Hwi.java b/src/main/java/com/sparrowwallet/sparrow/io/Hwi.java index ba29ab50..913055e2 100644 --- a/src/main/java/com/sparrowwallet/sparrow/io/Hwi.java +++ b/src/main/java/com/sparrowwallet/sparrow/io/Hwi.java @@ -44,7 +44,7 @@ public class Hwi { String output = execute(command); Device[] devices = getGson().fromJson(output, Device[].class); - return Arrays.asList(devices); + return Arrays.stream(devices).filter(device -> device != null && device.getModel() != null).collect(Collectors.toList()); } catch(IOException e) { throw new ImportException(e); }