Skip to content

Commit

Permalink
Fix React duplicated key warning in transactions list
Browse files Browse the repository at this point in the history
  • Loading branch information
buberdds committed May 14, 2024
1 parent 454f3eb commit f844885
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .changelog/1412.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix React duplicated key warning in transactions list
2 changes: 1 addition & 1 deletion src/app/components/Transactions/ConsensusTransactions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const ConsensusTransactions: FC<ConsensusTransactionsProps> = ({
: []),
]
const tableRows = transactions?.map(transaction => ({
key: transaction.hash,
key: `${transaction.hash}${transaction.index}`,
data: [
{
content: <StatusIcon success={transaction.success} error={transaction.error} />,
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/Transactions/RuntimeTransactions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const RuntimeTransactions: FC<TransactionsProps> = ({
const tableRows = transactions?.map(transaction => {
const targetAddress = transaction.to_eth || transaction.to
return {
key: transaction.hash,
key: `${transaction.hash}${transaction.index}`,
data: [
{
content: <StatusIcon success={transaction.success} error={transaction.error} />,
Expand Down

0 comments on commit f844885

Please sign in to comment.