From 9b602edc7a550c997919a17187ea30c18a0acc7b Mon Sep 17 00:00:00 2001 From: Justin Starry Date: Tue, 2 Jun 2020 14:31:54 +0800 Subject: [PATCH] Fix pending transaction error due to missing timestamp --- explorer/src/providers/transactions/index.tsx | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/explorer/src/providers/transactions/index.tsx b/explorer/src/providers/transactions/index.tsx index 4c157e4b16..a982a65db9 100644 --- a/explorer/src/providers/transactions/index.tsx +++ b/explorer/src/providers/transactions/index.tsx @@ -239,18 +239,7 @@ export async function fetchTransactionStatus( if (value !== null) { let blockTime = await connection.getBlockTime(value.slot); - - let timestamp: Timestamp; - if (blockTime !== null) { - timestamp = blockTime; - } else { - const epochInfo = await connection.getEpochInfo(); - if (value.slot < epochInfo.absoluteSlot - epochInfo.slotsInEpoch) { - timestamp = "unavailable"; - } else { - throw new Error("Unable to fetch timestamp"); - } - } + let timestamp: Timestamp = blockTime !== null ? blockTime : "unavailable"; let confirmations: Confirmations; if (typeof value.confirmations === "number") {