aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website')
-rw-r--r--packages/website/ts/utils/utils.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/website/ts/utils/utils.ts b/packages/website/ts/utils/utils.ts
index e515cdeb3..1d669d8f0 100644
--- a/packages/website/ts/utils/utils.ts
+++ b/packages/website/ts/utils/utils.ts
@@ -28,8 +28,8 @@ import {
} from 'ts/types';
import { configs } from 'ts/utils/configs';
import { constants } from 'ts/utils/constants';
+import { errorReporter } from 'ts/utils/error_reporter';
import * as u2f from 'ts/vendor/u2f_api';
-import { errorReporter } from './error_reporter';
const isDogfood = (): boolean => _.includes(window.location.href, configs.DOMAIN_DOGFOOD);
@@ -391,7 +391,11 @@ export const utils = {
const format = `0,0.${_.repeat('0', precision)}`;
const formattedAmount = numeral(unitAmount).format(format);
if (_.isNaN(formattedAmount)) {
- throw new Error(`amount ${BigNumber}, decimals ${decimals} could not be formatted and returned NaN.`);
+ // tslint:disable-next-line:no-floating-promises
+ errorReporter.reportAsync(
+ new Error(`amount ${BigNumber}, decimals ${decimals} could not be formatted and returned NaN.`),
+ );
+ return format;
}
return formattedAmount;
},