Skip to content

Commit

Permalink
Display EVM function name in verified contract calls
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaw3d committed Oct 14, 2024
1 parent c3c1d52 commit f4849d5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions .changelog/1565.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Display EVM function name in verified contract calls
1 change: 0 additions & 1 deletion src/app/components/ConsensusTransactionMethod/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ const MethodIconContent: FC<MethodIconContentProps> = ({
<Typography
sx={{
fontWeight: 'inherit',
textTransform: 'capitalize',
order: reverseLabel ? -1 : 0,
...(truncate
? {
Expand Down
9 changes: 8 additions & 1 deletion src/app/components/RuntimeTransactionMethod/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,14 @@ type RuntimeTransactionLabelProps = {

export const RuntimeTransactionMethod: FC<RuntimeTransactionLabelProps> = ({ transaction, truncate }) => {
const { t } = useTranslation()
const label = getRuntimeTransactionLabel(t, transaction.method)
let label = getRuntimeTransactionLabel(t, transaction.method)
if (transaction.evm_fn_name) {
if (truncate) {
label = `${transaction.evm_fn_name}`
} else {
label += `: ${transaction.evm_fn_name}`
}
}

return <>{getRuntimeTransactionIcon(transaction.method, label, truncate)}</>
}

0 comments on commit f4849d5

Please sign in to comment.