Skip to content

Commit

Permalink
fix: tenderly simulation uses signer instead of wallet address, fix E…
Browse files Browse the repository at this point in the history
…xternalLinks
  • Loading branch information
schmanu committed Nov 5, 2024
1 parent df91be2 commit 4f5cb58
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/common/ExternalLink/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const ExternalLink = ({
</Box>
)
return mode === 'link' ? (
<Link rel="noreferrer noopener" target="_blank" {...props}>
<Link href={href} rel="noreferrer noopener" target="_blank" {...props}>
{linkContent}
</Link>
) : (
Expand Down
8 changes: 4 additions & 4 deletions src/components/tx/security/tenderly/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useContext, useEffect } from 'react'
import type { ReactElement } from 'react'

import useSafeInfo from '@/hooks/useSafeInfo'
import useWallet from '@/hooks/wallets/useWallet'
import { useSigner } from '@/hooks/wallets/useWallet'
import CheckIcon from '@/public/images/common/check.svg'
import CloseIcon from '@/public/images/common/close.svg'
import { useDarkMode } from '@/hooks/useDarkMode'
Expand Down Expand Up @@ -33,7 +33,7 @@ export type TxSimulationProps = {
// TODO: Test this component
const TxSimulationBlock = ({ transactions, disabled, gasLimit, executionOwner }: TxSimulationProps): ReactElement => {
const { safe } = useSafeInfo()
const wallet = useWallet()
const signer = useSigner()
const isDarkMode = useDarkMode()
const { safeTx } = useContext(SafeTxContext)
const {
Expand All @@ -42,13 +42,13 @@ const TxSimulationBlock = ({ transactions, disabled, gasLimit, executionOwner }:
} = useContext(TxInfoContext)

const handleSimulation = async () => {
if (!wallet) {
if (!signer) {
return
}

simulateTransaction({
safe,
executionOwner: executionOwner ?? wallet.address,
executionOwner: executionOwner ?? signer.address,
transactions,
gasLimit,
} as SimulationTxParams)
Expand Down

0 comments on commit 4f5cb58

Please sign in to comment.