Skip to content

Commit a6b4e94

Browse files
authored
fix: show the freeze address as the target for asset freeze transactions (#39)
1 parent a3b3f46 commit a6b4e94

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/features/transactions/components/transactions-graph.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ function getTransactionRepresentation(
588588
}
589589

590590
if (transaction.type === TransactionType.AssetFreeze) {
591-
return collaborators.findIndex((a) => transaction.assetId.toString() === a.id)
591+
return collaborators.findIndex((a) => transaction.address.toString() === a.id)
592592
}
593593

594594
throw new Error('Not supported transaction type')
@@ -729,8 +729,8 @@ const getTransactionCollaborators = (transaction: Transaction | InnerTransaction
729729
}
730730
if (transaction.type === TransactionType.AssetFreeze) {
731731
collaborators.push({
732-
type: 'Asset',
733-
id: transaction.assetId.toString(),
732+
type: 'Account',
733+
id: transaction.address.toString(),
734734
})
735735
}
736736
return collaborators

src/features/transactions/components/transactions-table.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ export const transactionsTableColumns: ColumnDef<FlattenedTransaction>[] = [
5656
if (transaction.type === TransactionType.Payment || transaction.type === TransactionType.AssetTransfer)
5757
return ellipseAddress(transaction.receiver)
5858
if (transaction.type === TransactionType.ApplicationCall) return transaction.applicationId
59-
if (transaction.type === TransactionType.AssetConfig || transaction.type === TransactionType.AssetFreeze) return transaction.assetId
59+
if (transaction.type === TransactionType.AssetConfig) return transaction.assetId
60+
if (transaction.type === TransactionType.AssetFreeze) return ellipseAddress(transaction.address)
6061
},
6162
},
6263
{

src/features/transactions/pages/transaction-page.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,7 @@ describe('transaction-page', () => {
10261026
container: tableViewTab,
10271027
rows: [
10281028
{
1029-
cells: ['2XFGVOH...', 'E4A6...VZHY', '1707148495', 'Asset Freeze'],
1029+
cells: ['2XFGVOH...', 'E4A6...VZHY', 'ZJU3...CBQQ', 'Asset Freeze'],
10301030
},
10311031
],
10321032
})

0 commit comments

Comments
 (0)