1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00

fix issue where transaction items without a TRANSACTION_CONFIRMED_EVENT have unhandled error when clicking into activity log (#13221)

This commit is contained in:
Alex Donesky 2022-01-05 17:49:20 -06:00 committed by GitHub
parent 94dc287bb1
commit df48c424a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -196,9 +196,11 @@ export function getActivities(transaction, isFirstTransaction = false) {
const filteredAcc = acc.find(
(ac) => ac.eventKey === TRANSACTION_CONFIRMED_EVENT,
);
filteredAcc.timestamp = new Date(
parseInt(entry.value, 16) * 1000,
).getTime();
if (filteredAcc !== undefined) {
filteredAcc.timestamp = new Date(
parseInt(entry.value, 16) * 1000,
).getTime();
}
break;
}