aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/components/buy_button.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/instant/src/components/buy_button.tsx')
-rw-r--r--packages/instant/src/components/buy_button.tsx9
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/instant/src/components/buy_button.tsx b/packages/instant/src/components/buy_button.tsx
index 880303cc7..ff1cda1e1 100644
--- a/packages/instant/src/components/buy_button.tsx
+++ b/packages/instant/src/components/buy_button.tsx
@@ -87,13 +87,14 @@ export class BuyButton extends React.Component<BuyButtonProps> {
analytics.trackBuySimulationFailed(buyQuote);
this.props.onValidationFail(buyQuote, AssetBuyerError.TransactionValueTooLow);
return;
- } else {
- if (e.message !== AssetBuyerError.SignatureRequestDenied) {
- errorReporter.report(e);
- }
+ } else if (e.message === AssetBuyerError.SignatureRequestDenied) {
analytics.trackBuySignatureDenied(buyQuote);
this.props.onSignatureDenied(buyQuote);
return;
+ } else {
+ errorReporter.report(e);
+ this.props.onValidationFail(buyQuote, ZeroExInstantError.CouldNotSubmitTransaction);
+ return;
}
}
throw e;