mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Throw error if transaction type is not recognized by useTransactionDisplay data (#11104)
This commit is contained in:
parent
0841ba7054
commit
c3b99a5921
@ -220,6 +220,10 @@ export function useTransactionDisplayData(transactionGroup) {
|
||||
category = TRANSACTION_GROUP_CATEGORIES.SEND;
|
||||
title = t('send');
|
||||
subtitle = t('toAddress', [shortenAddress(recipientAddress)]);
|
||||
} else {
|
||||
throw new Error(
|
||||
`useTransactionDisplayData does not recognize transaction type. Type received is: ${type}`,
|
||||
);
|
||||
}
|
||||
|
||||
const primaryCurrencyPreferences = useUserPreferencedCurrency(PRIMARY);
|
||||
|
Loading…
Reference in New Issue
Block a user