From 155858de6e79d488293473e34868e20d2c39ef37 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Wed, 17 Oct 2018 13:42:28 -0700 Subject: creating big error util file per francescos comment in PR --- packages/instant/src/containers/latest_error.tsx | 4 ++-- packages/instant/src/containers/selected_asset_amount_input.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'packages/instant/src/containers') diff --git a/packages/instant/src/containers/latest_error.tsx b/packages/instant/src/containers/latest_error.tsx index 7f36d3bf8..08ea418e7 100644 --- a/packages/instant/src/containers/latest_error.tsx +++ b/packages/instant/src/containers/latest_error.tsx @@ -4,7 +4,7 @@ import { connect } from 'react-redux'; import { SlidingError } from '../components/sliding_error'; import { LatestErrorDisplay, State } from '../redux/reducer'; -import { errorDescription } from '../util/error_description'; +import { errorUtil } from '../util/error'; export interface LatestErrorComponentProps { assetData?: string; @@ -16,7 +16,7 @@ export const LatestErrorComponent: React.StatelessComponent; } - const { icon, message } = errorDescription(props.latestError, props.assetData); + const { icon, message } = errorUtil.errorDescription(props.latestError, props.assetData); return ; }; diff --git a/packages/instant/src/containers/selected_asset_amount_input.ts b/packages/instant/src/containers/selected_asset_amount_input.ts index 00c0a1114..0d2c6dd7b 100644 --- a/packages/instant/src/containers/selected_asset_amount_input.ts +++ b/packages/instant/src/containers/selected_asset_amount_input.ts @@ -12,7 +12,7 @@ import { State } from '../redux/reducer'; import { ColorOption } from '../style/theme'; import { AsyncProcessState } from '../types'; import { assetBuyer } from '../util/asset_buyer'; -import { errorFlasher } from '../util/error_flasher'; +import { errorUtil } from '../util/error'; import { AssetAmountInput } from '../components/asset_amount_input'; @@ -49,9 +49,9 @@ const updateBuyQuoteAsync = async ( let newBuyQuote: BuyQuote | undefined; try { newBuyQuote = await assetBuyer.getBuyQuoteAsync(assetData, baseUnitValue); - errorFlasher.clearError(dispatch); + errorUtil.errorFlasher.clearError(dispatch); } catch (error) { - errorFlasher.flashNewError(dispatch, error); + errorUtil.errorFlasher.flashNewError(dispatch, error); return; } -- cgit