diff --git a/govtool/backend/sql/get-network-metrics.sql b/govtool/backend/sql/get-network-metrics.sql index 73ddabc95..651f28a6d 100644 --- a/govtool/backend/sql/get-network-metrics.sql +++ b/govtool/backend/sql/get-network-metrics.sql @@ -22,21 +22,18 @@ CurrentEpoch AS ( SELECT MAX(no) AS no FROM epoch ), CommitteeMembers AS ( - SELECT DISTINCT ON (cm.committee_hash_id) - cr.id, - block.time, - encode(cold_key_hash.raw, 'hex') cold_key, - encode(hot_key_hash.raw, 'hex') hot_key - FROM committee_registration cr - JOIN tx ON tx.id = cr.tx_id - JOIN block ON block.id = tx.block_id - JOIN committee_hash cold_key_hash ON cr.cold_key_id = cold_key_hash.id - JOIN committee_hash hot_key_hash ON cr.hot_key_id = hot_key_hash.id - JOIN committee_member cm ON cm.committee_hash_id = cold_key_hash.id OR cm.committee_hash_id = hot_key_hash.id - LEFT JOIN committee_de_registration cdr ON cdr.cold_key_id = cold_key_hash.id - CROSS JOIN CurrentEpoch - WHERE - cdr.id IS NULL AND cm.expiration_epoch > CurrentEpoch.no + SELECT + DISTINCT cm.committee_hash_id AS committee_members + FROM committee_member cm + JOIN committee c ON c.id = cm.committee_id + LEFT JOIN gov_action_proposal gap ON gap.id = c.gov_action_proposal_id + CROSS JOIN CurrentEpoch ce + WHERE ( + (c.gov_action_proposal_id IS NULL) + OR + (gap.enacted_epoch IS NOT NULL AND gap.enacted_epoch <= ce.no) + ) + AND cm.expiration_epoch >= ce.no ), NoOfCommitteeMembers AS ( SELECT COUNT(*) total FROM CommitteeMembers diff --git a/govtool/frontend/package-lock.json b/govtool/frontend/package-lock.json index aa7470bca..4b6e6afcc 100644 --- a/govtool/frontend/package-lock.json +++ b/govtool/frontend/package-lock.json @@ -15,7 +15,7 @@ "@hookform/resolvers": "^3.3.1", "@intersect.mbo/govtool-outcomes-pillar-ui": "v1.5.9", "@intersect.mbo/intersectmbo.org-icons-set": "^1.0.8", - "@intersect.mbo/pdf-ui": "1.0.14-beta", + "@intersect.mbo/pdf-ui": "1.0.15-beta", "@mui/icons-material": "^5.14.3", "@mui/material": "^5.14.4", "@noble/ed25519": "^2.3.0", @@ -3426,9 +3426,9 @@ "license": "ISC" }, "node_modules/@intersect.mbo/pdf-ui": { - "version": "1.0.14-beta", - "resolved": "https://registry.npmjs.org/@intersect.mbo/pdf-ui/-/pdf-ui-1.0.14-beta.tgz", - "integrity": "sha512-d+soKsSE6xbNAmjqjZfs1HEsYLJeE9UTlM91kpMtujEeTTZDyg+EwbyjZ5a1ZpRZCD0D7j6tg69muSHxrz6BLg==", + "version": "1.0.15-beta", + "resolved": "https://registry.npmjs.org/@intersect.mbo/pdf-ui/-/pdf-ui-1.0.15-beta.tgz", + "integrity": "sha512-Yzve799kMvCA5/9k3yyUmOyOAkpQuro9wo7PiF3Ham9QYjTuygb9QXEbeyCM0d5ofTePmnMKEqiFZ4x9AmTuIg==", "dependencies": { "@emurgo/cardano-serialization-lib-asmjs": "^12.0.0-beta.2", "@fontsource/poppins": "^5.0.14", diff --git a/govtool/frontend/package.json b/govtool/frontend/package.json index 578e6c801..a23ab3685 100644 --- a/govtool/frontend/package.json +++ b/govtool/frontend/package.json @@ -29,7 +29,7 @@ "@hookform/resolvers": "^3.3.1", "@intersect.mbo/govtool-outcomes-pillar-ui": "v1.5.9", "@intersect.mbo/intersectmbo.org-icons-set": "^1.0.8", - "@intersect.mbo/pdf-ui": "1.0.14-beta", + "@intersect.mbo/pdf-ui": "1.0.15-beta", "@mui/icons-material": "^5.14.3", "@mui/material": "^5.14.4", "@noble/ed25519": "^2.3.0", diff --git a/govtool/frontend/src/components/molecules/DataActionsBar.tsx b/govtool/frontend/src/components/molecules/DataActionsBar.tsx index b6672a968..88790149d 100644 --- a/govtool/frontend/src/components/molecules/DataActionsBar.tsx +++ b/govtool/frontend/src/components/molecules/DataActionsBar.tsx @@ -74,14 +74,16 @@ export const DataActionsBar: FC = ({ setChosenFilters?.((prev) => (prev ?? []).filter((k) => k !== key)); return ( - + = ({ borderColor: "#6E87D9", borderRadius: 50, boxShadow: "2px 2px 20px 0 rgba(0,0,0,0.05)", - fontSize: 11, + fontSize: { xs: 16, sm: 11 }, fontWeight: 500, height: 48, padding: "16px 24px", @@ -133,6 +135,7 @@ export const DataActionsBar: FC = ({ flex: "0 0 auto", flexShrink: 0, mt: { xs: 1, sm: 0 }, + mr: { xs: 2, sm: 0 }, }} > { color="common.white" mb={0.5} > - {t("system.maintenanceEnding.description2")} + , + ]} + /> diff --git a/govtool/frontend/src/i18n/locales/en.json b/govtool/frontend/src/i18n/locales/en.json index b5240664c..4a5b42401 100644 --- a/govtool/frontend/src/i18n/locales/en.json +++ b/govtool/frontend/src/i18n/locales/en.json @@ -796,9 +796,9 @@ "title": "This tool is connected to {{networkName}}", "bootstrappingWarning": "Govtool is in the Bootstrapping phase. Some features are not available. Learn more", "maintenanceEnding": { - "title": "\uD83D\uDCA1 Next Step: Treasury Withdrawal based on your feedback is coming soon", + "title": "\uD83D\uDCA1 Next Step: Treasury Withdrawal based on your feedback has been submitted", "description1": "<0>The Info Action has passed — thank you for your support!", - "description2": "We’re now preparing a Treasury Withdrawal proposal that reflects the feedback gathered during the voting phase to ensure continued development and maintenance of GovTool as a community-owned governance interface on Cardano." + "description2": "We have now submitted a <0>Treasury Withdrawal that reflects the feedback gathered during the voting phase to ensure continued development and maintenance of GovTool as a community-owned governance interface on Cardano." } }, "tooltips": { diff --git a/govtool/frontend/src/pages/DRepDirectoryContent.tsx b/govtool/frontend/src/pages/DRepDirectoryContent.tsx index d66588127..e7559d247 100644 --- a/govtool/frontend/src/pages/DRepDirectoryContent.tsx +++ b/govtool/frontend/src/pages/DRepDirectoryContent.tsx @@ -69,7 +69,6 @@ export const DRepDirectoryContent: FC = ({ const [inProgressDelegationDRepData, setInProgressDelegationDRepData] = useState(undefined); - // Set initial filters and sort useEffect(() => { if (!lastPath.includes("drep_directory")) { setChosenFilters([DRepStatus.Active]); @@ -104,7 +103,7 @@ export const DRepDirectoryContent: FC = ({ baselineTotalForStatus, } = useGetDRepListPaginatedQuery( { - page: page - 1, // convert 1-based UI -> 0-based API + page: page - 1, pageSize, searchPhrase: debouncedSearchText, sorting: chosenSorting as DRepListSort, @@ -151,9 +150,28 @@ export const DRepDirectoryContent: FC = ({ currentDelegation?.dRepView === AutomatedVotingOptionCurrentDelegation.drep_always_no_confidence); + const scaleWrapSx = isConnected + ? ({ + width: "100%", + transform: { xs: "scale(0.9)", sm: "scale(0.9)", md: "none" }, + transformOrigin: { xs: "top center", sm: "top center", md: "initial" }, + ml: { xs: 0.25, sm: 0.25, md: 0 }, + } as const) + : ({ + width: "100%", + transform: { xs: "scale(0.9)", sm: "scale(0.9)", md: "none" }, + transformOrigin: { xs: "top left", sm: "top left", md: "initial" }, + ml: { xs: 0.25, sm: 0.25, md: 0 }, + } as const); + return ( - - {/* My delegation */} + {myDrep && !inProgressDelegation && currentDelegation && @@ -162,26 +180,34 @@ export const DRepDirectoryContent: FC = ({ - + + + + + )} + {inProgressDelegation && inProgressDelegation !== myDRepId && inProgressDelegationDRepData && ( - + + + + + )} - {/* Automated voting options */} {isConnected && (
@@ -216,7 +242,6 @@ export const DRepDirectoryContent: FC = ({
)} - {/* DRep list */} <> {t("dRepDirectory.listTitle")} @@ -263,41 +288,57 @@ export const DRepDirectoryContent: FC = ({ mt={showSearchSummary ? 0 : 4} p={0} sx={{ - opacity: isPrev ? 0.5 : 1, - transition: "opacity 0.2s", flex: 1, + width: "100%", + maxWidth: "100%", }} > {filteredDoNotListDReps?.length === 0 && } {filteredDoNotListDReps?.map((dRep) => ( - { - setInProgressDelegationDRepData(dRep); - delegate(dRep.drepId); - }} - /> + + + { + setInProgressDelegationDRepData(dRep); + delegate(dRep.drepId); + }} + /> + + ))}
- { - setPageSize(n); - setPage(1); + + > + { + setPageSize(n); + setPage(1); + }} + /> +
); diff --git a/govtool/frontend/src/utils/validateSignature.ts b/govtool/frontend/src/utils/validateSignature.ts index b39d274ea..cd6e7d2a8 100644 --- a/govtool/frontend/src/utils/validateSignature.ts +++ b/govtool/frontend/src/utils/validateSignature.ts @@ -24,11 +24,11 @@ export const validateSignature = async ({ switch (algorithm) { case "ed25519": case "Ed25519": { - return verifyEd25519Signature(signature, messageHash, publicKey); + return await verifyEd25519Signature(signature, messageHash, publicKey); } case "CIP-8": case "CIP-0008": { - return verifyCIP8Signature(signature, messageHash, publicKey); + return await verifyCIP8Signature(signature, messageHash, publicKey); } default: console.error("Unsupported algorithm:", algorithm);