mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-06 05:34:50 -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();
|
return fiatFormat.noCode().format(fiat).toString();
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
log.warn("Exception at formatFiat: " + t.toString());
|
log.warn("Exception at formatFiat: " + t.toString());
|
||||||
return "";
|
return "N/A " + fiat.getCurrencyCode();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return "";
|
return "N/A";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String formatFiatWithCode(Fiat fiat) {
|
public String formatFiatWithCode(Fiat fiat) {
|
||||||
if (fiat != null) {
|
if (fiat != null) {
|
||||||
try {
|
try {
|
||||||
//return fiatFormat.postfixCode().format(fiat).toString();
|
|
||||||
return fiatFormat.noCode().format(fiat).toString() + " " + fiat.getCurrencyCode();
|
return fiatFormat.noCode().format(fiat).toString() + " " + fiat.getCurrencyCode();
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
log.warn("Exception at formatFiatWithCode: " + t.toString());
|
log.warn("Exception at formatFiatWithCode: " + t.toString());
|
||||||
return "";
|
return "N/A " + fiat.getCurrencyCode();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return "";
|
return "N/A";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue