aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/util/error.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/instant/src/util/error.ts')
-rw-r--r--packages/instant/src/util/error.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/instant/src/util/error.ts b/packages/instant/src/util/error.ts
index 64c1f4885..39c563c75 100644
--- a/packages/instant/src/util/error.ts
+++ b/packages/instant/src/util/error.ts
@@ -2,7 +2,7 @@ import { AssetBuyerError } from '@0x/asset-buyer';
import { Dispatch } from 'redux';
import { Action, actions } from '../redux/actions';
-import { Asset } from '../types';
+import { Asset, ZeroExInstantError } from '../types';
import { assetUtils } from './asset';
@@ -49,6 +49,9 @@ const humanReadableMessageForError = (error: Error, asset?: Asset): string | und
if (error.message === AssetBuyerError.SignatureRequestDenied) {
return 'You denied this transaction';
}
+ if (error.message === ZeroExInstantError.InsufficientETH) {
+ return "You don't have enough ETH";
+ }
return undefined;
};