Capture exception instead of throw error in useTransactionDisplayData (#11153)

feature/default_network_editable
Dan J Miller 4 years ago committed by GitHub
parent 6640973858
commit 395195ac3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      ui/hooks/useTransactionDisplayData.js

@ -1,4 +1,5 @@
import { useSelector } from 'react-redux';
import { captureException } from '@sentry/browser';
import { getKnownMethodData } from '../selectors/selectors';
import {
getStatusKey,
@ -221,8 +222,10 @@ export function useTransactionDisplayData(transactionGroup) {
title = t('send');
subtitle = t('toAddress', [shortenAddress(recipientAddress)]);
} else {
throw new Error(
captureException(
Error(
`useTransactionDisplayData does not recognize transaction type. Type received is: ${type}`,
),
);
}

Loading…
Cancel
Save