aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/containers
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-10-18 04:42:28 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-10-18 05:44:40 +0800
commit155858de6e79d488293473e34868e20d2c39ef37 (patch)
tree6634854d54cd62402b52dc50fbe4962c7a745259 /packages/instant/src/containers
parentd052342df7247f1efc830797a8f69245db247166 (diff)
downloaddexon-sol-tools-155858de6e79d488293473e34868e20d2c39ef37.tar
dexon-sol-tools-155858de6e79d488293473e34868e20d2c39ef37.tar.gz
dexon-sol-tools-155858de6e79d488293473e34868e20d2c39ef37.tar.bz2
dexon-sol-tools-155858de6e79d488293473e34868e20d2c39ef37.tar.lz
dexon-sol-tools-155858de6e79d488293473e34868e20d2c39ef37.tar.xz
dexon-sol-tools-155858de6e79d488293473e34868e20d2c39ef37.tar.zst
dexon-sol-tools-155858de6e79d488293473e34868e20d2c39ef37.zip
creating big error util file per francescos comment in PR
Diffstat (limited to 'packages/instant/src/containers')
-rw-r--r--packages/instant/src/containers/latest_error.tsx4
-rw-r--r--packages/instant/src/containers/selected_asset_amount_input.ts6
2 files changed, 5 insertions, 5 deletions
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<LatestErrorComponent
if (!props.latestError) {
return <div />;
}
- const { icon, message } = errorDescription(props.latestError, props.assetData);
+ const { icon, message } = errorUtil.errorDescription(props.latestError, props.assetData);
return <SlidingError direction={props.slidingDirection} icon={icon} message={message} />;
};
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;
}