Skip to content

Commit

Permalink
feat: show redefine warnings on mobile
Browse files Browse the repository at this point in the history
- adds RedefineMessage to TxChecks for small screens
- changes order of Redefine scan results and Tenderly Simulation
  • Loading branch information
schmanu committed Jul 5, 2023
1 parent 55cdf74 commit cdc4420
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/components/tx/SignOrExecuteForm/TxChecks.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { type ReactElement, useContext } from 'react'
import { TxSimulation } from '@/components/tx/security/tenderly'
import { SafeTxContext } from '@/components/tx-flow/SafeTxProvider'
import { Typography } from '@mui/material'
import { Redefine } from '@/components/tx/security/redefine'
import { Box, Typography } from '@mui/material'
import { Redefine, RedefineMessage } from '@/components/tx/security/redefine'

import css from './styles.module.css'

const TxChecks = (): ReactElement => {
const { safeTx } = useContext(SafeTxContext)
Expand All @@ -11,9 +13,13 @@ const TxChecks = (): ReactElement => {
<>
<Typography variant="h5">Transaction checks</Typography>

<TxSimulation disabled={false} transactions={safeTx} />

<Redefine />

<TxSimulation disabled={false} transactions={safeTx} />
<Box className={css.mobileRedefineMessages}>
<RedefineMessage />
</Box>
</>
)
}
Expand Down
10 changes: 10 additions & 0 deletions src/components/tx/SignOrExecuteForm/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,13 @@
.errorWrapper {
margin-top: var(--space-2) !important;
}

.mobileRedefineMessages {
display: none;
}

@media (max-width: 899.95px) {
.mobileRedefineMessages {
display: block;
}
}

0 comments on commit cdc4420

Please sign in to comment.