Skip to content

Commit

Permalink
Merge pull request #1363 from ghubstan/issue-1184
Browse files Browse the repository at this point in the history
Add number of open offers to currency filter popups (Issue 1184 - Tidy up)
  • Loading branch information
ripcurlx authored Feb 16, 2018
2 parents 3d51f9d + 3cb6b73 commit e1fffeb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 24 deletions.
22 changes: 0 additions & 22 deletions gui/src/main/java/io/bisq/gui/util/GUIUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -273,28 +273,6 @@ public TradeCurrency fromString(String s) {
};
}

@Deprecated
public static StringConverter<TradeCurrency> getTradeCurrencyConverter() {
return new StringConverter<TradeCurrency>() {
@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()) {
Expand Down
4 changes: 2 additions & 2 deletions gui/src/test/java/io/bisq/gui/util/GUIUtilTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ public void setup() {

@Test
public void testTradeCurrencyConverter() {
Res.setBaseCurrencyCode("EUR");
Res.setBaseCurrencyName("Euro");
Map<String, Integer> offerCounts = new HashMap<String, Integer>() {{
put("BTC", 11);
put("EUR", 10);
}};
StringConverter<TradeCurrency> tradeCurrencyConverter = GUIUtil.getTradeCurrencyConverter(
Expand All @@ -38,6 +37,7 @@ public void testTradeCurrencyConverter() {
offerCounts
);

assertEquals("✦ BTC (BTC) - 11 offers", tradeCurrencyConverter.toString(bitcoin));
assertEquals("★ Euro (EUR) - 10 offers", tradeCurrencyConverter.toString(euro));
}

Expand Down

0 comments on commit e1fffeb

Please sign in to comment.