Skip to content
Merged

v2.0.33 #3991

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
ddf233e
Add Pinata ipfs upload API
mesudip Jul 25, 2025
01af374
Add dummy flow for saving metadata with govtool
mesudip Jul 25, 2025
7a33b9d
Update "govtool-pins-metadata" flow to match design
mesudip Jul 25, 2025
1405f09
removes higher environments limiting to dev only
aaboyle878 Jul 26, 2025
eebaba3
Merge pull request #3972 from IntersectMBO/chore/actions-revamp
aaboyle878 Jul 26, 2025
f072420
chore: update @intersect.mbo/govtool-outcomes-pillar-ui to v1.5.4
github-actions[bot] Jul 28, 2025
4dbb1a6
Merge pull request #3977 from IntersectMBO/chore/@intersect.mbo/govto…
bosko-m Jul 28, 2025
55223cb
chore: update @intersect.mbo/pdf-ui to 1.0.10-beta
github-actions[bot] Jul 29, 2025
5bac73a
Merge pull request #3982 from IntersectMBO/chore/@intersect.mbo/pdf-u…
bosko-m Jul 29, 2025
448b6b1
Update dataActionsBar.tsx - empty list of GAs on back after idle time
bosko-m Jul 29, 2025
a56f5a5
Update dataActionsBar.tsx - lint check fix
bosko-m Jul 29, 2025
5a02d62
Merge pull request #3983 from IntersectMBO/fix/3978-empty-list-upon-c…
bosko-m Jul 29, 2025
2e91244
Update useGetProposalsQuery.ts - 3978 - voterReady logic added
bosko-m Jul 29, 2025
5c8059e
update to corrects empty line linting error
aaboyle878 Jul 29, 2025
c7f5731
Merge pull request #3984 from IntersectMBO/fix/3978-empty-list-GAs-on…
bosko-m Jul 29, 2025
bcd8875
feat: Json response on errors in vva-be
mesudip Jul 29, 2025
53f2860
chore: update vote context store options card styles and texts
JosephRana11 Jul 28, 2025
7481c05
chore: update vote rationale pinned card styles and text
JosephRana11 Jul 28, 2025
9382b1e
chore: update vote context terms style
JosephRana11 Jul 28, 2025
ff6543d
fix: update vote context workflow
JosephRana11 Jul 29, 2025
618205f
feat: validate and render vote context
JosephRana11 Jul 29, 2025
1e88dc7
feat: Refactor vote flow to improve user experience
mesudip Jul 29, 2025
c6112f2
feat: add edit vote context
JosephRana11 Jul 29, 2025
982cdb2
Use single button to change vote or rationale
mesudip Jul 29, 2025
c87f7ec
Fix Voting Rationale Change detection
mesudip Jul 29, 2025
163b97d
fix: Frontend state management on already voted GA
mesudip Jul 30, 2025
bbec399
fix continue disabled issue on self store vote
JosephRana11 Jul 30, 2025
45f2a13
feat: add error text on ipfs file upload error on pin vote context
JosephRana11 Jul 30, 2025
85c0c76
fix: disable continue on api response error on file upload
JosephRana11 Jul 30, 2025
8ed023f
chore: fix es lint issues
JosephRana11 Jul 30, 2025
4ad9f76
fix: tsc lint error on voteContextModal
mesudip Jul 30, 2025
fb96724
Fix/Disapearing GA list after 5 minutes later back from details
mirekzielinski Jul 30, 2025
34db03f
Revert "update to corrects empty line linting error"
aaboyle878 Jul 30, 2025
464ba4c
Revert "Update useGetProposalsQuery.ts - 3978 - voterReady logic added"
aaboyle878 Jul 30, 2025
f4c9a68
Revert "Update dataActionsBar.tsx - lint check fix"
aaboyle878 Jul 30, 2025
b1f4fdd
Revert "Update dataActionsBar.tsx - empty list of GAs on back after i…
aaboyle878 Jul 30, 2025
36bbb3c
Merge pull request #3986 from IntersectMBO/searchWithoutWallet
bosko-m Jul 30, 2025
dd102c0
fix: handle empty rationale states for first and revote
JosephRana11 Jul 30, 2025
ed197ab
fix: add error text display for invalid vote context
JosephRana11 Jul 30, 2025
73da91e
Merge pull request #3961 from IntersectMBO/feat/govtool-saves-metadata
mesudip Jul 30, 2025
70b485b
chore: update @intersect.mbo/govtool-outcomes-pillar-ui to v1.5.5
github-actions[bot] Jul 30, 2025
f203b5c
Merge pull request #3987 from IntersectMBO/chore/@intersect.mbo/govto…
bosko-m Jul 30, 2025
6c64ca8
fix: handle ipfs link for vote context validation
JosephRana11 Jul 31, 2025
8c7e339
chore: fix haskell lint and formatting
mesudip Jul 31, 2025
e1560dd
Merge pull request #3988 from IntersectMBO/fix/invalid-ipfs-vote-cont…
mesudip Jul 31, 2025
e8aecf6
chore: update @intersect.mbo/pdf-ui to 1.0.11-beta
github-actions[bot] Jul 31, 2025
172cb93
Merge pull request #3990 from IntersectMBO/chore/@intersect.mbo/pdf-u…
bosko-m Jul 31, 2025
d896ece
updates to ignore root.json file and do clean install
aaboyle878 Jul 31, 2025
cf55ecc
Merge pull request #3989 from IntersectMBO/chore/haskell-linting-and-…
mesudip Jul 31, 2025
5973c3b
(fix#3954): Incorrect Display of New Committee Parameters in Governan…
Ciabas Jul 29, 2025
90ddbe5
Merge pull request #3981 from IntersectMBO/3954-incorrect-display-of-…
Ciabas Jul 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions .github/workflows/code_check_backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ jobs:
- name: Use Haskell
uses: haskell-actions/setup@v2
with:
ghc-version: '9.2.7'
cabal-version: '3.6.0.0'
ghc-version: '9.2.8'
cabal-version: '3.8.1.0'
cabal-update: false

- name: Use Python
uses: actions/setup-python@v2
Expand All @@ -26,6 +27,13 @@ jobs:

- name: Install HLint
run: |
rm -rf ~/.cabal ~/.ghcup
mkdir -p ~/.cabal
cat <<EOF > ~/.cabal/config
repository hackage.haskell.org
url: http://hackage.haskell.org/
secure: False
EOF
cabal update
cabal install hlint

Expand All @@ -41,8 +49,9 @@ jobs:
- name: Use Haskell
uses: haskell-actions/setup@v2
with:
ghc-version: '9.2.7'
cabal-version: '3.6.0.0'
ghc-version: '9.2.8'
cabal-version: '3.8.1.0'
cabal-update: false

- name: Use Python
uses: actions/setup-python@v2
Expand All @@ -54,6 +63,13 @@ jobs:

- name: Install HLint
run: |
rm -rf ~/.cabal ~/.ghcup
mkdir -p ~/.cabal
cat <<EOF > ~/.cabal/config
repository hackage.haskell.org
url: http://hackage.haskell.org/
secure: False
EOF
cabal update
cabal install stylish-haskell

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ permissions:
packages: write

env:
ENVIRONMENT: ${{ (github.ref_name == 'main' && 'prod-govtool') || (github.ref_name == 'staging' && 'pre-prod-govtool') || (github.ref_name == 'test' && 'qa-govtool') || (github.ref_name == 'develop' && 'dev-govtool') }}
ENVIRONMENT: ${{ (github.ref_name == 'develop' && 'dev-govtool') }}

jobs:
check-build-deploy:
environment: ${{ (github.ref_name == 'main' && 'prod-govtool') || (github.ref_name == 'staging' && 'pre-prod-govtool') || (github.ref_name == 'test' && 'qa-govtool') || (github.ref_name == 'develop' && 'dev-govtool') }}
environment: ${{ (github.ref_name == 'develop' && 'dev-govtool') }}
strategy:
fail-fast: false
matrix:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ changes.
### Fixed

- Fix disappearing proposals in the governance actions list for the same tx hashes [Issue 3918](https://github.com/IntersectMBO/govtool/issues/3918)
- Fix incorrect display of new committee parameters in Governance Action details [Issue 3954](https://github.com/IntersectMBO/govtool/issues/3954)

### Changed

Expand Down
20 changes: 14 additions & 6 deletions govtool/backend/app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import Control.Monad.Trans.Except
import Control.Monad.Trans.Reader

import Data.Aeson hiding (Error)
import Data.Aeson (encode)
import qualified Data.ByteString as BS
import Data.ByteString.Char8 (unpack)
import qualified Data.Cache as Cache
Expand All @@ -35,7 +36,7 @@ import Data.Text.Encoding (encodeUtf8)
import qualified Data.Text.IO as Text
import qualified Data.Text.Lazy as LazyText
import qualified Data.Text.Lazy.Encoding as LazyText

import qualified Data.ByteString.Lazy.Char8 as BS8
import Database.PostgreSQL.Simple (close, connectPostgreSQL, Connection)

import Network.Wai
Expand All @@ -62,8 +63,10 @@ import VVA.API.Types
import VVA.CommandLine
import VVA.Config
import VVA.Types (AppEnv (..),
AppError (CriticalError, InternalError, NotFoundError, ValidationError),
AppError (..),
CacheEnv (..))
import VVA.Ipfs (IpfsError(..))


-- Function to create a connection pool with optimized settings
createOptimizedConnectionPool :: BS.ByteString -> IO (Pool Connection)
Expand Down Expand Up @@ -288,10 +291,15 @@ liftServer appEnv =
where
handleErrors :: Either AppError a -> Handler a
handleErrors (Right x) = pure x
handleErrors (Left (ValidationError msg)) = throwError $ err400 { errBody = BS.fromStrict $ encodeUtf8 msg }
handleErrors (Left (NotFoundError msg)) = throwError $ err404 { errBody = BS.fromStrict $ encodeUtf8 msg }
handleErrors (Left (CriticalError msg)) = throwError $ err500 { errBody = BS.fromStrict $ encodeUtf8 msg }
handleErrors (Left (InternalError msg)) = throwError $ err500 { errBody = BS.fromStrict $ encodeUtf8 msg }
handleErrors (Left appError) = do
let status = case appError of
ValidationError _ -> err400
NotFoundError _ -> err404
CriticalError _ -> err500
InternalError _ -> err500
AppIpfsError (OtherIpfsError _) -> err400
AppIpfsError _ -> err503
throwError $ status { errBody = encode appError, errHeaders = [("Content-Type", "application/json")] }
-- * Swagger

type SwaggerAPI = SwaggerSchemaUI "swagger-ui" "swagger.json"
Expand Down
1 change: 1 addition & 0 deletions govtool/backend/example-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"password" : "postgres",
"port" : 5432
},
"pinataapijwt": "",
"port" : 9999,
"host" : "localhost",
"cachedurationseconds": 20,
Expand Down
66 changes: 59 additions & 7 deletions govtool/backend/sql/list-proposals.sql
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,21 @@ CommitteeData AS (
FROM
committee_member cm
JOIN committee_hash ch ON cm.committee_hash_id = ch.id
WHERE EXISTS (
SELECT 1
FROM committee_registration cr
WHERE cr.cold_key_id = ch.id
)
AND NOT EXISTS (
SELECT 1
FROM committee_de_registration cdr
WHERE cdr.cold_key_id = ch.id
AND cdr.tx_id > (
SELECT MAX(cr2.tx_id)
FROM committee_registration cr2
WHERE cr2.cold_key_id = ch.id
)
)
ORDER BY
ch.raw, cm.expiration_epoch DESC
),
Expand All @@ -61,10 +76,31 @@ ParsedDescription AS (
MembersToBeRemoved AS (
SELECT
id,
json_agg(VALUE->>'keyHash') AS members_to_be_removed
json_agg(
json_build_object(
'hash', COALESCE(
VALUE->>'keyHash',
VALUE->>'scriptHash'
),
'type', CASE
WHEN VALUE->>'keyHash' IS NOT NULL THEN 'keyHash'
WHEN VALUE->>'scriptHash' IS NOT NULL THEN 'scriptHash'
ELSE 'unknown'
END,
'hasScript', CASE
WHEN VALUE->>'scriptHash' IS NOT NULL THEN true
ELSE false
END
)
) AS members_to_be_removed
FROM
ParsedDescription pd,
json_array_elements(members_to_be_removed::json) AS value
json_array_elements(
CASE
WHEN pd.members_to_be_removed IS NULL THEN '[]'::json
ELSE pd.members_to_be_removed::json
END
) AS value
GROUP BY
id
),
Expand All @@ -73,7 +109,15 @@ ProcessedCurrentMembers AS (
pd.id,
json_agg(
json_build_object(
'hash', regexp_replace(kv.key, '^keyHash-', ''),
'hash', COALESCE(
regexp_replace(kv.key, '^keyHash-', ''),
regexp_replace(kv.key, '^scriptHash-', '')
),
'type', CASE
WHEN kv.key LIKE 'keyHash-%' THEN 'keyHash'
WHEN kv.key LIKE 'scriptHash-%' THEN 'scriptHash'
ELSE 'unknown'
END,
'newExpirationEpoch', kv.value::int
)
) AS current_members
Expand All @@ -88,9 +132,17 @@ EnrichedCurrentMembers AS (
pcm.id,
json_agg(
json_build_object(
'hash', cm.hash,
'hash', CASE
WHEN (member->>'hash') LIKE 'scriptHash-%' THEN
regexp_replace(member->>'hash', '^scriptHash-', '')
WHEN (member->>'hash') LIKE 'keyHash-%' THEN
regexp_replace(member->>'hash', '^keyHash-', '')
ELSE
member->>'hash'
END,
'type', member->>'type',
'expirationEpoch', cm.expiration_epoch,
'hasScript', cm.has_script,
'hasScript', COALESCE(cm.has_script, member->>'type' = 'scriptHash'),
'newExpirationEpoch', (member->>'newExpirationEpoch')::int
)
) AS enriched_members
Expand Down Expand Up @@ -247,9 +299,9 @@ SELECT
)
FROM
ParsedDescription pd
JOIN
LEFT JOIN
MembersToBeRemoved mtr ON pd.id = mtr.id
JOIN
LEFT JOIN
EnrichedCurrentMembers em ON pd.id = em.id
WHERE
pd.id = gov_action_proposal.id
Expand Down
Loading
Loading