Handle case of missing effective_amount

Closes 916 "NaN in Total Staked Amount"

Contemplated putting the fallback into `<CreditAmount>` itself, but decided to minimize testing. Not sure if there are clients that would rely on NaN being used.
This commit is contained in:
infinite-persistence 2022-03-12 10:11:09 +08:00 committed by Thomas Zarebczan
parent de9b3b641d
commit 5a1ad487f3

View file

@ -84,7 +84,7 @@ class FileValues extends PureComponent<Props> {
</div>
</td>
<td>
<CreditAmount amount={Number(claim.meta.effective_amount)} precision={2} />
<CreditAmount amount={Number(claim.meta.effective_amount) || 0} precision={2} />
</td>
</tr>
<tr>