diff --git a/package.json b/package.json index e662579..4e976a5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ghost-dao-interface", "private": true, - "version": "0.5.5", + "version": "0.5.7", "type": "module", "scripts": { "dev": "vite", diff --git a/src/containers/Bridge/Bridge.jsx b/src/containers/Bridge/Bridge.jsx index 8760792..b9bf28d 100644 --- a/src/containers/Bridge/Bridge.jsx +++ b/src/containers/Bridge/Bridge.jsx @@ -252,10 +252,10 @@ const Bridge = ({ chainId, address, config, connect }) => { if (commit.disabled || blockNumber < blocksInFourHours) { continue; } - certainty += (commit?.lastStoredBlock ?? 0n) - (blockNumber - blocksInFourHours); + certainty += (commit?.lastStoredBlock ?? 0n) + BigInt(finalityDelay) - (blockNumber - blocksInFourHours); } return Math.max(Number(certainty * 100n / (blocksInFourHours * BigInt(length))), 0); - }, [latestCommits, blockNumber]); + }, [latestCommits, blockNumber, finalityDelay]); const timeToNextEpoch = useMemo(() => { if (!currentSession || !genesisSlot || !currentSlot) { @@ -343,6 +343,7 @@ const Bridge = ({ chainId, address, config, connect }) => { transactionEta={slowestEvmBlock ? Number(slowestEvmBlock) : undefined} timeToNextEpoch={timeToNextEpoch ? Number(timeToNextEpoch) : undefined} isSmallScreen={isSmallScreen} + maxDelay={14400 + finalityDelay * Number(networkAvgBlockSpeed(chainId))} /> diff --git a/src/containers/Bridge/BridgeHeader.jsx b/src/containers/Bridge/BridgeHeader.jsx index 5a173a5..1b5fe49 100644 --- a/src/containers/Bridge/BridgeHeader.jsx +++ b/src/containers/Bridge/BridgeHeader.jsx @@ -12,6 +12,7 @@ export const BridgeHeader = ({ bridgeStability, transactionEta, timeToNextEpoch, + maxDelay, isSmallScreen }) => { const theme = useTheme(); @@ -92,7 +93,7 @@ export const BridgeHeader = ({ 14400 ? "∞" : formatTime(transactionEta)} + metric={transactionEta > maxDelay ? "∞" : formatTime(transactionEta)} label="Max Bridge ETA" tooltip="Maximum estimated time for finalizing bridge transactions based on the latest update." />