Skip to content

Commit

Permalink
Send caught errors to sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
rickycodes committed Sep 25, 2020
1 parent 29605a6 commit 3958ad2
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/components/Nav/Main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,7 @@ class Main extends PureComponent {
Alert.alert(strings('transactions.transaction_error'), error && error.message, [
{ text: strings('navigation.ok') }
]);
Logger.error(error, 'error while trying to send transaction (Main)');
this.setState({ transactionHandled: false });
}
};
Expand Down
2 changes: 2 additions & 0 deletions app/components/Views/Approval/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { getTransactionReviewActionKey, getNormalizedTxState } from '../../../ut
import { strings } from '../../../../locales/i18n';
import { safeToChecksumAddress } from '../../../util/address';
import { WALLET_CONNECT_ORIGIN } from '../../../util/walletconnect';
import Logger from '../../../util/Logger';

const REVIEW = 'review';
const EDIT = 'edit';
Expand Down Expand Up @@ -220,6 +221,7 @@ class Approval extends PureComponent {
Alert.alert(strings('transactions.transaction_error'), error && error.message, [
{ text: strings('navigation.ok') }
]);
Logger.error(error, 'error while trying to send transaction (Approval)');
this.setState({ transactionHandled: false });
}
this.trackOnConfirm();
Expand Down
2 changes: 2 additions & 0 deletions app/components/Views/ApproveView/Approve/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import IonicIcon from 'react-native-vector-icons/Ionicons';
import TransactionReviewDetailsCard from '../../../UI/TransactionReview/TransactionReivewDetailsCard';
import StyledButton from '../../../UI/StyledButton';
import currencySymbols from '../../../../util/currency-symbols.json';
import Logger from '../../../../util/Logger';

const { BNToHex, hexToBN } = util;
const styles = StyleSheet.create({
Expand Down Expand Up @@ -664,6 +665,7 @@ class Approve extends PureComponent {
this.trackApproveEvent(ANALYTICS_EVENT_OPTS.DAPP_APPROVE_SCREEN_APPROVE);
} catch (error) {
Alert.alert(strings('transactions.transaction_error'), error && error.message, [{ text: 'OK' }]);
Logger.error(error, 'error while trying to send transaction (Approve)');
this.setState({ transactionHandled: false });
}
};
Expand Down
1 change: 1 addition & 0 deletions app/components/Views/Send/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,7 @@ class Send extends PureComponent {
Alert.alert(strings('transactions.transaction_error'), error && error.message, [
{ text: strings('navigation.ok') }
]);
Logger.error(error, 'error while trying to send transaction (Send)');
this.setState({ transactionConfirmed: false });
await this.reset();
}
Expand Down
1 change: 1 addition & 0 deletions app/components/Views/SendFlow/Confirm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,7 @@ class Confirm extends PureComponent {
Alert.alert(strings('transactions.transaction_error'), error && error.message, [
{ text: strings('navigation.ok') }
]);
Logger.error(error, 'error while trying to send transaction (Confirm)');
}
this.setState({ transactionConfirmed: false });
};
Expand Down

0 comments on commit 3958ad2

Please sign in to comment.