diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-07-13 06:50:13 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-07-13 06:56:01 +0800 |
commit | ac5588c7c436e2540f87e432446e103d35c9221a (patch) | |
tree | 75fb70ebf9cfb0aaa3450610f2072a43c3b2f1bc /packages/website/ts/components | |
parent | ddb70a89ad99527e03844d23e7c0f3522e98a602 (diff) | |
download | dexon-sol-tools-ac5588c7c436e2540f87e432446e103d35c9221a.tar dexon-sol-tools-ac5588c7c436e2540f87e432446e103d35c9221a.tar.gz dexon-sol-tools-ac5588c7c436e2540f87e432446e103d35c9221a.tar.bz2 dexon-sol-tools-ac5588c7c436e2540f87e432446e103d35c9221a.tar.lz dexon-sol-tools-ac5588c7c436e2540f87e432446e103d35c9221a.tar.xz dexon-sol-tools-ac5588c7c436e2540f87e432446e103d35c9221a.tar.zst dexon-sol-tools-ac5588c7c436e2540f87e432446e103d35c9221a.zip |
Make error reporter not return a promise and add more environment possibilities
Diffstat (limited to 'packages/website/ts/components')
8 files changed, 10 insertions, 10 deletions
diff --git a/packages/website/ts/components/eth_weth_conversion_button.tsx b/packages/website/ts/components/eth_weth_conversion_button.tsx index 4b91a2ebd..d547a4e6a 100644 --- a/packages/website/ts/components/eth_weth_conversion_button.tsx +++ b/packages/website/ts/components/eth_weth_conversion_button.tsx @@ -118,7 +118,7 @@ export class EthWethConversionButton extends React.Component< ? 'Failed to wrap your ETH. Please try again.' : 'Failed to unwrap your WETH. Please try again.'; this.props.dispatcher.showFlashMessage(errorMsg); - await errorReporter.reportAsync(err); + errorReporter.report(err); } } this.setState({ diff --git a/packages/website/ts/components/fill_order.tsx b/packages/website/ts/components/fill_order.tsx index 03ba1183d..9360ba24c 100644 --- a/packages/website/ts/components/fill_order.tsx +++ b/packages/website/ts/components/fill_order.tsx @@ -583,7 +583,7 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> { this.setState({ globalErrMsg, }); - await errorReporter.reportAsync(err); + errorReporter.report(err); return; } } @@ -654,7 +654,7 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> { this.setState({ globalErrMsg, }); - await errorReporter.reportAsync(err); + errorReporter.report(err); return; } } diff --git a/packages/website/ts/components/generate_order/generate_order_form.tsx b/packages/website/ts/components/generate_order/generate_order_form.tsx index d26b5c3fa..7d7df5506 100644 --- a/packages/website/ts/components/generate_order/generate_order_form.tsx +++ b/packages/website/ts/components/generate_order/generate_order_form.tsx @@ -349,7 +349,7 @@ export class GenerateOrderForm extends React.Component<GenerateOrderFormProps, G globalErrMsg = 'An unexpected error occured. Please try refreshing the page'; logUtils.log(`Unexpected error occured: ${err}`); logUtils.log(err.stack); - await errorReporter.reportAsync(err); + errorReporter.report(err); } } this.setState({ diff --git a/packages/website/ts/components/inputs/allowance_toggle.tsx b/packages/website/ts/components/inputs/allowance_toggle.tsx index 0d5995696..ff3a01136 100644 --- a/packages/website/ts/components/inputs/allowance_toggle.tsx +++ b/packages/website/ts/components/inputs/allowance_toggle.tsx @@ -129,7 +129,7 @@ export class AllowanceToggle extends React.Component<AllowanceToggleProps, Allow logUtils.log(`Unexpected error encountered: ${err}`); logUtils.log(err.stack); this.props.onErrorOccurred(BalanceErrs.allowanceSettingFailed); - await errorReporter.reportAsync(err); + errorReporter.report(err); } } private _isAllowanceSet(): boolean { diff --git a/packages/website/ts/components/order_json.tsx b/packages/website/ts/components/order_json.tsx index 35188c024..965bd5455 100644 --- a/packages/website/ts/components/order_json.tsx +++ b/packages/website/ts/components/order_json.tsx @@ -154,7 +154,7 @@ You can see and fill it here: ${this.state.shareLink}`); if (response.status !== 200 || bodyObj.status_code !== 200) { // TODO: Show error message in UI logUtils.log(`Unexpected status code: ${response.status} -> ${responseBody}`); - await errorReporter.reportAsync(new Error(`Bitly returned non-200: ${JSON.stringify(response)}`)); + errorReporter.report(new Error(`Bitly returned non-200: ${JSON.stringify(response)}`)); return ''; } return bodyObj.data.url; diff --git a/packages/website/ts/components/send_button.tsx b/packages/website/ts/components/send_button.tsx index 8486dbd8b..ac55d430b 100644 --- a/packages/website/ts/components/send_button.tsx +++ b/packages/website/ts/components/send_button.tsx @@ -80,7 +80,7 @@ export class SendButton extends React.Component<SendButtonProps, SendButtonState logUtils.log(`Unexpected error encountered: ${err}`); logUtils.log(err.stack); this.props.onError(); - await errorReporter.reportAsync(err); + errorReporter.report(err); } } this.setState({ diff --git a/packages/website/ts/components/token_balances.tsx b/packages/website/ts/components/token_balances.tsx index 3fae83c00..c9b313736 100644 --- a/packages/website/ts/components/token_balances.tsx +++ b/packages/website/ts/components/token_balances.tsx @@ -526,7 +526,7 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala this.setState({ errorType: BalanceErrs.mintingFailed, }); - await errorReporter.reportAsync(err); + errorReporter.report(err); return false; } } @@ -561,7 +561,7 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala this.setState({ errorType, }); - await errorReporter.reportAsync(new Error(`Faucet returned non-200: ${JSON.stringify(response)}`)); + errorReporter.report(new Error(`Faucet returned non-200: ${JSON.stringify(response)}`)); return false; } diff --git a/packages/website/ts/components/wallet/wrap_ether_item.tsx b/packages/website/ts/components/wallet/wrap_ether_item.tsx index 2b4cf93fe..76b349c0b 100644 --- a/packages/website/ts/components/wallet/wrap_ether_item.tsx +++ b/packages/website/ts/components/wallet/wrap_ether_item.tsx @@ -219,7 +219,7 @@ export class WrapEtherItem extends React.Component<WrapEtherItemProps, WrapEther this.props.dispatcher.showFlashMessage('Failed to unwrap your WETH. Please try again.'); analytics.logEvent('Portal', 'Unwrap WETH Failed', networkName); } - await errorReporter.reportAsync(err); + errorReporter.report(err); } } this.setState({ |