diff --git a/gui/src/main/java/io/bisq/gui/util/GUIUtil.java b/gui/src/main/java/io/bisq/gui/util/GUIUtil.java index da3795a8b6..f0f05166a1 100644 --- a/gui/src/main/java/io/bisq/gui/util/GUIUtil.java +++ b/gui/src/main/java/io/bisq/gui/util/GUIUtil.java @@ -273,28 +273,6 @@ public class GUIUtil { }; } - @Deprecated - public static StringConverter getTradeCurrencyConverter() { - return new StringConverter() { - @Override - public String toString(TradeCurrency tradeCurrency) { - String code = tradeCurrency.getCode(); - final String displayString = CurrencyUtil.getNameAndCode(code); - // http://boschista.deviantart.com/journal/Cool-ASCII-Symbols-214218618 - if (code.equals(GUIUtil.SHOW_ALL_FLAG)) - return "▶ " + Res.get("list.currency.showAll"); - else if (code.equals(GUIUtil.EDIT_FLAG)) - return "▼ " + Res.get("list.currency.editList"); - return tradeCurrency.getDisplayPrefix() + displayString; - } - - @Override - public TradeCurrency fromString(String s) { - return null; - } - }; - } - public static void updateConfidence(TransactionConfidence confidence, Tooltip tooltip, TxConfidenceIndicator txConfidenceIndicator) { if (confidence != null) { switch (confidence.getConfidenceType()) { diff --git a/gui/src/test/java/io/bisq/gui/util/GUIUtilTest.java b/gui/src/test/java/io/bisq/gui/util/GUIUtilTest.java index 7308d31031..bd487228f4 100644 --- a/gui/src/test/java/io/bisq/gui/util/GUIUtilTest.java +++ b/gui/src/test/java/io/bisq/gui/util/GUIUtilTest.java @@ -27,9 +27,8 @@ public class GUIUtilTest { @Test public void testTradeCurrencyConverter() { - Res.setBaseCurrencyCode("EUR"); - Res.setBaseCurrencyName("Euro"); Map offerCounts = new HashMap() {{ + put("BTC", 11); put("EUR", 10); }}; StringConverter tradeCurrencyConverter = GUIUtil.getTradeCurrencyConverter( @@ -38,6 +37,7 @@ public class GUIUtilTest { offerCounts ); + assertEquals("✦ BTC (BTC) - 11 offers", tradeCurrencyConverter.toString(bitcoin)); assertEquals("★ Euro (EUR) - 10 offers", tradeCurrencyConverter.toString(euro)); }