diff --git a/src/main/java/com/sparrowwallet/sparrow/net/BroadcastSource.java b/src/main/java/com/sparrowwallet/sparrow/net/BroadcastSource.java index 2b8dbd08..6577f59c 100644 --- a/src/main/java/com/sparrowwallet/sparrow/net/BroadcastSource.java +++ b/src/main/java/com/sparrowwallet/sparrow/net/BroadcastSource.java @@ -46,7 +46,7 @@ public enum BroadcastSource { @Override public List getSupportedNetworks() { - return List.of(Network.MAINNET, Network.TESTNET, Network.SIGNET); + return List.of(Network.MAINNET, Network.TESTNET, Network.SIGNET, Network.TESTNET4); } protected URL getURL(HostAndPort proxy) throws MalformedURLException { @@ -56,6 +56,8 @@ public enum BroadcastSource { return new URL(getBaseUrl(proxy) + "/testnet/api/tx"); } else if(Network.get() == Network.SIGNET) { return new URL(getBaseUrl(proxy) + "/signet/api/tx"); + } else if(Network.get() == Network.TESTNET4) { + return new URL(getBaseUrl(proxy) + "/testnet4/api/tx"); } else { throw new IllegalStateException("Cannot broadcast transaction to " + getName() + " on network " + Network.get()); } @@ -77,6 +79,8 @@ public enum BroadcastSource { return new URL(getBaseUrl(proxy) + "/api/tx"); } else if(Network.get() == Network.TESTNET) { return new URL(getBaseUrl(proxy) + "/testnet/api/tx"); + } else if(Network.get() == Network.SIGNET) { + return new URL(getBaseUrl(proxy) + "/signet/api/tx"); } else { throw new IllegalStateException("Cannot broadcast transaction to " + getName() + " on network " + Network.get()); } diff --git a/src/main/java/com/sparrowwallet/sparrow/net/PublicElectrumServer.java b/src/main/java/com/sparrowwallet/sparrow/net/PublicElectrumServer.java index dfe0cba0..468ec242 100644 --- a/src/main/java/com/sparrowwallet/sparrow/net/PublicElectrumServer.java +++ b/src/main/java/com/sparrowwallet/sparrow/net/PublicElectrumServer.java @@ -17,14 +17,15 @@ public enum PublicElectrumServer { SETHFORPRIVACY_COM("fulcrum.sethforprivacy.com", "ssl://fulcrum.sethforprivacy.com:50002", Network.MAINNET), TESTNET_ARANGUREN_ORG("testnet.aranguren.org", "ssl://testnet.aranguren.org:51002", Network.TESTNET), TESTNET_QTORNADO_COM("testnet.qtornado.com", "ssl://testnet.qtornado.com:51002", Network.TESTNET), - SIGNET_MEMPOOL_SPACE("mempool.space", "ssl://mempool.space:60602", Network.SIGNET); + SIGNET_MEMPOOL_SPACE("mempool.space", "ssl://mempool.space:60602", Network.SIGNET), + TESTNET4_MEMPOOL_SPACE("mempool.space", "ssl://mempool.space:40002", Network.TESTNET4); PublicElectrumServer(String name, String url, Network network) { this.server = new Server(url, name); this.network = network; } - public static final List SUPPORTED_NETWORKS = List.of(Network.MAINNET, Network.TESTNET, Network.SIGNET); + public static final List SUPPORTED_NETWORKS = List.of(Network.MAINNET, Network.TESTNET, Network.SIGNET, Network.TESTNET4); private final Server server; private final Network network;