From 9ec5b6ce266bfe49928c2802cd3d5f4e05551fac Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Sun, 14 Apr 2024 08:13:30 +0200 Subject: [PATCH] fix network enum error on startup in signet --- .../sparrowwallet/sparrow/whirlpool/WhirlpoolServices.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/whirlpool/WhirlpoolServices.java b/src/main/java/com/sparrowwallet/sparrow/whirlpool/WhirlpoolServices.java index 9bb4e43c..565dfb8c 100644 --- a/src/main/java/com/sparrowwallet/sparrow/whirlpool/WhirlpoolServices.java +++ b/src/main/java/com/sparrowwallet/sparrow/whirlpool/WhirlpoolServices.java @@ -61,7 +61,11 @@ public class WhirlpoolServices { } public SamouraiNetwork getSamouraiNetwork() { - return SamouraiNetwork.valueOf(Network.get().getName().toUpperCase(Locale.ROOT)); + try { + return SamouraiNetwork.valueOf(Network.get().getName().toUpperCase(Locale.ROOT)); + } catch(IllegalArgumentException e) { + return SamouraiNetwork.TESTNET; + } } public Whirlpool getWhirlpool(Wallet wallet) {