diff --git a/packages/page-preimages/src/Preimages/Call.tsx b/packages/page-preimages/src/Preimages/Call.tsx index 76f6eff0a9..bd2612c303 100644 --- a/packages/page-preimages/src/Preimages/Call.tsx +++ b/packages/page-preimages/src/Preimages/Call.tsx @@ -3,9 +3,9 @@ import type { Preimage } from '@polkadot/react-hooks/types'; -import React from 'react'; +import React, { useMemo } from 'react'; -import { AddressMini, MarkError, MarkWarning } from '@polkadot/react-components'; +import { AddressMini, CopyButton, MarkError, MarkWarning, styled } from '@polkadot/react-components'; import { ZERO_ACCOUNT } from '@polkadot/react-hooks/useWeight'; import { CallExpander } from '@polkadot/react-params'; import { Null } from '@polkadot/types-codec'; @@ -21,6 +21,14 @@ interface Props { function PreimageCall ({ className = '', value }: Props): React.ReactElement { const { t } = useTranslation(); + const link = useMemo( + () => + value?.proposal + ? `#/extrinsics/decode/${value?.proposal?.toHex()}` + : null, + [value] + ); + return ( <> @@ -33,6 +41,16 @@ function PreimageCall ({ className = '', value }: Props): React.ReactElement )} + {link && ( + + {link.slice(0, 30)}... + + + )} {value.proposalError ? : value.proposalWarning @@ -68,4 +86,11 @@ function PreimageCall ({ className = '', value }: Props): React.ReactElement` + background: var(--bg-table); + .ui--Icon { border-width: 2px; }