From fcf66784687c7d253f156eb54f88c5e872cbcc30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bego=C3=B1a=20Alvarez?= Date: Tue, 29 Oct 2024 13:04:01 +0100 Subject: [PATCH] refactor: use format digests for digests --- .../src/lib/ui/utils/generateTransactionsTableColumns.tsx | 4 ++-- apps/explorer/src/pages/object-result/views/ObjectView.tsx | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/explorer/src/lib/ui/utils/generateTransactionsTableColumns.tsx b/apps/explorer/src/lib/ui/utils/generateTransactionsTableColumns.tsx index 09f3954bc5f..3cc12a45e2a 100644 --- a/apps/explorer/src/lib/ui/utils/generateTransactionsTableColumns.tsx +++ b/apps/explorer/src/lib/ui/utils/generateTransactionsTableColumns.tsx @@ -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'; /** @@ -25,7 +25,7 @@ export function generateTransactionsTableColumns(): ColumnDef {formatAddress(digest)}} + label={{formatDigest(digest)}} /> ); diff --git a/apps/explorer/src/pages/object-result/views/ObjectView.tsx b/apps/explorer/src/pages/object-result/views/ObjectView.tsx index a193bf51217..d9c4f427ebc 100644 --- a/apps/explorer/src/pages/object-result/views/ObjectView.tsx +++ b/apps/explorer/src/pages/object-result/views/ObjectView.tsx @@ -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, @@ -143,7 +144,7 @@ function LastTxBlockCard({ digest }: LastTxBlockCardProps): JSX.Element { return ( {formatAddress(digest)}} + value={{formatDigest(digest)}} /> ); }