1
0
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:
Dan J Miller 2021-05-14 18:33:14 -02:30 committed by ryanml
parent 0841ba7054
commit c3b99a5921

View File

@ -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);