Skip to content

Commit

Permalink
#318 - add planned outage - head up banner
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianscatularo committed Aug 18, 2023
1 parent a76ce2a commit 67797e3
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 13 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
98 changes: 96 additions & 2 deletions src/components/HeaderText.tsx
Original file line number Diff line number Diff line change
@@ -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%",
},
Expand All @@ -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 (
<Alert severity="warning" className={style.alert}>
<AlertTitle>
Wormhole Upgrade Approaching - Expect Temporary Downtime
</AlertTitle>
<Box>
<Typography paragraph>
A required upgrade is being coordinated and executed by the network of
Wormhole Guardian (validator) nodes to add Gateway to the Wormhole
stack.
</Typography>
<Typography paragraph>
Please take note that token bridging will pause for several hours on{" "}
<br />
<Typography component="span">Monday, August 21, 2023</Typography>{" "}
during the upgrade.
</Typography>
<Typography paragraph>
Follow:{" "}
<Link href="https://twitter.com/wormholecrypto" target="_blank">
@wormholecrypto
</Link>{" "}
and join the{" "}
<Link
href="https://discord.com/invite/wormholecrypto"
target="_blank"
>
Discord
</Link>{" "}
for updates.
</Typography>
</Box>
</Alert>
);
}

export default function HeaderText({
children,
white,
Expand All @@ -48,6 +141,7 @@ export default function HeaderText({
{subtitle}
</Typography>
) : null}
<Notice />
</div>
);
}
5 changes: 3 additions & 2 deletions src/components/Migration/EvmQuickMigrate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand Down
10 changes: 6 additions & 4 deletions src/components/SolanaCreateAssociatedAddress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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(
Expand Down
5 changes: 3 additions & 2 deletions src/hooks/useHandleRedeem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 67797e3

Please sign in to comment.