mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Capture exception instead of throw error in useTransactionDisplayData (#11153)
This commit is contained in:
parent
6640973858
commit
395195ac3c
@ -1,4 +1,5 @@
|
|||||||
import { useSelector } from 'react-redux';
|
import { useSelector } from 'react-redux';
|
||||||
|
import { captureException } from '@sentry/browser';
|
||||||
import { getKnownMethodData } from '../selectors/selectors';
|
import { getKnownMethodData } from '../selectors/selectors';
|
||||||
import {
|
import {
|
||||||
getStatusKey,
|
getStatusKey,
|
||||||
@ -221,8 +222,10 @@ export function useTransactionDisplayData(transactionGroup) {
|
|||||||
title = t('send');
|
title = t('send');
|
||||||
subtitle = t('toAddress', [shortenAddress(recipientAddress)]);
|
subtitle = t('toAddress', [shortenAddress(recipientAddress)]);
|
||||||
} else {
|
} else {
|
||||||
throw new Error(
|
captureException(
|
||||||
`useTransactionDisplayData does not recognize transaction type. Type received is: ${type}`,
|
Error(
|
||||||
|
`useTransactionDisplayData does not recognize transaction type. Type received is: ${type}`,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user