mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 18:03:12 +01:00
Merge remote-tracking branch 'upstream/master' into add-monospace-font-support-roboto
This commit is contained in:
commit
75ac5c8a66
@ -273,28 +273,6 @@ public class GUIUtil {
|
||||
};
|
||||
}
|
||||
|
||||
@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()) {
|
||||
|
@ -27,9 +27,8 @@ public class GUIUtilTest {
|
||||
|
||||
@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(
|
||||
@ -38,6 +37,7 @@ public class GUIUtilTest {
|
||||
offerCounts
|
||||
);
|
||||
|
||||
assertEquals("✦ BTC (BTC) - 11 offers", tradeCurrencyConverter.toString(bitcoin));
|
||||
assertEquals("★ Euro (EUR) - 10 offers", tradeCurrencyConverter.toString(euro));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user