diff --git a/app/components/Deposit/DepositContent.tsx b/app/components/Deposit/DepositContent.tsx index 756da956..12f52e45 100644 --- a/app/components/Deposit/DepositContent.tsx +++ b/app/components/Deposit/DepositContent.tsx @@ -55,6 +55,7 @@ export interface DepositContentProps { setAmountEther: React.Dispatch< React.SetStateAction >; + isMaintenanceMode?: boolean; } enum Action { @@ -66,6 +67,7 @@ export const DepositContent: React.FC = ({ modalStuff, amountEther, setAmountEther, + isMaintenanceMode = false, }) => { const [walletClient, setWalletClient] = useState = ({ if (!evmWallet || !solWallet) { return "submit-button disabled"; } + + // Bridge maintenance - only disabled when in maintenance mode and wallets are connected + if (isMaintenanceMode) { + return "submit-button disabled"; + } + if (!amountEther) { return "submit-button disabled"; } @@ -276,6 +284,12 @@ export const DepositContent: React.FC = ({ if (!evmWallet && !solWallet) { return "Connect Wallets"; } + + // Bridge maintenance - only show disabled message when in maintenance mode and wallets are connected + if (isMaintenanceMode) { + return `${action} (Disabled - Maintenance)`; + } + if (!amountEther) { return action; } @@ -296,7 +310,7 @@ export const DepositContent: React.FC = ({ imageSrc="eth.png" direction={action === Action.Deposit ? "From" : "To"} chainName={isMainnet ? "Ethereum Mainnet" : "Ethereum Sepolia"} - onClickEvent={() => { + onClickEvent={() => { if (evmWallet) { handleUnlinkWallet(evmWallet.id); setIsEvmDisconnected(!isEvmDisconnected); @@ -316,7 +330,7 @@ export const DepositContent: React.FC = ({ imageSrc={isMainnet ? "eclipse.png" : "eclipse-testnet.png"} direction={action === Action.Deposit ? "To" : "From"} chainName={isMainnet ? "Eclipse Mainnet" : "Eclipse Testnet"} - onClickEvent={() => { + onClickEvent={() => { if (solWallet) { handleUnlinkWallet(solWallet.id); setIsSolDisconnected(!isSolDisconnected); @@ -345,9 +359,13 @@ export const DepositContent: React.FC = ({ {!isModalOpen && (
-
{} // Disabled during maintenance only when wallets are connected + : switchAction + } >
@@ -381,8 +399,11 @@ export const DepositContent: React.FC = ({ diff --git a/app/components/Deposit/NetworkBox.tsx b/app/components/Deposit/NetworkBox.tsx index 24495d61..e8af0502 100644 --- a/app/components/Deposit/NetworkBox.tsx +++ b/app/components/Deposit/NetworkBox.tsx @@ -26,6 +26,7 @@ export interface NetworkBoxProps { >; gasPriceWei: bigint | undefined; maxPriorityFeePerGasWei: bigint | undefined; + isMaintenanceMode?: boolean; } function roundUpToFiveDecimals(value: number): number { @@ -64,6 +65,7 @@ export const NetworkBox: React.FC = ({ setAmountEther, gasPriceWei, maxPriorityFeePerGasWei, + isMaintenanceMode = false, }) => { const { userWallets, evmWallet, solWallet } = useWallets(); const [gasPrice, ethPrice, blockNumber] = useContext(EthereumDataContext) ?? [ diff --git a/app/components/Deposit/index.tsx b/app/components/Deposit/index.tsx index b46bf9a3..aa074a3f 100644 --- a/app/components/Deposit/index.tsx +++ b/app/components/Deposit/index.tsx @@ -1,3 +1,4 @@ + "use client"; import "./styles.css"; @@ -113,11 +114,27 @@ const Deposit: React.FC = ({ amountEther, setAmountEther }) => { )}
{activeTab === Tabs.Deposit && ( - + <> + {/* Maintenance Banner */} +
+ + + + Bridge is under maintenance, will be back soon +
+ + + )} {activeTab === Tabs.Relay && } {activeTab === Tabs.Activity && ( diff --git a/app/components/WithdrawDetails/index.tsx b/app/components/WithdrawDetails/index.tsx index a796e7b1..9f632079 100644 --- a/app/components/WithdrawDetails/index.tsx +++ b/app/components/WithdrawDetails/index.tsx @@ -465,13 +465,13 @@ export const WithdrawDetails: React.FC = ({ {!txHash && (
setCheckbox(!checkbox)} @@ -491,8 +491,8 @@ export const WithdrawDetails: React.FC = ({ {waitingPeriodStatus !== WaitingPeriodState.Ready && ( )} {waitingPeriodStatus === WaitingPeriodState.Ready && ( - + <> + {/* Maintenance Banner */} +
+ + + + Bridge is under maintenance, will be back soon +
+ + {/* Disabled Claim Button */} + + )}
);