Display transaction even if getBlockTime returns an error
This commit is contained in:
parent
88d8d3d02a
commit
4d918f83ff
|
@ -232,7 +232,17 @@ export async function fetchTransactionStatus(
|
|||
});
|
||||
|
||||
if (value !== null) {
|
||||
let blockTime = await connection.getBlockTime(value.slot);
|
||||
let blockTime = null;
|
||||
try {
|
||||
blockTime = await connection.getBlockTime(value.slot);
|
||||
} catch (error) {
|
||||
console.error(
|
||||
"Failed to fetch block time for slot ",
|
||||
value.slot,
|
||||
":",
|
||||
error
|
||||
);
|
||||
}
|
||||
let timestamp: Timestamp =
|
||||
blockTime !== null ? blockTime : "unavailable";
|
||||
|
||||
|
|
Loading…
Reference in New Issue