-
Notifications
You must be signed in to change notification settings - Fork 428
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correct Occurences of SafeNet to Safenet
We should be calling it `Safenet` and not `SafeNet`, this PR corrects all occurences.
- Loading branch information
Showing
15 changed files
with
167 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 8 additions & 8 deletions
16
.../tx/SignOrExecuteForm/SafeNetTxChecks.tsx → .../tx/SignOrExecuteForm/SafenetTxChecks.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
import { type ReactElement, useContext } from 'react' | ||
import { SafeNetTxSimulation } from '@/components/tx/security/safenet' | ||
import { SafenetTxSimulation } from '@/components/tx/security/safenet' | ||
import TxCard from '@/components/tx-flow/common/TxCard' | ||
import { SafeTxContext } from '@/components/tx-flow/SafeTxProvider' | ||
import useIsSafeNetEnabled from '@/hooks/useIsSafeNetEnabled' | ||
import useIsSafenetEnabled from '@/hooks/useIsSafenetEnabled' | ||
import { Typography } from '@mui/material' | ||
import useChainId from '@/hooks/useChainId' | ||
import useSafeAddress from '@/hooks/useSafeAddress' | ||
|
||
const SafeNetTxChecks = (): ReactElement | null => { | ||
const SafenetTxChecks = (): ReactElement | null => { | ||
const safe = useSafeAddress() | ||
const chainId = useChainId() | ||
const { safeTx } = useContext(SafeTxContext) | ||
const isSafeNetEnabled = useIsSafeNetEnabled() | ||
const isSafenetEnabled = useIsSafenetEnabled() | ||
|
||
if (!isSafeNetEnabled) { | ||
if (!isSafenetEnabled) { | ||
return null | ||
} | ||
|
||
return ( | ||
<TxCard> | ||
<Typography variant="h5">SafeNet checks</Typography> | ||
<Typography variant="h5">Safenet checks</Typography> | ||
|
||
<SafeNetTxSimulation safe={safe} chainId={chainId} safeTx={safeTx} /> | ||
<SafenetTxSimulation safe={safe} chainId={chainId} safeTx={safeTx} /> | ||
</TxCard> | ||
) | ||
} | ||
|
||
export default SafeNetTxChecks | ||
export default SafenetTxChecks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import useSafeInfo from '@/hooks/useSafeInfo' | ||
import { useGetSafenetConfigQuery } from '@/store/safenet' | ||
import { sameAddress } from '@/utils/addresses' | ||
|
||
const useIsSafenetEnabled = () => { | ||
const { safe } = useSafeInfo() | ||
const { data: safenetConfig } = useGetSafenetConfigQuery() | ||
|
||
return sameAddress(safe.guard?.value, safenetConfig?.guards[safe.chainId]) | ||
} | ||
|
||
export default useIsSafenetEnabled |
Oops, something went wrong.