diff --git a/src/components/sidebar/NewTxButton/index.tsx b/src/components/sidebar/NewTxButton/index.tsx index 2c57814b06..9f953643e7 100644 --- a/src/components/sidebar/NewTxButton/index.tsx +++ b/src/components/sidebar/NewTxButton/index.tsx @@ -1,3 +1,5 @@ +import ActivateAccountButton from '@/features/counterfactual/ActivateAccountButton' +import useIsCounterfactualSafe from '@/features/counterfactual/hooks/useIsCounterfactualSafe' import { type ReactElement, useContext } from 'react' import Button from '@mui/material/Button' import { OVERVIEW_EVENTS, trackEvent } from '@/services/analytics' @@ -8,12 +10,17 @@ import WatchlistAddButton from '../WatchlistAddButton' const NewTxButton = (): ReactElement => { const { setTxFlow } = useContext(TxModalContext) + const isCounterfactualSafe = useIsCounterfactualSafe() const onClick = () => { setTxFlow(, undefined, false) trackEvent({ ...OVERVIEW_EVENTS.NEW_TRANSACTION, label: 'sidebar' }) } + if (isCounterfactualSafe) { + return + } + return ( {(isOk) => diff --git a/src/features/counterfactual/ActivateAccountButton.tsx b/src/features/counterfactual/ActivateAccountButton.tsx index fe7670e4b7..c6cd0e3b7e 100644 --- a/src/features/counterfactual/ActivateAccountButton.tsx +++ b/src/features/counterfactual/ActivateAccountButton.tsx @@ -31,6 +31,7 @@ const ActivateAccountButton = () => { data-testid="activate-account-btn-cf" variant="contained" size="small" + fullWidth onClick={activateAccount} disabled={isProcessing || !isOk} sx={{ minHeight: '40px' }}