Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove "Review transaction" view #3164

Prev Previous commit
Next Next commit
Disable widget when tx in progress
Signed-off-by: Emre Bogazliyanlioglu <emre@wormholelabs.xyz>
emreboga committed Feb 25, 2025
commit 5b0b71bf107e0f7c5d006611021cb59785d99c48
4 changes: 3 additions & 1 deletion wormhole-connect/src/views/v2/Bridge/index.tsx
Original file line number Diff line number Diff line change
@@ -584,7 +584,9 @@ const Bridge = () => {
return (
<div className={joinClass([classes.bridgeContent, classes.spacer])}>
{header}
{config.ui.showInProgressWidget && <TxHistoryWidget />}
{config.ui.showInProgressWidget && (
<TxHistoryWidget disabled={isTransactionInProgress} />
)}
{bridgeHeader}
{sourceAssetPicker}
{destAssetPicker}
3 changes: 2 additions & 1 deletion wormhole-connect/src/views/v2/TxHistory/Widget/Item.tsx
Original file line number Diff line number Diff line change
@@ -81,6 +81,7 @@ const useStyles = makeStyles()((theme: any) => ({

type Props = {
data: TransactionLocal;
disabled: boolean;
};

const WidgetItem = (props: Props) => {
@@ -270,7 +271,7 @@ const WidgetItem = (props: Props) => {
<Card className={classes.card}>
<CardActionArea
disableTouchRipple
disabled={!txDetails}
disabled={props.disabled || !txDetails}
className={classes.cardActionArea}
onClick={resumeTransaction}
>
4 changes: 2 additions & 2 deletions wormhole-connect/src/views/v2/TxHistory/Widget/index.tsx
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ const useStyles = makeStyles()((theme) => ({
},
}));

const TxHistoryWidget = () => {
const TxHistoryWidget = (props: { disabled: boolean }) => {
const { classes } = useStyles();
const theme = useTheme();

@@ -77,7 +77,7 @@ const TxHistoryWidget = () => {
</Typography>
</div>
{transactions.map((tx) => (
<WidgetItem key={tx.txHash} data={tx} />
<WidgetItem key={tx.txHash} data={tx} disabled={props.disabled} />
))}
</div>
);