[Cashtab] Improve price precision for Agora spot prices
Summary:
Improve how we calculate and present spot prices for Agora offers in fiat and XEC
We want to render with appropriate significant figures. Because Agora offers may have very small unit prices, render with at least 4 places of precision, if applicable. (For example this is not applicable if we render the smallest unit price, 1 nanosatoshi, which is pointless to render with 3 more decimal places).
We render xec or fiat values greater than 1 with 2 decimal places (XEC has 2 places, this is a common decimal for fiat currencies...mb the only one).
We split out the logic for getting a formatted XEC price so that we can appropriately distinguish appropriate significant figures for XEC and fiat. Also we can directly call to get XEC prices, instead of force-calling getFormattedFiatPrice with null to mimic a failed API call as was done in some locations.
Update tests to confirm new expected behavior.
Test Plan: npm test
Reviewers: #bitcoin_abc, emack
Reviewed By: #bitcoin_abc, emack
Subscribers: emack
Differential Revision: https://reviews.bitcoinabc.org/D17443