From 67797e37245214c30226cd6e8307fa90cc4c1450 Mon Sep 17 00:00:00 2001 From: Sebastian Scatularo Date: Fri, 18 Aug 2023 16:22:23 -0300 Subject: [PATCH] #318 - add planned outage - head up banner --- package-lock.json | 4 +- package.json | 2 +- src/components/HeaderText.tsx | 98 ++++++++++++++++++- src/components/Migration/EvmQuickMigrate.tsx | 5 +- .../SolanaCreateAssociatedAddress.tsx | 10 +- src/hooks/useHandleRedeem.tsx | 5 +- 6 files changed, 111 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1263b6ca6..196b88cc7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@xlabs/portal-bridge-ui", - "version": "0.1.65", + "version": "0.1.66", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@xlabs/portal-bridge-ui", - "version": "0.1.65", + "version": "0.1.66", "dependencies": { "@certusone/wormhole-sdk": "^0.9.22", "@injectivelabs/sdk-ts": "^1.10.72", diff --git a/package.json b/package.json index 6c1ff5d92..1ee15c61e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@xlabs/portal-bridge-ui", - "version": "0.1.65", + "version": "0.1.66", "private": true, "dependencies": { "@certusone/wormhole-sdk": "^0.9.22", diff --git a/src/components/HeaderText.tsx b/src/components/HeaderText.tsx index 41d00d76d..ace64095e 100644 --- a/src/components/HeaderText.tsx +++ b/src/components/HeaderText.tsx @@ -1,11 +1,12 @@ -import { makeStyles, Typography } from "@material-ui/core"; +import { Box, Link, makeStyles, Typography } from "@material-ui/core"; import clsx from "clsx"; import { ReactChild } from "react"; import { COLORS } from "../muiTheme"; +import { Alert, AlertTitle } from "@material-ui/lab"; const useStyles = makeStyles((theme) => ({ centeredContainer: { - marginBottom: theme.spacing(16), + //marginBottom: theme.spacing(16), textAlign: "center", width: "100%", }, @@ -20,8 +21,100 @@ const useStyles = makeStyles((theme) => ({ subtitle: { marginTop: theme.spacing(2), }, + alert: { + marginTop: theme.spacing(5), + marginBottom: theme.spacing(5), + margin: "auto", + textAlign: "left", + display: "flex", + 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": { + 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 Notice() { + const style = useStyles(); + 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. + +
+
+ ); +} + export default function HeaderText({ children, white, @@ -48,6 +141,7 @@ export default function HeaderText({ {subtitle} ) : null} + ); } diff --git a/src/components/Migration/EvmQuickMigrate.tsx b/src/components/Migration/EvmQuickMigrate.tsx index ff1ed41ba..aab65b695 100644 --- a/src/components/Migration/EvmQuickMigrate.tsx +++ b/src/components/Migration/EvmQuickMigrate.tsx @@ -147,8 +147,9 @@ function EvmMigrationLineItem({ poolInfo.data.migrator.address, migrationAmountAbs ); - const transaction = - await poolInfo.data.migrator.migrate(migrationAmountAbs); + const transaction = await poolInfo.data.migrator.migrate( + migrationAmountAbs + ); await transaction.wait(); setTransaction(transaction.hash); enqueueSnackbar(null, { diff --git a/src/components/SolanaCreateAssociatedAddress.tsx b/src/components/SolanaCreateAssociatedAddress.tsx index 92d454a4f..9d1676589 100644 --- a/src/components/SolanaCreateAssociatedAddress.tsx +++ b/src/components/SolanaCreateAssociatedAddress.tsx @@ -58,8 +58,9 @@ export function useAssociatedAccountExistsState( ); const match = associatedAddress.toString() === readableTargetAddress; if (match) { - const associatedAddressInfo = - await connection.getAccountInfo(associatedAddress); + const associatedAddressInfo = await connection.getAccountInfo( + associatedAddress + ); if (!associatedAddressInfo) { if (!cancelled) { setAssociatedAccountExists(false); @@ -111,8 +112,9 @@ export default function SolanaCreateAssociatedAddress({ ); const match = associatedAddress.toString() === readableTargetAddress; if (match) { - const associatedAddressInfo = - await connection.getAccountInfo(associatedAddress); + const associatedAddressInfo = await connection.getAccountInfo( + associatedAddress + ); if (!associatedAddressInfo) { setIsCreating(true); const transaction = new Transaction().add( diff --git a/src/hooks/useHandleRedeem.tsx b/src/hooks/useHandleRedeem.tsx index 0e5422268..92be801dc 100644 --- a/src/hooks/useHandleRedeem.tsx +++ b/src/hooks/useHandleRedeem.tsx @@ -185,8 +185,9 @@ async function evm( signer ); - const estimateGas = - await L2WormholeGateway.estimateGas.receiveTbtc(signedVAA); + const estimateGas = await L2WormholeGateway.estimateGas.receiveTbtc( + signedVAA + ); // We increase the gas limit estimation here by a factor of 10% to account for some faulty public JSON-RPC endpoints. const gasLimit = estimateGas.mul(1100).div(1000);