explorer: Only report getBlockTime error under max confs (#14869)
This commit is contained in:
@ -75,16 +75,6 @@ export async function fetchTransactionStatus(
|
|||||||
|
|
||||||
let info = null;
|
let info = null;
|
||||||
if (value !== null) {
|
if (value !== null) {
|
||||||
let blockTime = null;
|
|
||||||
try {
|
|
||||||
blockTime = await connection.getBlockTime(value.slot);
|
|
||||||
} catch (error) {
|
|
||||||
if (cluster === Cluster.MainnetBeta) {
|
|
||||||
reportError(error, { slot: `${value.slot}` });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let timestamp: Timestamp = blockTime !== null ? blockTime : "unavailable";
|
|
||||||
|
|
||||||
let confirmations: Confirmations;
|
let confirmations: Confirmations;
|
||||||
if (typeof value.confirmations === "number") {
|
if (typeof value.confirmations === "number") {
|
||||||
confirmations = value.confirmations;
|
confirmations = value.confirmations;
|
||||||
@ -92,6 +82,16 @@ export async function fetchTransactionStatus(
|
|||||||
confirmations = "max";
|
confirmations = "max";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let blockTime = null;
|
||||||
|
try {
|
||||||
|
blockTime = await connection.getBlockTime(value.slot);
|
||||||
|
} catch (error) {
|
||||||
|
if (cluster === Cluster.MainnetBeta && confirmations === "max") {
|
||||||
|
reportError(error, { slot: `${value.slot}` });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let timestamp: Timestamp = blockTime !== null ? blockTime : "unavailable";
|
||||||
|
|
||||||
info = {
|
info = {
|
||||||
slot: value.slot,
|
slot: value.slot,
|
||||||
timestamp,
|
timestamp,
|
||||||
|
Reference in New Issue
Block a user