diff --git a/packages/synapse-interface/components/Maintenance/Maintenance.tsx b/packages/synapse-interface/components/Maintenance/Maintenance.tsx index 0be5259179..fe61041c5f 100644 --- a/packages/synapse-interface/components/Maintenance/Maintenance.tsx +++ b/packages/synapse-interface/components/Maintenance/Maintenance.tsx @@ -3,6 +3,9 @@ import { MaintenanceBanner } from './components/MaintenanceBanner' import { MaintenanceWarningMessage } from './components/MaintenanceWarningMessage' import { useMaintenanceCountdownProgress } from './components/useMaintenanceCountdownProgress' +/** Import chain pause public constant */ +import pausedChains from '@/public/pausedChains.json' + interface ChainPause { id: string pausedFromChains: number[] @@ -11,69 +14,80 @@ interface ChainPause { endTime: Date | null // Indefinite if null bannerStartTime: Date bannerEndTime: Date | null // Indefinite if null - warningMessage: any - bannerMessage: any - progressBarMessage: any + warningMessage: JSX.Element + bannerMessage: JSX.Element + progressBarMessage: JSX.Element disableBanner?: boolean disableWarning?: boolean disableCountdown?: boolean } -const PAUSED_CHAINS: ChainPause[] = [ - { - id: 'optimism-chain-pause', - pausedFromChains: [OPTIMISM.id], - pausedToChains: [], - startTime: new Date(Date.UTC(2024, 2, 21, 18, 0, 0)), - endTime: new Date(Date.UTC(2024, 2, 21, 19, 40, 0)), - bannerStartTime: new Date(Date.UTC(2024, 2, 21, 18, 0, 0)), - bannerEndTime: new Date(Date.UTC(2024, 2, 21, 19, 40, 0)), - warningMessage: ( -

Optimism bridging is paused until maintenance is complete.

- ), - bannerMessage: ( -

Optimism bridging is paused until maintenance is complete.

- ), - progressBarMessage:

Optimism maintenance in progress

, - }, - { - id: 'base-chain-pause', - pausedFromChains: [BASE.id], - pausedToChains: [BASE.id], - startTime: new Date(Date.UTC(2024, 2, 21, 17, 41, 0)), - endTime: new Date(Date.UTC(2024, 2, 21, 17, 42, 0)), - bannerStartTime: new Date(Date.UTC(2024, 2, 21, 17, 40, 0)), - bannerEndTime: new Date(Date.UTC(2024, 2, 21, 17, 43, 0)), - warningMessage: ( -

Base bridging is paused until maintenance is complete.

- ), - bannerMessage: ( -

Base bridging is paused until maintenance is complete.

- ), - progressBarMessage:

Base maintenance in progress

, - }, - { - id: 'base-chain-pause', - pausedFromChains: [BASE.id], - pausedToChains: [BASE.id], - startTime: new Date(Date.UTC(2024, 2, 21, 17, 41, 0)), - endTime: null, - bannerStartTime: new Date(Date.UTC(2024, 2, 27, 4, 40, 0)), - bannerEndTime: null, - warningMessage: ( -

Base bridging is paused until maintenance is complete.

- ), - bannerMessage: ( -

- Base bridging is paused until maintenance is complete. -

- ), - progressBarMessage:

Base maintenance in progress

, - disableBanner: false, - disableWarning: false, - disableCountdown: false, - }, -] +const PAUSED_CHAINS: ChainPause[] = pausedChains.map((pause) => ({ + ...pause, + startTime: new Date(pause.startTime), + endTime: pause.endTime ? new Date(pause.endTime) : null, + bannerStartTime: new Date(pause.bannerStartTime), + bannerEndTime: pause.bannerEndTime ? new Date(pause.bannerEndTime) : null, + warningMessage:

{pause.warningMessage}

, + bannerMessage:

{pause.bannerMessage}

, + progressBarMessage:

{pause.progressBarMessage}

, +})) + +// const PAUSED_CHAINS: ChainPause[] = [ +// { +// id: 'optimism-chain-pause', +// pausedFromChains: [OPTIMISM.id], +// pausedToChains: [], +// startTime: new Date(Date.UTC(2024, 2, 21, 18, 0, 0)), +// endTime: new Date(Date.UTC(2024, 2, 21, 19, 40, 0)), +// bannerStartTime: new Date(Date.UTC(2024, 2, 21, 18, 0, 0)), +// bannerEndTime: new Date(Date.UTC(2024, 2, 21, 19, 40, 0)), +// warningMessage: ( +//

Optimism bridging is paused until maintenance is complete.

+// ), +// bannerMessage: ( +//

Optimism bridging is paused until maintenance is complete.

+// ), +// progressBarMessage:

Optimism maintenance in progress

, +// }, +// { +// id: 'base-chain-pause', +// pausedFromChains: [BASE.id], +// pausedToChains: [BASE.id], +// startTime: new Date(Date.UTC(2024, 2, 21, 17, 41, 0)), +// endTime: new Date(Date.UTC(2024, 2, 21, 17, 42, 0)), +// bannerStartTime: new Date(Date.UTC(2024, 2, 21, 17, 40, 0)), +// bannerEndTime: new Date(Date.UTC(2024, 2, 21, 17, 43, 0)), +// warningMessage: ( +//

Base bridging is paused until maintenance is complete.

+// ), +// bannerMessage: ( +//

Base bridging is paused until maintenance is complete.

+// ), +// progressBarMessage:

Base maintenance in progress

, +// }, +// { +// id: 'base-chain-pause', +// pausedFromChains: [BASE.id], +// pausedToChains: [BASE.id], +// startTime: new Date(Date.UTC(2024, 2, 21, 17, 41, 0)), +// endTime: null, +// bannerStartTime: new Date(Date.UTC(2024, 2, 27, 4, 40, 0)), +// bannerEndTime: null, +// warningMessage: ( +//

Base bridging is paused until maintenance is complete.

+// ), +// bannerMessage: ( +//

+// Base bridging is paused until maintenance is complete. +//

+// ), +// progressBarMessage:

Base maintenance in progress

, +// disableBanner: false, +// disableWarning: false, +// disableCountdown: false, +// }, +// ] export const MaintenanceBanners = () => { return ( diff --git a/packages/synapse-interface/components/Maintenance/components/EventCountdownProgressBar.tsx b/packages/synapse-interface/components/Maintenance/components/EventCountdownProgressBar.tsx index d462a7766e..d5ca181026 100644 --- a/packages/synapse-interface/components/Maintenance/components/EventCountdownProgressBar.tsx +++ b/packages/synapse-interface/components/Maintenance/components/EventCountdownProgressBar.tsx @@ -74,7 +74,7 @@ export const EventCountdownProgressBar = ({ return (
{ return (
{header &&
{header}
} {message &&
{message}
} diff --git a/packages/synapse-interface/public/pausedChains.json b/packages/synapse-interface/public/pausedChains.json new file mode 100644 index 0000000000..02faa6f36a --- /dev/null +++ b/packages/synapse-interface/public/pausedChains.json @@ -0,0 +1,17 @@ +[ + { + "id": "base-chain-pause", + "pausedFromChains": [8453], + "pausedToChains": [8453], + "startTime": "2024-04-12T17:41:00Z", + "endTime": null, + "bannerStartTime": "2024-04-12T04:40:00Z", + "bannerEndTime": null, + "warningMessage": "Base bridging is paused until maintenance is complete.", + "bannerMessage": "Base bridging is paused until maintenance is complete.", + "progressBarMessage": "Base maintenance in progress", + "disableBanner": false, + "disableWarning": false, + "disableCountdown": false + } +]