fixed ltc balance with price

This commit is contained in:
kAmMa 2024-10-08 15:59:58 +02:00
parent 05045cc37e
commit f49d0b1dbd

View File

@ -109,10 +109,10 @@ public class MiningBean {
try {
if (ltcWallet != null && !"null".equals(ltcWallet) && ltcWallet.length() > 0) {
restRequest = getStringResponse(
"https://live.blockcypher.com/ltc/address/".concat(ltcWallet));
if (restRequest != null && restRequest.length() > 0 && restRequest.contains("<span class=\"dash-label\">Balance</span>")) {
int index = restRequest.indexOf("<span class=\"dash-label\">Balance</span>")+"<span class=\"dash-label\">Balance</span>".length();
String text = restRequest.substring(index+4, index+15);
"https://litecoinblockexplorer.net/address/".concat(ltcWallet));
if (restRequest != null && restRequest.length() > 0 && restRequest.contains("Final Balance</p><p class=\"title is-5\">")) {
int index = restRequest.indexOf("Final Balance</p><p class=\"title is-5\">")+"Final Balance</p><p class=\"title is-5\">".length();
String text = restRequest.substring(index, index+11);
double res = Double.parseDouble(text);
if (res > 0d) {