Skip to content

Commit

Permalink
refactor: use format digests for digests
Browse files Browse the repository at this point in the history
  • Loading branch information
begonaalvarezd committed Oct 29, 2024
1 parent a6b8a21 commit fcf6678
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type { IotaTransactionBlockKind, IotaTransactionBlockResponse } from '@io
import { TableCellBase, TableCellText } from '@iota/apps-ui-kit';
import type { ColumnDef } from '@tanstack/react-table';
import { AddressLink, TransactionLink } from '../../../components/ui';
import { formatAddress, NANOS_PER_IOTA } from '@iota/iota-sdk/utils';
import { formatAddress, formatDigest, NANOS_PER_IOTA } from '@iota/iota-sdk/utils';
import { getElapsedTime } from '~/pages/epochs/utils';

/**
Expand All @@ -25,7 +25,7 @@ export function generateTransactionsTableColumns(): ColumnDef<IotaTransactionBlo
<TableCellBase>
<TransactionLink
digest={digest}
label={<TableCellText>{formatAddress(digest)}</TableCellText>}
label={<TableCellText>{formatDigest(digest)}</TableCellText>}
/>
</TableCellBase>
);
Expand Down
3 changes: 2 additions & 1 deletion apps/explorer/src/pages/object-result/views/ObjectView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { CoinFormat, useFormatCoin } from '@iota/core';
import { type IotaObjectResponse, type ObjectOwner } from '@iota/iota-sdk/client';
import {
formatAddress,
formatDigest,
IOTA_TYPE_ARG,
normalizeStructTag,
parseStructTag,
Expand Down Expand Up @@ -143,7 +144,7 @@ function LastTxBlockCard({ digest }: LastTxBlockCardProps): JSX.Element {
return (
<DisplayStats
label="Last Transaction Block Digest"
value={<TransactionLink digest={digest}>{formatAddress(digest)}</TransactionLink>}
value={<TransactionLink digest={digest}>{formatDigest(digest)}</TransactionLink>}
/>
);
}
Expand Down

0 comments on commit fcf6678

Please sign in to comment.