From 2610868589a9de0a9067047e69dcd252b2b5f985 Mon Sep 17 00:00:00 2001 From: fragosti Date: Tue, 16 Oct 2018 16:13:23 -0700 Subject: Add tests for format and use toFixed instead of round for usd --- packages/instant/src/util/format.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/instant/src/util') diff --git a/packages/instant/src/util/format.ts b/packages/instant/src/util/format.ts index de7eb62e6..b62c968fb 100644 --- a/packages/instant/src/util/format.ts +++ b/packages/instant/src/util/format.ts @@ -40,6 +40,6 @@ export const format = { if (_.isUndefined(ethUnitAmount) || _.isUndefined(ethUsdPrice)) { return defaultText; } - return `$${ethUnitAmount.mul(ethUsdPrice).round(decimalPlaces)}`; + return `$${ethUnitAmount.mul(ethUsdPrice).toFixed(decimalPlaces)}`; }, }; -- cgit v1.2.3