Skip to content

Commit

Permalink
fix: decoding was displayed twice for stake & swap (#4325)
Browse files Browse the repository at this point in the history
Decoding in the SignOrExecuteForm was displayed twice
for stake and swap txs.
  • Loading branch information
compojoom authored Oct 7, 2024
1 parent 5473cb5 commit d6d5093
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
9 changes: 7 additions & 2 deletions src/components/tx/SignOrExecuteForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { trackEvent } from '@/services/analytics'
import useChainId from '@/hooks/useChainId'
import ExecuteThroughRoleForm from './ExecuteThroughRoleForm'
import { findAllowingRole, findMostLikelyRole, useRoles } from './ExecuteThroughRoleForm/hooks'
import { isCustomTxInfo, isGenericConfirmation } from '@/utils/transaction-guards'
import { isAnyStakingTxInfo, isCustomTxInfo, isGenericConfirmation, isOrderTxInfo } from '@/utils/transaction-guards'
import useIsSafeOwner from '@/hooks/useIsSafeOwner'
import { BlockaidBalanceChanges } from '../security/blockaid/BlockaidBalanceChange'
import { Blockaid } from '../security/blockaid'
Expand Down Expand Up @@ -104,7 +104,12 @@ export const SignOrExecuteForm = ({
}
: skipToken,
)
const showTxDetails = props.txId && txDetails && !isCustomTxInfo(txDetails.txInfo)
const showTxDetails =
props.txId &&
txDetails &&
!isCustomTxInfo(txDetails.txInfo) &&
!isAnyStakingTxInfo(txDetails.txInfo) &&
!isOrderTxInfo(txDetails.txInfo)
const isDelegate = useIsWalletDelegate()
const [trigger] = useLazyGetTransactionDetailsQuery()
const [readableApprovals] = useApprovalInfos({ safeTransaction: safeTx })
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Stack } from '@mui/material'
import FieldsGrid from '@/components/tx/FieldsGrid'
import type {
NativeStakingWithdrawConfirmationView,
StakingTxWithdrawInfo,
import {
type NativeStakingWithdrawConfirmationView,
type StakingTxWithdrawInfo,
} from '@safe-global/safe-gateway-typescript-sdk'
import TokenAmount from '@/components/common/TokenAmount'

Expand Down

0 comments on commit d6d5093

Please sign in to comment.