Skip to content

Commit 36fd9bb

Browse files
committed
fix: fix ada holder voting power calculation
1 parent af1ca81 commit 36fd9bb

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ changes.
1616

1717
### Fixed
1818

19+
- Fix ada holder voting power calculation
1920
- Fix listing voted-on governance actions [Issue 2379](https://github.com/IntersectMBO/govtool/issues/2379)
2021
- Fix wronly displayed markdown on slider card [Issue 2263](https://github.com/IntersectMBO/govtool/issues/2316)
2122
- fix ada quantities format to avoid thousands when the total is 0 [Issue 2372](https://github.com/IntersectMBO/govtool/issues/2382)
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
SELECT COALESCE(SUM(utxo_view.value::numeric), 0) + COALESCE(reward_sum.total_reward, 0) AS total_value,
1+
SELECT COALESCE(SUM(utxo_view.value::numeric), 0),
22
encode(stake_address.hash_raw, 'hex')
33
FROM stake_address
44
JOIN utxo_view ON utxo_view.stake_address_id = stake_address.id
5-
LEFT JOIN (
6-
SELECT addr_id, SUM(reward_rest.amount) AS total_reward
7-
FROM reward_rest
8-
GROUP BY addr_id
9-
) AS reward_sum ON reward_sum.addr_id = stake_address.id
105
WHERE stake_address.hash_raw = decode(?, 'hex')
11-
GROUP BY stake_address.hash_raw, reward_sum.total_reward;
6+
GROUP BY stake_address.hash_raw;

0 commit comments

Comments
 (0)