Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: display factory and mastercopy known names in create tx info #1365

Merged
merged 3 commits into from
Dec 19, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 21 additions & 10 deletions src/components/transactions/SafeCreationTx/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import EthHashInfo from '@/components/common/EthHashInfo'
import { generateDataRowValue, TxDataRow } from '@/components/transactions/TxDetails/Summary/TxDataRow'
import { dateString } from '@/utils/formatters'
import { isCreationTxInfo } from '@/utils/transaction-guards'
import { NOT_AVAILABLE } from '@/components/transactions/TxDetails'

type SafeCreationTxProps = {
txSummary: TransactionSummary
Expand All @@ -24,16 +25,26 @@ const SafeCreationTx = ({ txSummary }: SafeCreationTxProps) => {
<InfoDetails title="Creator:">
<EthHashInfo address={creator.value} shortAddress={false} showCopyButton hasExplorer />
</InfoDetails>
{factory && (
<InfoDetails title="Factory:">
<EthHashInfo address={factory?.value} shortAddress={false} showCopyButton hasExplorer />
</InfoDetails>
)}
{implementation && (
<InfoDetails title="Mastercopy:">
<EthHashInfo address={implementation?.value} shortAddress={false} showCopyButton hasExplorer />
</InfoDetails>
)}
<InfoDetails title="Factory:">
{factory ? (
<EthHashInfo name={factory.name} address={factory.value} shortAddress={false} showCopyButton hasExplorer />
) : (
NOT_AVAILABLE
)}
</InfoDetails>
<InfoDetails title="Mastercopy:">
{implementation ? (
<EthHashInfo
name={implementation.name}
address={implementation.value}
shortAddress={false}
showCopyButton
hasExplorer
/>
) : (
NOT_AVAILABLE
)}
</InfoDetails>
</Box>
<Box className={css.txSummary}>
<TxDataRow title="Transaction hash:">{generateDataRowValue(transactionHash, 'hash', true)}</TxDataRow>
Expand Down