Skip to content

Commit

Permalink
Merge pull request #326 from AElfProject/feature/refactor-2.0.0-Block…
Browse files Browse the repository at this point in the history
…chain

feat: show indexed and nonIndexed
  • Loading branch information
Peterbjx committed Apr 29, 2024
2 parents d1c322e + 7a16c20 commit 227e543
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
11 changes: 7 additions & 4 deletions src/_components/LogsContainer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import addressFormat from '@_utils/urlUtils';
import Copy from '@_components/Copy';
import LogItems from './logItems';
import { useParams } from 'next/navigation';
import ContractToken from '@_components/ContractToken';
function LogsContainer({ Logs = [] }: { Logs: ILogsProps[] }) {
const { chain } = useParams();
return (
Expand All @@ -19,10 +20,12 @@ function LogsContainer({ Logs = [] }: { Logs: ILogsProps[] }) {
label: 'Address',
value: (
<div>
<Link href={`/address${addressFormat(item.contractInfo?.address, chain as string)}`}>
{addressFormat(item.contractInfo?.address, chain as string)}
</Link>
{item.contractInfo?.address && <Copy value={addressFormat(item.contractInfo?.address)} />}
<ContractToken
address={item.contractInfo.address}
name={item.contractInfo.name}
type={item.contractInfo.addressType}
chainId={chain as string}
/>
</div>
),
},
Expand Down
3 changes: 2 additions & 1 deletion src/_components/LogsContainer/logItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ function LogItems({ data }: { data: ILogsProps }) {
const [result] = useState(
JSON.stringify(
{
...data,
indexed: data.indexed,
nonIndexed: data.nonIndexed,
decode: undefined,
},
null,
Expand Down
2 changes: 1 addition & 1 deletion src/app/[chain]/tx/[hash]/_components/baseInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export default function BaseInfo({ data }: { data: ITransactionDetailData }) {
<div>
<IconFont className="mr-1" type="Time" />
<span>
{formatDate(data.timestamp, 'age')}({dayjs(data.timestamp).format('MMM-DD-YYYY hh:mm:ss Z')})
{formatDate(data.timestamp, 'age')}({formatDate(data.timestamp, 'Date Time (UTC)')})
</span>
</div>
),
Expand Down

0 comments on commit 227e543

Please sign in to comment.