1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-25 11:28:51 +01:00

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

This commit is contained in:
Dan J Miller 2021-05-21 09:31:45 -02:30 committed by GitHub
parent 6640973858
commit 395195ac3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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(
`useTransactionDisplayData does not recognize transaction type. Type received is: ${type}`,
captureException(
Error(
`useTransactionDisplayData does not recognize transaction type. Type received is: ${type}`,
),
);
}