fix network enum error on startup in signet

This commit is contained in:
Craig Raw 2024-04-14 08:13:30 +02:00
parent 93893111c6
commit 9ec5b6ce26

View file

@ -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) {