Updated on 2026-08-14
This commit is contained in:
parent
d270021a08
commit
ef355397fa
7 changed files with 594 additions and 4 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue