diff --git a/CHANGELOG.md b/CHANGELOG.md index 81fcfa7..6eb2f59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Support for CIP129 DRep ID - you can query DReps using both legacy format and CIP129 format. The `drep_id` and `hex` fields will reflect the format of the query param + +### Changed + +- BREAKING CHANGE: Endpoints `/governance/dreps` and `/governance/proposals/{tx_hash}/{cert_index}/votes` are now using CIP129 format + ## [2.4.0] - 2024-11-20 ### Added diff --git a/src/routes/governance/proposals/tx-hash/cert-index/votes.ts b/src/routes/governance/proposals/tx-hash/cert-index/votes.ts index 1a758c8..60df235 100644 --- a/src/routes/governance/proposals/tx-hash/cert-index/votes.ts +++ b/src/routes/governance/proposals/tx-hash/cert-index/votes.ts @@ -37,7 +37,12 @@ async function route(fastify: FastifyInstance) { gracefulRelease(clientDbSync); for (const row of rows) { - // Convert voter id to cip129 format + if (!row.voter.startsWith('drep')) { + // Keep non-DRep voter unmodified + continue; + } + + // Convert voter id to CIP129 format const cip129DRep = dbSyncDRepToCIP129({ drep_id: row.voter, has_script: row.voter_has_script,