IntersectMBO / IntersectMBO/govtool
🐛 2K_2. Mismatch Between Frontend dRep List and API Response
- Dominant language
- HTML
- Stars
- 21
- Forks
- 29
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 7
Description
### Area
Other
### Domain
preview.gov.tools
### Which wallet were you using?
_No response_
### Context
When sorting the dRep list by registration date, the API response includes dRep entries that have the doNotList flag set. These entries should be excluded from the API response to ensure that only visible dReps are displayed. This discrepancy affects pagination, as the API response might contain more items than those actually shown in the frontend.
### Steps to reproduce
1. Navigate to the dRep Directory.
2. Sort the dRep list by registration date.
3. Observe the dRep list on the frontend.
4. Compare the frontend list with the dRep list returned by the API.
### Actual behavior
Frontend: Displays only 9 dReps out of 10 expected due to the presence of a dRep with doNotList that is not shown.

API Response: Includes 10 dReps, including the one flagged with doNotList, which should be excluded. doNotList set dRep `drep10q8zg27gca3s7gcz2l9cf2prgkwy3wypjtee36vkkw82qqfrwrk`
```
{
"page": 0,
"pageSize": 10,
"total": 234,
"elements": [
{
"drepId": "8002ad7e01433f21081d5f8cfe78e09756f6bf44612c67b32f6973e5",
"view": "drep1sqp26lspgvljzzqat7x0u78qjat0d06yvykx0ve0d9e72uzpufg",
"url": "https://raw.githubusercontent.com/stakelovelace/pub/main/a.json",
"metadataHash": "2efdb3f2f46d103865ee3a1a37adcfc916b81d5c14669b6ab71344b439b4a475",
"deposit": 500000000,
"votingPower": 52307064,
"status": "Active",
"type": "DRep",
"latestTxHash": "10534a796df9d8cc297b5b3c719ed8d1bece7a12aaf56ee5f1d602c54044548b",
"latestRegistrationDate": "2024-09-08T14:03:27Z",
"paymentAddress": null,
"givenName": null,
"objectives": null,
"motivations": null,
"qualifications": null,
"imageUrl": null,
"imageHash": null
},
{
"drepId": "2eed24ec0f9cb10dbd3e888f14cce9d7dee2b4fd82397893e468bcbe",
"view": "drep19mkjfmq0njcsm0f73z83fn8f6l0w9d8asguh3ylydz7tuuxsvzs",
"url": "https://raw.githubusercontent.com/Ryun1/metadata/main/Ryan!!%20(2).jsonld",
"metadataHash": "9187cc6364a5ecaa597f4ee95c72ee4c3baa51d7cbdbdbe2c7e8e2fa3c61666a",
"deposit": 500000000,
"votingPower": 172593326173,
"status": "Active",
"type": "DRep",
"latestTxHash": "c15ae11f35635301605495cadf2889076322c4e919398f3f253e1779addf2b46",
"latestRegistrationDate": "2024-09-06T22:22:36Z",
"paymentAddress": null,
"givenName": null,
"objectives": null,
"motivations": null,
"qualifications": null,
"imageUrl": null,
"imageHash": null
},
{
"drepId": "780e242bc8c7630f230257cb84a823459c48b88192f398e996b38ea0",
"view": "drep10q8zg27gca3s7gcz2l9cf2prgkwy3wypjtee36vkkw82qqfrwrk",
"url": "https://metadata-govtool.cardanoapi.io/data/Hettie.jsonld",
"metadataHash": "a8efc2c6408a3942d419bec82527d32bdd1ff98a3caa411b9d2957093ecf54a2",
"deposit": 500000000,
"votingPower": 19817075,
"status": "Active",
"type": "DRep",
"latestTxHash": "f3f50418e9128ad820d2c9b66a10a30b95e9606fb3761c368c01dc5a65a98171",
"latestRegistrationDate": "2024-09-06T10:14:54Z",
"paymentAddress": null,
"givenName": null,
"objectives": null,
"motivations": null,
"qualifications": null,
"imageUrl": null,
"imageHash": null
},
{
"drepId": "81a083751c32efd67e70b68c78ac680fb955ff828eddb13572eba27f",
"view": "drep1sxsgxaguxthavlnsk6x83trgp7u4tluz3mwmzdtjaw387pe7l7q",
"url": "https://metadata-govtool.cardanoapi.io/data/Savanna.jsonld",
"metadataHash": "65cb01571e803588964f422e9d126a90636e66473c5bb4aeac0b50ce30caf731",
"deposit": 500000000,
"votingPower": 19817031,
"status": "Active",
"type": "DRep",
"latestTxHash": "4c60a3553901a2e395c39f3204506874b7972bd12c64b6cebfba2cd5305247f4",
"latestRegistrationDate": "2024-09-06T10:14:54Z",
"paymentAddress": null,
"givenName": null,
"objectives": null,
"motivations": null,
"qualifications": null,
"imageUrl": null,
"imageHash": null
},
{
"drepId": "9e12a61bb5169f2cdf646c20f31ce36e7a9ae2e29b88bd77bfb33097",
"view": "drep1ncf2vxa4z60jehmydss0x88rdeaf4chznwyt6aalkvcfwlpjtr9",
"url": "https://metadata-govtool.cardanoapi.io/data/Declan.jsonld",
"metadataHash": "32a362a09d0493313bf1b0a974a38c140e79c2e699ca6c275674df2e6e42fcba",
"deposit": 500000000,
"votingPower": 19817075,
"status": "Active",
"type": "DRep",
"latestTxHash": "053d5eb1fe965fbe1449026b63ed3dd5fb296b271a8504a8e5415caba6cef31b",
"latestRegistrationDate": "2024-09-06T10:14:54Z",
"paymentAddress": null,
"givenName": null,
"objectives": null,
"motivations": null,
"qualifications": null,
"imageUrl": null,
"imageHash": null
},
{
"drepId": "05cd770627e78114a56b7031c65ec6e4d5f75e92936ed8002b84d753",
"view": "drep1qhxhwp38u7q3ffttwqcuvhkxun2lwh5jjdhdsqptsnt4x8n80g6",
"url": "https://metadata-govtool.cardanoapi.io/data/Albina.jsonld",
"metadataHash": "710c5cfba3ad8b6d4556bc9631296e9b73c6ff6d3a9a23e86904b685372440cf",
"deposit": 500000000,
"votingPower": 19817075,
"status": "Active",
"type": "DRep",
"latestTxHash": "2421337819de40dfa91e8d85c6664c43190e221e88aa30a29a360be8fcee0b57",
"latestRegistrationDate": "2024-09-06T10:14:15Z",
"paymentAddress": null,
"givenName": null,
"objectives": null,
"motivations": null,
"qualifications": null,
"imageUrl": null,
"imageHash": null
},
{
"drepId": "08fde926d2472a154107561c5f5af85358e1a16eb874993e62c74e0a",
"view": "drep1pr77jfkjgu4p2sg82cw97khc2dvwrgtwhp6fj0nzca8q56r9va7",
"url": "https://metadata-govtool.cardanoapi.io/data/Torrey",
"metadataHash": "b5c37ca7d3f9f9c3c2497c39a9d48047f3d4497d3d805316ff468b86d8cf3df6",
"deposit": 500000000,
"votingPower": null,
"status": "Active",
"type": "DRep",
"latestTxHash": "20a24eccd15f62909ca2e0d829f867a420f5439529457ca1c0040fa4db9a1cba",
"latestRegistrationDate": "2024-09-06T10:11:03Z",
"paymentAddress": null,
"givenName": null,
"objectives": null,
"motivations": null,
"qualifications": null,
"imageUrl": null,
"imageHash": null
},
{
"drepId": "5e242c880a1bffe4ef5dcdce2f74ac6cb7fff6ee62f6635659377053",
"view": "drep1tcjzezq2r0l7fm6aeh8z7a9vdjmllahwvtmxx4jexac9xkn80cg",
"url": "https://metadata-govtool.cardanoapi.io/data/Delmer",
"metadataHash": "2b9fe9b31c9fc6b6b39549f94f988eb3bedc6dcbec962e715fa39d830a5b7ba1",
"deposit": 500000000,
"votingPower": null,
"status": "Active",
"type": "DRep",
"latestTxHash": "20a24eccd15f62909ca2e0d829f867a420f5439529457ca1c0040fa4db9a1cba",
"latestRegistrationDate": "2024-09-06T10:11:03Z",
"paymentAddress": null,
"givenName": null,
"objectives": null,
"motivations": null,
"qualifications": null,
"imageUrl": null,
"imageHash": null
},
{
"drepId": "675550f592397c273e9335900da80f945230c05e4d88313081ebf5d7",
"view": "drep1va24pavj897zw05nxkgqm2q0j3frpsz7fkyrzvypa06aw78dzje",
"url": null,
"metadataHash": null,
"deposit": -500000000,
"votingPower": null,
"status": "Retired",
"type": "DRep",
"latestTxHash": "eda780f59d21367af388fdb67b296e5263b23904e32bf108085a7da0e43f82f4",
"latestRegistrationDate": "2024-09-06T10:11:03Z",
"paymentAddress": null,
"givenName": null,
"objectives": null,
"motivations": null,
"qualifications": null,
"imageUrl": null,
"imageHash": null
},
{
"drepId": "735e5c247ab9d69d22d342282995c6f3a3a54b4688dc3b1071ced190",
"view": "drep1wd09cfr6h8tf6gkngg5zn9wx7w362j6x3rwrkyr3emgeqgxhena",
"url": null,
"metadataHash": null,
"deposit": -500000000,
"votingPower": null,
"status": "Retired",
"type": "DRep",
"latestTxHash": "769994751c5fc06f923da877ce3722170d0f40a7c8a9d6205bd52fd66c8794ad",
"latestRegistrationDate": "2024-09-06T10:11:03Z",
"paymentAddress": null,
"givenName": null,
"objectives": null,
"motivations": null,
"qualifications": null,
"imageUrl": null,
"imageHash": null
}
]
}
```
### Expected behavior
The API response should exclude dReps with the doNotList flag to ensure consistency between the displayed list and the paginated data. This will correct the pagination issue and ensure that the number of dReps displayed matches the number of dReps returned by the API.
Contributor guide
Assessment
This issue has not been assessed yet.