Skip to content

Commit

Permalink
fix: Hide nonce in tx flow for counterfactual safes
Browse files Browse the repository at this point in the history
  • Loading branch information
usame-algan committed Feb 6, 2024
1 parent 2686062 commit 5c11ac1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/tx-flow/common/TxLayout/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import useSafeInfo from '@/hooks/useSafeInfo'
import { type ComponentType, type ReactElement, type ReactNode, useContext, useEffect, useState } from 'react'
import { Box, Container, Grid, Typography, Button, Paper, SvgIcon, IconButton, useMediaQuery } from '@mui/material'
import { useTheme } from '@mui/material/styles'
Expand All @@ -23,6 +24,7 @@ const TxLayoutHeader = ({
icon: TxLayoutProps['icon']
subtitle: TxLayoutProps['subtitle']
}) => {
const { safe } = useSafeInfo()
const { nonceNeeded } = useContext(SafeTxContext)

if (hideNonce && !icon && !subtitle) return null
Expand All @@ -41,7 +43,7 @@ const TxLayoutHeader = ({
</Typography>
</Box>

{!hideNonce && nonceNeeded && <TxNonce />}
{!hideNonce && safe.deployed && nonceNeeded && <TxNonce />}
</Box>
)
}
Expand Down

0 comments on commit 5c11ac1

Please sign in to comment.