diff --git a/components/DammTabContent.tsx b/components/DammTabContent.tsx
index 3fd2efd..0d7b91e 100644
--- a/components/DammTabContent.tsx
+++ b/components/DammTabContent.tsx
@@ -191,15 +191,12 @@ const DammTabContent = () => {
const { sync: syncArbi } = useSyncL2(ChainId.ARBITRUM_GOERLI);
const { sync: syncPoly } = useSyncL2(ChainId.POLYGON_MUMBAI);
const { sync: syncAvax } = useSyncL2(ChainId.AVALANCHE_FUJI);
- const { finalizeSync: finalizeSyncArbi } = useFinalizeSyncL1(
- ChainId.ARBITRUM_GOERLI
- );
- const { finalizeSync: finalizeSyncPoly } = useFinalizeSyncL1(
- ChainId.POLYGON_MUMBAI
- );
- const { finalizeSync: finalizeSyncAvax } = useFinalizeSyncL1(
- ChainId.AVALANCHE_FUJI
- );
+ const { finalizeSync: finalizeSyncArbi, status: statusArbi } =
+ useFinalizeSyncL1(ChainId.ARBITRUM_GOERLI);
+ const { finalizeSync: finalizeSyncPoly, status: statusPoly } =
+ useFinalizeSyncL1(ChainId.POLYGON_MUMBAI);
+ const { finalizeSync: finalizeSyncAvax, status: statusAvax } =
+ useFinalizeSyncL1(ChainId.AVALANCHE_FUJI);
const handleSync = (chainId: ChainId) => {
if (chainId === ChainId.ARBITRUM_GOERLI) {
@@ -221,6 +218,16 @@ const DammTabContent = () => {
}
};
+ const getStatus = (chainId: ChainId) => {
+ if (chainId === ChainId.ARBITRUM_GOERLI) {
+ return statusArbi;
+ } else if (chainId === ChainId.POLYGON_MUMBAI) {
+ return statusPoly;
+ } else if (chainId === ChainId.AVALANCHE_FUJI) {
+ return statusAvax;
+ }
+ };
+
const { isLocked } = useLiquidityLocked();
const supportedChainIds = Object.values(ChainId)
@@ -563,23 +570,46 @@ const DammTabContent = () => {
{SUPPORTED_CHAIN_NAMES[chainId as ChainId]}
-
-
-
- Pending
-
+ {(() => {
+ const status = getStatus(chainId);
+
+ switch (status) {
+ case "PENDING_FINALIZE":
+ return (
+
+
+ Pending
+
+ );
+ default:
+ return (
+
+
+ Synced
+
+ );
+ }
+ })()}
-
+ {(() => {
+ const status = getStatus(chainId);
+
+ if (status === "PENDING_FINALIZE") {
+ return (
+
+ );
+ }
+ })()}