mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-04-21 08:06:33 -04:00
Add N/A if price is null
This commit is contained in:
parent
6908bbc283
commit
0827db65ea
@ -196,24 +196,23 @@ public class BSFormatter {
|
||||
return fiatFormat.noCode().format(fiat).toString();
|
||||
} catch (Throwable t) {
|
||||
log.warn("Exception at formatFiat: " + t.toString());
|
||||
return "";
|
||||
return "N/A " + fiat.getCurrencyCode();
|
||||
}
|
||||
} else {
|
||||
return "";
|
||||
return "N/A";
|
||||
}
|
||||
}
|
||||
|
||||
public String formatFiatWithCode(Fiat fiat) {
|
||||
if (fiat != null) {
|
||||
try {
|
||||
//return fiatFormat.postfixCode().format(fiat).toString();
|
||||
return fiatFormat.noCode().format(fiat).toString() + " " + fiat.getCurrencyCode();
|
||||
} catch (Throwable t) {
|
||||
log.warn("Exception at formatFiatWithCode: " + t.toString());
|
||||
return "";
|
||||
return "N/A " + fiat.getCurrencyCode();
|
||||
}
|
||||
} else {
|
||||
return "";
|
||||
return "N/A";
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user