Skip to content

Commit 162c573

Browse files
committed
fix: use unique identifiers in pectra table rows
1 parent 7cc401d commit 162c573

File tree

5 files changed

+15
-9
lines changed

5 files changed

+15
-9
lines changed

frontend/components/dashboard/table/DashboardTableClConsolidations.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,11 @@ const setSearch = (value?: string) => {
5353
expandable
5454
:row-class="(row: VDBConsolidationsClTableRow) =>
5555
row.status === 'queued' ? 'dashboard-table-cl-consolidations__row--grayed-out' : ''"
56-
data-key="source"
56+
data-key="id"
5757
:selected-sort="query?.sort"
5858
:cursor="query?.cursor"
5959
:page-size="query?.limit"
60-
table-class="
61-
dashboard-table-cl-consolidations"
60+
table-class="dashboard-table-cl-consolidations"
6261
@set-cursor="setCursor"
6362
@sort="onSort"
6463
@set-page-size="setPageSize"

frontend/components/dashboard/table/DashboardTableClDeposits.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ const tableData = computed(() => {
5454
{
5555
amount: clDepositsTotalAmount?.data.total_amount,
5656
isTotalAmountRow: true,
57+
slot: -1, // used for identifier
58+
slot_index: -1, // used for identifier
5759
},
5860
...clDeposits.data,
5961
],
@@ -115,7 +117,7 @@ const {
115117
<template #table>
116118
<ClientOnly fallback-tag="span">
117119
<BcTable
118-
:data="tableData"
120+
:data="addIdentifier(tableData, 'slot', 'slot_index')"
119121
data-key="identifier"
120122
expandable
121123
table-class="dashboard-table-cl-deposits"

frontend/components/dashboard/table/DashboardTableClWithdrawals.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ const tableData = computed(() => {
5757
{
5858
amount: clWithdrawalsTotalAmount?.data.total_amount,
5959
isTotalAmountRow: true,
60+
slot: -1, // used for identifier
61+
slot_index: -1, // used for identifier
6062
},
6163
...clWithdrawals.data,
6264
],
@@ -85,10 +87,10 @@ const getGroupName = (groupId: number) => {
8587
<template #table>
8688
<ClientOnly fallback-tag="span">
8789
<BcTable
88-
:data="tableData"
90+
:data="addIdentifier(tableData, 'slot', 'slot_index')"
8991
expandable
9092
table-class="dashboard-table-cl-withdrawals"
91-
data-key="public_key"
93+
data-key="identifier"
9294
:selected-sort="query?.sort"
9395
:row-class="(row: VDBWithdrawalsElTableRow) => row.status === 'queued' ? 'grayed-out-row' : ''"
9496
:is-row-expandable="(row: VDBWithdrawalsElTableRow) => row.index !== undefined"

frontend/components/dashboard/table/DashboardTableElConsolidations.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const setSearch = (value?: string) => {
5757
<template #table>
5858
<ClientOnly fallback-tag="span">
5959
<BcTable
60-
:data="elConsolidations"
60+
:data="addIdentifier(elConsolidations, 'block_queued', 'tx_index_queued', 'itx_index_queued')"
6161
expandable
6262
:row-class="(row: VDBConsolidationsElTableRow) => row.status === 'queued' ? 'grayed-out-row' : ''"
6363
data-key="identifier"

frontend/components/dashboard/table/DashboardTableElWithdrawals.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ const tableData = computed(() => {
5555
data: [
5656
{
5757
amount: elWithdrawalsTotalAmount?.data.total_amount,
58+
block_queued: -1, // used for identifier
5859
isTotalAmountRow: true,
60+
itx_index_queued: -1, // used for identifier
61+
tx_index_queued: -1, // used for identifier
5962
},
6063
...elWithdrawals.data,
6164
],
@@ -84,10 +87,10 @@ const getGroupName = (groupId: number) => {
8487
<template #table>
8588
<ClientOnly fallback-tag="span">
8689
<BcTable
87-
:data="tableData"
90+
:data="addIdentifier(tableData, 'block_queued', 'tx_index_queued', 'itx_index_queued')"
8891
expandable
8992
table-class="dashboard-table-el-withdrawals"
90-
data-key="timestamp_queued"
93+
data-key="identifier"
9194
:selected-sort="query?.sort"
9295
:row-class="(row: VDBWithdrawalsElTableRow) => row.status === 'queued' ? 'grayed-out-row' : ''"
9396
:is-row-expandable="(row: VDBWithdrawalsElTableRow) => row.index !== undefined"

0 commit comments

Comments
 (0)