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