added shiba inu
This commit is contained in:
parent
7eac2c530e
commit
91e5afd4f8
@ -43,7 +43,8 @@ public class MiningBean {
|
|||||||
List<KeyValue> pool = new ArrayList<>();
|
List<KeyValue> pool = new ArrayList<>();
|
||||||
List<KeyValue> network = new ArrayList<>();
|
List<KeyValue> network = new ArrayList<>();
|
||||||
|
|
||||||
String[] cryptoCur = new String[] { "BTC", "LTC", "XRP", "ETH", "DOGE", "ADA" };
|
String[] cryptoCur = new String[] { "BTC", "LTC", "XRP", "ETH", "DOGE", "ADA", "SHIB" };
|
||||||
|
int[] roundPrices = new int[] { 4, 4, 4, 4, 4, 4, 6 };
|
||||||
double[] lastPrices = new double[cryptoCur.length];
|
double[] lastPrices = new double[cryptoCur.length];
|
||||||
|
|
||||||
ltcapikey = request.getParameter("ltcapikey");
|
ltcapikey = request.getParameter("ltcapikey");
|
||||||
@ -83,7 +84,8 @@ public class MiningBean {
|
|||||||
|
|
||||||
lastPrices[pos] = price;
|
lastPrices[pos] = price;
|
||||||
if (price > 0d)
|
if (price > 0d)
|
||||||
resultStr = curSym + String.format("%.4f",(price)) + " ("+String.format("%.2f",(change))+"%)";
|
resultStr = curSym + String.format("%."+roundPrices[pos]+"f", (price)) + " (" + String.format("%.2f", (change))
|
||||||
|
+ "%)";
|
||||||
else
|
else
|
||||||
resultStr = "Unknown";
|
resultStr = "Unknown";
|
||||||
KeyValue wi = new KeyValue();
|
KeyValue wi = new KeyValue();
|
||||||
@ -520,8 +522,8 @@ public class MiningBean {
|
|||||||
for (KeyValue kv : prices) {
|
for (KeyValue kv : prices) {
|
||||||
if (kv.getColor() == null)
|
if (kv.getColor() == null)
|
||||||
kv.setColor("#00CCFF");
|
kv.setColor("#00CCFF");
|
||||||
tmp = tmp.concat("<pair><key>").concat(
|
tmp = tmp.concat("<pair><key>").concat(kv.getKey().concat("</key>").concat("<value>").concat(kv.getValue())
|
||||||
kv.getKey().concat("</key>").concat("<value>").concat(kv.getValue()).concat("</value>").concat("<color>").concat(kv.getColor()).concat("</color></pair>"));
|
.concat("</value>").concat("<color>").concat(kv.getColor()).concat("</color></pair>"));
|
||||||
}
|
}
|
||||||
res = res.replace("#PRICES#", tmp);
|
res = res.replace("#PRICES#", tmp);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user