Skip to content

Commit

Permalink
[#676] fix drep/info SQL error
Browse files Browse the repository at this point in the history
Signed-off-by: jankun4 <michaljankun@gmail.com>
  • Loading branch information
jankun4 committed Apr 9, 2024
1 parent e9cdbea commit 851201f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ changes.

### Fixed

- drep/info no longer returns 500 [Issue 676](https://github.com/IntersectMBO/govtool/issues/676)
- proposal/list search is case insensitive now [Issue 582](https://github.com/IntersectMBO/govtool/issues/582)
- proposal/list now takes optional `search` query param [Issue 566](https://github.com/IntersectMBO/govtool/issues/566)
- Fix possible sql error when there would be no predefined drep voting pwoer [Issue 501](https://github.com/IntersectMBO/govtool/issues/501)
Expand Down
5 changes: 3 additions & 2 deletions govtool/backend/sql/get-drep-info.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ WITH DRepId AS (
LatestRegistrationEntry AS (
SELECT
drep_registration.voting_anchor_id AS voting_anchor_id,
deposit AS deposit
drep_registration.deposit AS deposit,
tx.hash as tx_hash
FROM
drep_registration
Expand Down Expand Up @@ -98,7 +98,7 @@ SELECT
CurrentMetadata.url,
CurrentMetadata.data_hash,
CurrentVotingPower.amount,
LatestRegistrationEntry.tx_hash
encode(LatestRegistrationEntry.tx_hash, 'hex') as tx_hash
FROM
IsRegisteredAsDRep
CROSS JOIN IsRegisteredAsSoleVoter
Expand All @@ -107,3 +107,4 @@ FROM
CROSS JOIN CurrentDeposit
CROSS JOIN CurrentMetadata
CROSS JOIN CurrentVotingPower
CROSS JOIN LatestRegistrationEntry

0 comments on commit 851201f

Please sign in to comment.