mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-07-13 02:09:24 -04:00
Add N/A if price is null
This commit is contained in:
parent
6908bbc283
commit
0827db65ea
1 changed files with 4 additions and 5 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue