Fix NaN Tipped

This commit is contained in:
Rafael 2022-04-19 20:22:47 -03:00 committed by Thomas Zarebczan
parent 764e21c801
commit 20c610e8c9

View file

@ -85,7 +85,11 @@ class CreditAmount extends React.PureComponent<Props> {
if (showLBC && !isFiat) {
amountText = <LbcSymbol postfix={amountText} size={size} />;
} else if (showLBC && isFiat) {
amountText = <p style={{ display: 'inline' }}> ${(Math.round(Number(amountText) * 100) / 100).toFixed(2)}</p>;
amountText = (
<p style={{ display: 'inline' }}>
${isNaN(Number(amountText)) ? amountText : (Math.round(Number(amount) * 100) / 100).toFixed(2)}
</p>
);
}
if (fee) {