diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-12-21 06:32:11 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-12-21 06:32:11 +0800 |
commit | 080c6d3146bee3691b6f3b9452be639354236e44 (patch) | |
tree | 048ebf24cf6d6f521801675ede166e70be1e62b7 /packages/instant/src/containers | |
parent | 2effc3e267f01e620c50622138d98381883d4c32 (diff) | |
download | dexon-sol-tools-080c6d3146bee3691b6f3b9452be639354236e44.tar dexon-sol-tools-080c6d3146bee3691b6f3b9452be639354236e44.tar.gz dexon-sol-tools-080c6d3146bee3691b6f3b9452be639354236e44.tar.bz2 dexon-sol-tools-080c6d3146bee3691b6f3b9452be639354236e44.tar.lz dexon-sol-tools-080c6d3146bee3691b6f3b9452be639354236e44.tar.xz dexon-sol-tools-080c6d3146bee3691b6f3b9452be639354236e44.tar.zst dexon-sol-tools-080c6d3146bee3691b6f3b9452be639354236e44.zip |
fix(instant): catch unknown errors from executeBuyAsync, report them and show could not submit transaction
Diffstat (limited to 'packages/instant/src/containers')
-rw-r--r-- | packages/instant/src/containers/selected_asset_buy_order_state_buttons.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/instant/src/containers/selected_asset_buy_order_state_buttons.ts b/packages/instant/src/containers/selected_asset_buy_order_state_buttons.ts index 80943a96f..4da99cf04 100644 --- a/packages/instant/src/containers/selected_asset_buy_order_state_buttons.ts +++ b/packages/instant/src/containers/selected_asset_buy_order_state_buttons.ts @@ -95,6 +95,9 @@ const mapDispatchToProps = ( if (error === ZeroExInstantError.InsufficientETH) { const errorMessage = "You don't have enough ETH"; errorFlasher.flashNewErrorMessage(dispatch, errorMessage); + } else if (error === ZeroExInstantError.CouldNotSubmitTransaction) { + const errorMessage = 'Could not submit transaction'; + errorFlasher.flashNewErrorMessage(dispatch, errorMessage); } else { errorFlasher.flashNewErrorMessage(dispatch); } |