20: Add new JupiterPerpsEntryPriceVariableRefresher class
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
|||||||
|
package com.r35157.jupiterperpsalarm.impl.ref;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
public final class JupiterPerpsEntryPriceVariableRefresher {
|
||||||
|
|
||||||
|
public JupiterPerpsEntryPriceVariableRefresher(Map<String, String> variables) {
|
||||||
|
this.variables = Objects.requireNonNull(variables, "variables");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void refresh() {
|
||||||
|
String wallet = variables.get("JUPITER_PERPS_WALLET");
|
||||||
|
|
||||||
|
if (wallet == null || wallet.isBlank()) {
|
||||||
|
System.err.println("Cannot refresh Jupiter Perps entry price variables: JUPITER_PERPS_WALLET is not configured");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
System.out.println("Jupiter Perps entry price variable refresh requested for wallet: " + wallet);
|
||||||
|
}
|
||||||
|
|
||||||
|
private final Map<String, String> variables;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user