aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-10-26 05:48:59 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-10-26 05:48:59 +0800
commit89e59cca28a86763519237ab9c6971600e200b5e (patch)
tree6737a36f05d21b2dab292199cb81e7bd39fce4c1
parentf04eba77736a429bea19a4544cfbabc38069d04d (diff)
downloaddexon-sol-tools-89e59cca28a86763519237ab9c6971600e200b5e.tar
dexon-sol-tools-89e59cca28a86763519237ab9c6971600e200b5e.tar.gz
dexon-sol-tools-89e59cca28a86763519237ab9c6971600e200b5e.tar.bz2
dexon-sol-tools-89e59cca28a86763519237ab9c6971600e200b5e.tar.lz
dexon-sol-tools-89e59cca28a86763519237ab9c6971600e200b5e.tar.xz
dexon-sol-tools-89e59cca28a86763519237ab9c6971600e200b5e.tar.zst
dexon-sol-tools-89e59cca28a86763519237ab9c6971600e200b5e.zip
cleanup code
-rw-r--r--packages/instant/src/components/buy_button.tsx9
1 files changed, 2 insertions, 7 deletions
diff --git a/packages/instant/src/components/buy_button.tsx b/packages/instant/src/components/buy_button.tsx
index a7a22e3bc..a70269dde 100644
--- a/packages/instant/src/components/buy_button.tsx
+++ b/packages/instant/src/components/buy_button.tsx
@@ -49,14 +49,9 @@ export class BuyButton extends React.Component<BuyButtonProps> {
} catch (e) {
if (e instanceof Error && e.message === AssetBuyerError.SignatureRequestDenied) {
this.props.onSignatureDenied(buyQuote, e);
- } else {
- throw e;
+ return;
}
- }
-
- // Have to let TS know that txHash is definitely defined now
- if (!txHash) {
- throw new Error('No txHash available');
+ throw e;
}
this.props.onBuyProcessing(buyQuote, txHash);