From 78971099c026893398494b8d5903c38cda8cd2c8 Mon Sep 17 00:00:00 2001 From: Sebastian Scatularo Date: Tue, 22 Aug 2023 09:57:07 -0300 Subject: [PATCH] remove outage banner --- src/components/ConnectWalletButton.tsx | 7 +- src/components/HeaderText.tsx | 299 +------------------------ 2 files changed, 2 insertions(+), 304 deletions(-) diff --git a/src/components/ConnectWalletButton.tsx b/src/components/ConnectWalletButton.tsx index 3467a318e..c191f17f8 100644 --- a/src/components/ConnectWalletButton.tsx +++ b/src/components/ConnectWalletButton.tsx @@ -87,11 +87,6 @@ const ConnectWalletButton = ({ chainId }: { chainId: ChainId }) => { : connect(availableWallets[0]); }, [openDialog, availableWallets, connect, chainId]); - //TODO remove once outage banned got removed - const outageDisabled = - Date.now() > Date.UTC(2023, 7, 21, 6) && - Date.now() < Date.UTC(2023, 7, 21, 9); - return ( <> {isDetectingWallets && ( @@ -117,7 +112,7 @@ const ConnectWalletButton = ({ chainId }: { chainId: ChainId }) => { disconnect={disconnect} connected={!!pk} pk={pk || ""} - disabled={outageDisabled || isDetectingWallets || walletsNotAvailable} + disabled={isDetectingWallets || walletsNotAvailable} /> ({ centeredContainer: { - //marginBottom: theme.spacing(16), + marginBottom: theme.spacing(16), textAlign: "center", width: "100%", }, @@ -23,302 +23,6 @@ const useStyles = makeStyles((theme) => ({ }, })); -const useHeadUpStyles = makeStyles((theme) => ({ - alert: { - marginTop: theme.spacing(5), - marginBottom: theme.spacing(5), - margin: "auto", - textAlign: "left", - display: "flex", - [theme.breakpoints.up("sm")]: { - width: "792px", - height: "282px", - }, - padding: theme.spacing(4), // 32px - justifyContent: "center", - alignItems: "flex-start", - gap: "16px", - borderRadius: "28px", - background: "rgba(193, 149, 49, 0.10)", - border: "none", - lineHeight: "24px", - "& .MuiAlertTitle-root": { - color: "#FBECD0", - fontWeight: 700, - marginBottom: theme.spacing(3), - }, - "& .MuiAlert-icon": { - fontSize: 24, - marginRight: 0, - }, - "& .MuiAlert-message": { - [theme.breakpoints.up("sm")]: { - width: "633px", - marginRight: "55px", - flexShrink: 0, - }, - "& .MuiTypography-paragraph": { - color: "#FBECD0", - fontFamily: "Poppins", - fontSize: "14px", - fontStyle: "normal", - fontWeight: 400, - "&:not(:last-child)": { - marginBottom: theme.spacing(3), - }, - }, - "& span": { - color: "#EEB32A", - fontWeight: 700, - }, - "& .MuiLink-root": { - color: "#FBECD0", - fontFamily: "Poppins", - fontSize: "14px", - fontStyle: "normal", - fontWeight: 400, - lineHeight: "24px", - textDecorationLine: "underline", - }, - }, - }, -})); - -function HeadUpNotice() { - const style = useHeadUpStyles(); - return ( - - - Wormhole Upgrade Approaching - Expect Temporary Downtime - - - - A required upgrade is being coordinated and executed by the network of - Wormhole Guardian (validator) nodes to add Gateway to the Wormhole - stack. - - - Please take note that token bridging will pause for several hours on{" "} -
- Monday, August 21, 2023{" "} - during the upgrade. -
- - Follow:{" "} - - @wormholecrypto - {" "} - and join the{" "} - - Discord - {" "} - for updates. - -
-
- ); -} - -const useInProgressStyles = makeStyles((theme) => ({ - alert: { - marginTop: theme.spacing(5), - marginBottom: theme.spacing(5), - margin: "auto", - textAlign: "left", - display: "flex", - [theme.breakpoints.up("sm")]: { - width: "792px", - height: "258px", - }, - padding: theme.spacing(4), // 32px - justifyContent: "center", - alignItems: "flex-start", - gap: "16px", - borderRadius: "28px", - background: "rgba(255, 42, 87, 0.10)", - border: "none", - lineHeight: "24px", - "& .MuiAlertTitle-root": { - color: "#FFE3E9", - fontWeight: 700, - marginBottom: theme.spacing(3), - }, - "& .MuiAlert-icon": { - fontSize: 24, - marginRight: 0, - }, - "& .MuiAlert-message": { - [theme.breakpoints.up("sm")]: { - width: "633px", - marginRight: "55px", - flexShrink: 0, - }, - "& .MuiTypography-paragraph": { - color: "#FFE3E9", - fontFamily: "Poppins", - fontSize: "14px", - fontStyle: "normal", - fontWeight: 400, - "&:not(:last-child)": { - marginBottom: theme.spacing(3), - }, - }, - "& span": { - color: "#FFE3E9", - fontWeight: 700, - }, - "& .MuiLink-root": { - color: "#FFE3E9", - fontFamily: "Poppins", - fontSize: "14px", - fontStyle: "normal", - fontWeight: 400, - lineHeight: "24px", - textDecorationLine: "underline", - }, - }, - }, -})); - -function InProgressNotice() { - const style = useInProgressStyles(); - return ( - - - Wormhole Upgrade In Progress - Temporary Downtime In Effect - - - - A required upgrade is being executed by the network of Wormhole - Guardian (validator) nodes to add Gateway to the Wormhole stack. - - - - Token bridging is currently paused.{" "} - {" "} - - - Follow:{" "} - - @wormholecrypto - {" "} - and join the{" "} - - Discord - {" "} - for updates. - - - - ); -} - -const useBackOnLineStyles = makeStyles((theme) => ({ - alert: { - marginTop: theme.spacing(5), - marginBottom: theme.spacing(5), - margin: "auto", - textAlign: "left", - display: "flex", - [theme.breakpoints.up("sm")]: { - width: "792px", - height: "210px", - }, - padding: theme.spacing(4), // 32px - justifyContent: "center", - alignItems: "flex-start", - gap: "16px", - borderRadius: "28px", - background: "rgba(1, 187, 172, 0.10)", - border: "none", - lineHeight: "24px", - "& .MuiAlertTitle-root": { - color: "#FFE3E9", - fontWeight: 700, - marginBottom: theme.spacing(3), - "& span": { - color: "#07D9C8", - }, - }, - "& .MuiAlert-icon": { - fontSize: 24, - marginRight: 0, - }, - "& .MuiAlert-message": { - [theme.breakpoints.up("sm")]: { - width: "633px", - marginRight: "55px", - flexShrink: 0, - }, - "& .MuiTypography-paragraph": { - color: "#FFE3E9", - fontFamily: "Poppins", - fontSize: "14px", - fontStyle: "normal", - fontWeight: 400, - "&:not(:last-child)": { - marginBottom: theme.spacing(3), - }, - }, - "& span": { - color: "#FFE3E9", - fontWeight: 700, - }, - "& .MuiLink-root": { - color: "#FFE3E9", - fontFamily: "Poppins", - fontSize: "14px", - fontStyle: "normal", - fontWeight: 400, - lineHeight: "24px", - textDecorationLine: "underline", - }, - }, - }, -})); - -function BackOnLineNotice() { - const style = useBackOnLineStyles(); - return ( - - - Wormhole Upgrade Completed -{" "} - Back Online - - - - A required upgrade was completed by the network of Wormhole Guardian - (validator) nodes to add Gateway to the Wormhole stack. - - - Token bridging is now live. {" "} - - - - ); -} - -function Notice() { - const now = Date.now(); - const outageStart = Date.UTC(2023, 7, 21, 6); - const outageEnd = Date.UTC(2023, 7, 21, 9); - if (now < outageStart) { - return ; - } else if (now > outageStart && now < outageEnd) { - return ; - } else if (now > outageEnd) { - return ; - } else { - return null; - } -} - export default function HeaderText({ children, white, @@ -345,7 +49,6 @@ export default function HeaderText({ {subtitle} ) : null} - ); }