Updated on 2026-08-14

This commit is contained in:
Tangem 2018-12-17 18:57:43 +03:00
parent d270021a08
commit ef355397fa
7 changed files with 594 additions and 4 deletions

View file

@ -8,6 +8,7 @@ import com.tangem.data.Blockchain;
import com.tangem.domain.wallet.bch.BitcoinCashNode;
import com.tangem.domain.wallet.btc.BitcoinNode;
import com.tangem.domain.wallet.btc.BitcoinNodeTestNet;
import com.tangem.domain.wallet.ltc.LitecoinNode;
import java.io.BufferedReader;
import java.io.IOException;
@ -144,6 +145,20 @@ public class ServerApiElectrum {
this.host = host;
this.port = port;
if (proto.equals("tcp")) {
return doElectrumRequestTcp(electrumRequest, host, port);
} else {
return doElectrumRequestSsl(electrumRequest, host, port);
}
} else if (ctx.getBlockchain() == Blockchain.Litecoin) {
LitecoinNode litecoinNode = LitecoinNode.values()[new Random().nextInt(LitecoinNode.values().length)];
host = litecoinNode.getHost();
port = litecoinNode.getPort();
proto = litecoinNode.getProto();
this.host = host;
this.port = port;
if (proto.equals("tcp")) {
return doElectrumRequestTcp(electrumRequest, host, port);
} else {