Skip to content

Commit

Permalink
Merge branch 'main' of github.com:safe-global/safe-wallet-web into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh committed Nov 28, 2024
2 parents 6a16d5c + e477fd8 commit 9f5ab1e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "safe-wallet-web",
"homepage": "https://github.com/safe-global/safe-wallet-web",
"license": "GPL-3.0",
"version": "1.47.1",
"version": "1.47.2",
"type": "module",
"scripts": {
"dev": "next dev",
Expand Down
8 changes: 7 additions & 1 deletion src/components/transactions/TxDetails/Summary/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import DecodedData from '../TxData/DecodedData'
import { calculateSafeTransactionHash } from '@safe-global/protocol-kit/dist/src/utils'
import useSafeInfo from '@/hooks/useSafeInfo'
import { SafeTxHashDataRow } from './SafeTxHashDataRow'
import { logError, Errors } from '@/services/exceptions'

interface Props {
txDetails: TransactionDetails
Expand Down Expand Up @@ -147,7 +148,12 @@ export const PartialSummary = ({ safeTx }: { safeTx: SafeTransaction }) => {
const txData = safeTx.data
const { safeAddress, safe } = useSafeInfo()
const safeTxHash = useMemo(() => {
return safe.version && calculateSafeTransactionHash(safeAddress, safeTx.data, safe.version, BigInt(safe.chainId))
if (!safe.version) return
try {
return calculateSafeTransactionHash(safeAddress, safeTx.data, safe.version, BigInt(safe.chainId))
} catch (e) {
logError(Errors._809, e)
}
}, [safe.chainId, safe.version, safeAddress, safeTx.data])
return (
<>
Expand Down
7 changes: 6 additions & 1 deletion src/components/tx/DecodedTx/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { type SyntheticEvent, type ReactElement, memo } from 'react'
import { ErrorBoundary } from '@sentry/react'
import {
isCustomTxInfo,
isMultisigDetailedExecutionInfo,
Expand Down Expand Up @@ -130,7 +131,11 @@ const DecodedTx = ({
hideDecodedData={isMethodCallInAdvanced && !!decodedData?.method}
/>
) : (
tx && <PartialSummary safeTx={tx} />
tx && (
<ErrorBoundary>
<PartialSummary safeTx={tx} />
</ErrorBoundary>
)
)}
</AccordionDetails>
</Accordion>
Expand Down

0 comments on commit 9f5ab1e

Please sign in to comment.