1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01: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( const filteredAcc = acc.find(
(ac) => ac.eventKey === TRANSACTION_CONFIRMED_EVENT, (ac) => ac.eventKey === TRANSACTION_CONFIRMED_EVENT,
); );
filteredAcc.timestamp = new Date( if (filteredAcc !== undefined) {
parseInt(entry.value, 16) * 1000, filteredAcc.timestamp = new Date(
).getTime(); parseInt(entry.value, 16) * 1000,
).getTime();
}
break; break;
} }