Skip to content

Commit

Permalink
Merge pull request #1938 from IntersectMBO/staging
Browse files Browse the repository at this point in the history
GovTool 1.0.16-staging
  • Loading branch information
bosko-m authored Sep 4, 2024
2 parents 7879f8a + 741252d commit dc49cd8
Show file tree
Hide file tree
Showing 20 changed files with 997 additions and 5,660 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,22 @@ changes.

-

## [sancho-v1.0.16](https://github.com/IntersectMBO/govtool/releases/tag/sancho-v1.0.16) 2024-09-04

### Fixed

- Fix incorrect documentation link for "Learn More" button on proposal [Issue 1877](https://github.com/IntersectMBO/govtool/issues/1877)
- Fix getVotes sql to query time from vote tx instead of govAaction tx [Issue 1925](https://github.com/IntersectMBO/govtool/issues/1925)
- Map references from validation service to format expected by FE [Issue 1924](https://github.com/IntersectMBO/govtool/issues/1924)

### Changed

- Change the spelling of ADA to Ada or ada [Issue 1916](https://github.com/IntersectMBO/govtool/issues/1916)

### Removed

-

## [sancho-v1.0.15](https://github.com/IntersectMBO/govtool/releases/tag/sancho-v1.0.15) 2024-09-03

### Added
Expand Down
2 changes: 1 addition & 1 deletion govtool/backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ FROM $BASE_IMAGE_REPO:$BASE_IMAGE_TAG
WORKDIR /src
COPY . .
RUN cabal build
RUN cp dist-newstyle/build/x86_64-linux/ghc-9.2.7/vva-be-1.0.15/x/vva-be/build/vva-be/vva-be /usr/local/bin
RUN cp dist-newstyle/build/x86_64-linux/ghc-9.2.7/vva-be-1.0.16/x/vva-be/build/vva-be/vva-be /usr/local/bin
2 changes: 1 addition & 1 deletion govtool/backend/Dockerfile.qovery
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM $BASE_IMAGE_REPO:$BASE_IMAGE_TAG
WORKDIR /src
COPY . .
RUN cabal build
RUN cp dist-newstyle/build/x86_64-linux/ghc-9.2.7/vva-be-1.0.15/x/vva-be/build/vva-be/vva-be /usr/local/bin
RUN cp dist-newstyle/build/x86_64-linux/ghc-9.2.7/vva-be-1.0.16/x/vva-be/build/vva-be/vva-be /usr/local/bin

# Expose the necessary port
EXPOSE 9876
Expand Down
2 changes: 1 addition & 1 deletion govtool/backend/sql/get-votes.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ on gov_action_tx.id = gov_action_proposal.tx_id
join tx as vote_tx
on vote_tx.id = voting_procedure.tx_id
join block
on block.id = gov_action_tx.block_id
on block.id = vote_tx.block_id
where drep_hash.raw = decode(?, 'hex')
order by voting_procedure.gov_action_proposal_id, voting_procedure.drep_voter, voting_procedure.id desc
2 changes: 1 addition & 1 deletion govtool/backend/vva-be.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 3.6
name: vva-be
version: 1.0.15
version: 1.0.16

-- A short (one-line) description of the package.
-- synopsis:
Expand Down
4 changes: 2 additions & 2 deletions govtool/frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions govtool/frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@govtool/frontend",
"private": true,
"version": "1.0.15",
"version": "1.0.16",
"type": "module",
"scripts": {
"build": "vite build",
Expand Down Expand Up @@ -109,5 +109,5 @@
"typescript": "^5.0.2"
},
"readme": "ERROR: No README data found!",
"_id": "[email protected].15"
"_id": "[email protected].16"
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe("VotingPowerChips", () => {
expect(screen.getByRole("progressbar")).toBeInTheDocument();
});

it("displays formatted ADA amount when data is available and not loading", () => {
it("displays formatted Ada amount when data is available and not loading", () => {
mockUseScreenDimension.mockReturnValue({
isMobile: false,
screenWidth: 1024,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const ProposeGovActionDashboardCard = ({
dataTestId: "propose-gov-action-learn-more-button",
onClick: () =>
openInNewTab(
"https://docs.gov.tools/using-govtool/govtool-functions/governance-actions/view-governance-actions/propose-a-governance-action",
"https://docs.gov.tools/using-govtool/govtool-functions/governance-actions/propose-a-governance-action",
),
},
]}
Expand Down
2 changes: 1 addition & 1 deletion govtool/frontend/src/context/getUtxos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const getUtxos = async (

const txindx = input.index();
const output = utxo.output();
const amount = output.amount().coin().to_str(); // ADA amount in lovelace
const amount = output.amount().coin().to_str(); // Ada amount in lovelace
const multiasset = output.amount().multiasset();
let multiAssetStr = "";

Expand Down
2 changes: 1 addition & 1 deletion govtool/frontend/src/context/wallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ const CardanoProvider = (props: Props) => {
walletState.changeAddress,
);

// Add output of 1 ADA to the address of our wallet
// Add output of 1 ada to the address of our wallet
let outputValue = BigNum.from_str("1000000");

if (
Expand Down
18 changes: 9 additions & 9 deletions govtool/frontend/src/i18n/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const en = {
metadataUpdateInProgress:
"The update DRep metadata is ongoing. This may take several minutes.",
notRegisteredDescription:
"Accept delegated voting power from other ADA holders, and combine it with your own voting power. Vote with the accumulated Power on Governance Actions.",
"Accept delegated voting power from other Ada holders, and combine it with your own voting power. Vote with the accumulated Power on Governance Actions.",
notRegisteredTitle: "Become a DRep",
notRegisteredWasRegisteredDescriptionWithGivenName:
"You are now retired and your listing in the DRep directory as <strong>{{givenName}}</strong> has been marked as <strong><i>retired</i></strong>. You cannot vote on Governance Actions as <strong>{{givenName}}</strong>.\n\nYou can always re-register as a DRep, in which case you will have the same DRep ID as you had initially.",
Expand All @@ -85,9 +85,9 @@ export const en = {
reRegister: "Re-register as a DRep",
retire: "Retire as a DRep",
retirementInProgress:
"You are being retired. You will receive a refund of <strong>{{deposit}} ADA</strong> when the transaction completes.",
"You are being retired. You will receive a refund of <strong>{{deposit}} ada</strong> when the transaction completes.",
retirementInProgressWithGivenName:
"You are being retired as <strong>{{givenName}}</strong>. You will receive a refund of <strong>{{deposit}} ADA</strong> when the transaction completes.",
"You are being retired as <strong>{{givenName}}</strong>. You will receive a refund of <strong>{{deposit}} ada</strong> when the transaction completes.",
viewDetails: "View your DRep details",
youAreRegistered: "You are Registered as a DRep",
yourDRepId: "Your DRep ID",
Expand Down Expand Up @@ -294,7 +294,7 @@ export const en = {
checkIsWalletConnected: "Check if the wallet is connected.",
dRepIdNotFound: "DrepId not found",
insufficientBalanceDescription:
"To submit a Governance Action, you will be required to post a refundable balance of ₳{{ada}}. You do not currently have enough ADA in your wallet to continue.",
"To submit a Governance Action, you will be required to post a refundable balance of ₳{{ada}}. You do not currently have enough ada in your wallet to continue.",
insufficientBalanceTitle: "Insufficient Balance",
invalidGovernanceActionType: "Invalid Governance Action Type",
invalidTreasuryGovernanceActionType: "Invalid Treasury Governance Action",
Expand Down Expand Up @@ -526,7 +526,7 @@ export const en = {
hero: {
connectWallet: "Connect your wallet to start",
description:
"Cardano Governance lets ADA holders have a say in the network's future.\n\nYou can vote directly, find someone to represent you, or become a representative for others.\n\nYou can also propose changes in the network yourself, put these up for discussion and eventually, a vote.\n\n<0>Learn more about governance</0> in the guide, or have a look around the app and see Cardano Governance in action.",
"Cardano Governance lets Ada holders have a say in the network's future.\n\nYou can vote directly, find someone to represent you, or become a representative for others.\n\nYou can also propose changes in the network yourself, put these up for discussion and eventually, a vote.\n\n<0>Learn more about governance</0> in the guide, or have a look around the app and see Cardano Governance in action.",
headline: "Cardano \n Governance Tool",
},
home: {
Expand All @@ -549,7 +549,7 @@ export const en = {
},
registerAsDRep: {
description:
"Accept delegated voting power from other ADA holders, and combine it with your own voting power. Vote with the accumulated Power on Governance Actions.",
"Accept delegated voting power from other Ada holders, and combine it with your own voting power. Vote with the accumulated Power on Governance Actions.",
firstButtonLabel: "Connect to Register",
title: "Become a DRep",
},
Expand Down Expand Up @@ -723,7 +723,7 @@ export const en = {
retireAsDrep: "Retire as a Drep",
whatRetirementMeansTitle: "What Retirement Means",
whatRetirementMeansDescription:
"By retiring you are giving up your voting rights. Voting Power that is delegated to you will remain in place.\n\nADA Holders that have delegated to be able to see that you are retired in the DRep directory. They will be able to re-delegate their Voting Power to another DRep.\n\nYou can still participate in Governance by proposing Governance Actions, by delegating your personal Voting Power to another DRep, or by coming out of retirement, and assuming your previous role as a DRep.\n\nIf you come out of retirement, your DRep ID will be the same as it was before retirement, and your Voting Power will consist of your own ADA balance and what delegated power that remains associated\nto your DRep ID.",
"By retiring you are giving up your voting rights. Voting Power that is delegated to you will remain in place.\n\nADA Holders that have delegated to be able to see that you are retired in the DRep directory. They will be able to re-delegate their Voting Power to another DRep.\n\nYou can still participate in Governance by proposing Governance Actions, by delegating your personal Voting Power to another DRep, or by coming out of retirement, and assuming your previous role as a DRep.\n\nIf you come out of retirement, your DRep ID will be the same as it was before retirement, and your Voting Power will consist of your own Ada balance and what delegated power that remains associated\nto your DRep ID.",
},
slider: {
showAll: "Show All",
Expand All @@ -742,10 +742,10 @@ export const en = {
"Looks like you cannot retire, because currently you are not a Direct Voter.",
},
registerDescription:
"A Direct Voter is someone that can vote on any Governance Action with their own Voting Power, which is equal to the balance of ADA in their connected wallet. <0>Learn More</0> about Direct Voter.\n\nBecoming a Direct Voter will require a refundable deposit of <strong>₳{{deposit}}</strong>.\n\nYour deposit will be refunded if you either retire or delegate your voting power to someone else (a DRep)",
"A Direct Voter is someone that can vote on any Governance Action with their own Voting Power, which is equal to the balance of Ada in their connected wallet. <0>Learn More</0> about Direct Voter.\n\nBecoming a Direct Voter will require a refundable deposit of <strong>₳{{deposit}}</strong>.\n\nYour deposit will be refunded if you either retire or delegate your voting power to someone else (a DRep)",
registerHeading: "What this Means",
retirementDescription:
"By Retiring you are giving up your Voting Power. You will not be able to vote on any Governance Actions. Your deposit of {{deposit}} ADA will be refunded.\n\nYou can at any time in the future re-register to become a Direct Voter, or you can delegate your Voting Power to someone else, or become a DRep.\n\nThese options are listed in our Guides here: <0>Voting options and Roles</0>",
"By Retiring you are giving up your Voting Power. You will not be able to vote on any Governance Actions. Your deposit of {{deposit}} ada will be refunded.\n\nYou can at any time in the future re-register to become a Direct Voter, or you can delegate your Voting Power to someone else, or become a DRep.\n\nThese options are listed in our Guides here: <0>Voting options and Roles</0>",
retirementHeading: "What Retirement Means",
retireDirectVoter: "Retire as a Direct Voter",
},
Expand Down
2 changes: 1 addition & 1 deletion govtool/frontend/src/models/metadataValidation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ export type ProposalMetadata = {
abstract?: string;
motivation?: string;
rationale?: string;
references?: string[];
references?: Reference[];
title?: string;
};
2 changes: 1 addition & 1 deletion govtool/frontend/src/utils/mapDtoToProposal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const mapDtoToProposal = async (
abstract: validationResponse.metadata?.abstract,
motivation: validationResponse.metadata?.motivation,
rationale: validationResponse.metadata?.rationale,
references: validationResponse.metadata?.references,
references: validationResponse.metadata?.references?.map(({ uri }) => uri),
metadataStatus: validationResponse.status || null,
metadataValid: validationResponse.valid,
};
Expand Down
2 changes: 1 addition & 1 deletion govtool/frontend/src/utils/tests/adaFormat.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ describe("correctAdaFormat", () => {
const LOVELACE = 1000000;
const DECIMALS = 6;

it("converts lovelace to ADA for a given number", () => {
it("converts lovelace to ada for a given number", () => {
const lovelace = 15000000;
const expectedAda = 15;
expect(correctAdaFormat(lovelace)).toBe(expectedAda);
Expand Down
Loading

0 comments on commit dc49cd8

Please sign in to comment.