20: Clean-up before update

This commit is contained in:
2026-06-28 11:48:08 +02:00
parent dac1b62628
commit 76446f8b73
@@ -34,6 +34,8 @@ public final class JupiterPerpsEntryPriceVariableRefresher {
+ " open Jupiter Perps positions for wallet: " + wallet + " open Jupiter Perps positions for wallet: " + wallet
); );
removeEntryPriceVariables();
for (JupiterPerpsPosition position : positions) { for (JupiterPerpsPosition position : positions) {
String variableName = createEntryPriceVariableName(position); String variableName = createEntryPriceVariableName(position);
@@ -57,6 +59,15 @@ public final class JupiterPerpsEntryPriceVariableRefresher {
} }
} }
private void removeEntryPriceVariables() {
variables.remove("SOL_LONG_ENTRY_PRICE");
variables.remove("SOL_SHORT_ENTRY_PRICE");
variables.remove("BTC_LONG_ENTRY_PRICE");
variables.remove("BTC_SHORT_ENTRY_PRICE");
variables.remove("ETH_LONG_ENTRY_PRICE");
variables.remove("ETH_SHORT_ENTRY_PRICE");
}
private static String createEntryPriceVariableName(JupiterPerpsPosition position) { private static String createEntryPriceVariableName(JupiterPerpsPosition position) {
String asset = switch (position.tradedTokenMint()) { String asset = switch (position.tradedTokenMint()) {
case "So11111111111111111111111111111111111111112" -> "SOL"; case "So11111111111111111111111111111111111111112" -> "SOL";