Skip to content

Commit a500eeb

Browse files
refactor(evm): changes based on review feedbacks
1 parent 62ef166 commit a500eeb

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

apps/evm/src/App/ChainUpgradeHandler/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export interface ChainUpgradeHandlerProps {
88
}
99

1010
export const ChainUpgradeHandler: React.FC<ChainUpgradeHandlerProps> = ({ upgradeTimestamps }) => {
11-
const now = useNow({ intervalMs: 10000 });
11+
const now = useNow();
1212

1313
// Reload page if we're passed any of the chain upgrades and the app was opened before that, so
1414
// that the block time and blocks per day metadata from the @venusprotocol/chains package are

apps/evm/src/App/index.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { AnalyticProvider } from 'libs/analytics';
66
import { ErrorBoundary } from 'libs/errors';
77
import { SentryErrorInfo } from 'libs/errors/SentryErrorInfo';
88
import { Web3Wrapper } from 'libs/wallet';
9-
import { Suspense, useMemo } from 'react';
9+
import { Suspense } from 'react';
1010
import { Helmet } from 'react-helmet';
1111
import { HashRouter } from 'react-router';
1212
import { safeLazyLoad } from 'utilities';
@@ -23,10 +23,7 @@ const ImportPositionsModal = safeLazyLoad(() => import('containers/ImportPositio
2323

2424
const App = () => {
2525
const { hardforks } = useChain();
26-
const upgradeTimestamps = useMemo(
27-
() => hardforks?.map(hardfork => new Date(hardfork.startTimestamp)) ?? [],
28-
[hardforks],
29-
);
26+
const upgradeTimestamps = (hardforks ?? []).map(hardfork => new Date(hardfork.startTimestamp));
3027

3128
return (
3229
<>

0 commit comments

Comments
 (0)