From eaf88081662a6ee92d974e1072ac698e8883cf13 Mon Sep 17 00:00:00 2001 From: katspaugh <381895+katspaugh@users.noreply.github.com> Date: Mon, 16 Dec 2024 10:21:41 +0100 Subject: [PATCH] Update tx details --- .../TxDetails/TxData/DecodedData/index.tsx | 5 +---- .../TxDetails/TxData/SafeUpdate/index.tsx | 16 ++++++++++++++++ .../transactions/TxDetails/TxData/index.tsx | 12 +++++++++++- 3 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 src/components/transactions/TxDetails/TxData/SafeUpdate/index.tsx diff --git a/src/components/transactions/TxDetails/TxData/DecodedData/index.tsx b/src/components/transactions/TxDetails/TxData/DecodedData/index.tsx index 50bdbfc53f..37f8735a4d 100644 --- a/src/components/transactions/TxDetails/TxData/DecodedData/index.tsx +++ b/src/components/transactions/TxDetails/TxData/DecodedData/index.tsx @@ -12,7 +12,6 @@ import MethodCall from './MethodCall' import useSafeAddress from '@/hooks/useSafeAddress' import { sameAddress } from '@/utils/addresses' import { DelegateCallWarning } from '@/components/transactions/Warning' -import { isMigrateToL2TxData } from '@/utils/transaction-guards' interface Props { txData: TransactionDetails['txData'] @@ -59,11 +58,9 @@ export const DecodedData = ({ txData, toInfo }: Props): ReactElement | null => { decodedData = } - const isL2Migration = isMigrateToL2TxData(txData, chainInfo?.chainId) - return ( - {isDelegateCall && } + {isDelegateCall && } {method ? ( diff --git a/src/components/transactions/TxDetails/TxData/SafeUpdate/index.tsx b/src/components/transactions/TxDetails/TxData/SafeUpdate/index.tsx new file mode 100644 index 0000000000..efa3868d3b --- /dev/null +++ b/src/components/transactions/TxDetails/TxData/SafeUpdate/index.tsx @@ -0,0 +1,16 @@ +import { Stack } from '@mui/material' +import type { TransactionData } from '@safe-global/safe-gateway-typescript-sdk' +import UpdateSafe from '@/components/tx/confirmation-views/UpdateSafe' +import DecodedData from '../DecodedData' + +function SafeUpdate({ txData }: { txData?: TransactionData }) { + return ( + + + + + + ) +} + +export default SafeUpdate diff --git a/src/components/transactions/TxDetails/TxData/index.tsx b/src/components/transactions/TxDetails/TxData/index.tsx index 21ed9d064a..fc2bd276de 100644 --- a/src/components/transactions/TxDetails/TxData/index.tsx +++ b/src/components/transactions/TxDetails/TxData/index.tsx @@ -1,6 +1,11 @@ import SettingsChangeTxInfo from '@/components/transactions/TxDetails/TxData/SettingsChange' import type { SpendingLimitMethods } from '@/utils/transaction-guards' -import { isExecTxData, isOnChainConfirmationTxData, isStakingTxWithdrawInfo } from '@/utils/transaction-guards' +import { + isExecTxData, + isOnChainConfirmationTxData, + isSafeUpdateTxData, + isStakingTxWithdrawInfo, +} from '@/utils/transaction-guards' import { isStakingTxExitInfo } from '@/utils/transaction-guards' import { isCancellationTxInfo, @@ -28,6 +33,7 @@ import StakingTxExitDetails from '@/features/stake/components/StakingTxExitDetai import StakingTxWithdrawDetails from '@/features/stake/components/StakingTxWithdrawDetails' import { OnChainConfirmation } from './NestedTransaction/OnChainConfirmation' import { ExecTransaction } from './NestedTransaction/ExecTransaction' +import SafeUpdate from './SafeUpdate' const TxData = ({ txDetails, @@ -87,6 +93,10 @@ const TxData = ({ return } + if (isSafeUpdateTxData(txDetails.txData)) { + return + } + return }