chore: remove rationale field from proposals query (#817)
This commit is contained in:
parent
2f0f1b8027
commit
9ae2d6a8fa
@ -75,10 +75,7 @@ it('Update network', () => {
|
|||||||
it('Freeform network', () => {
|
it('Freeform network', () => {
|
||||||
const name = getProposalName({
|
const name = getProposalName({
|
||||||
...proposal,
|
...proposal,
|
||||||
rationale: {
|
id: 'test-id',
|
||||||
...proposal.rationale,
|
|
||||||
hash: '0x0',
|
|
||||||
},
|
|
||||||
terms: {
|
terms: {
|
||||||
...proposal.terms,
|
...proposal.terms,
|
||||||
change: {
|
change: {
|
||||||
@ -86,7 +83,7 @@ it('Freeform network', () => {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
expect(name).toEqual('Freeform: 0x0');
|
expect(name).toEqual('Freeform: test-id');
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Renders unknown proposal if it's a different proposal type", () => {
|
it("Renders unknown proposal if it's a different proposal type", () => {
|
||||||
|
@ -12,7 +12,7 @@ export function getProposalName(proposal: Proposals_proposals) {
|
|||||||
} else if (change.__typename === 'UpdateNetworkParameter') {
|
} else if (change.__typename === 'UpdateNetworkParameter') {
|
||||||
return `Update Network: ${change.networkParameter.key}`;
|
return `Update Network: ${change.networkParameter.key}`;
|
||||||
} else if (change.__typename === 'NewFreeform') {
|
} else if (change.__typename === 'NewFreeform') {
|
||||||
return `Freeform: ${proposal.rationale.hash}`;
|
return `Freeform: ${proposal.id}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 'Unknown Proposal';
|
return 'Unknown Proposal';
|
||||||
|
@ -9,29 +9,6 @@ import { ProposalState, ProposalRejectionReason, VoteValue } from "@vegaprotocol
|
|||||||
// GraphQL fragment: ProposalFields
|
// GraphQL fragment: ProposalFields
|
||||||
// ====================================================
|
// ====================================================
|
||||||
|
|
||||||
export interface ProposalFields_rationale {
|
|
||||||
__typename: "ProposalRationale";
|
|
||||||
/**
|
|
||||||
* Link to a text file describing the proposal in depth.
|
|
||||||
* Optional except for FreeFrom proposal where it's mandatory.
|
|
||||||
* If set, the `url` property must be set.
|
|
||||||
*/
|
|
||||||
url: string | null;
|
|
||||||
/**
|
|
||||||
* Description to show a short title / something in case the link goes offline.
|
|
||||||
* This is to be between 0 and 1024 unicode characters.
|
|
||||||
* This is mandatory for all proposal.
|
|
||||||
*/
|
|
||||||
description: string;
|
|
||||||
/**
|
|
||||||
* Cryptographically secure hash (SHA3-512) of the text pointed by the `url` property
|
|
||||||
* so that viewers can check that the text hasn't been changed over time.
|
|
||||||
* Optional except for FreeFrom proposal where it's mandatory.
|
|
||||||
* If set, the `url` property must be set.
|
|
||||||
*/
|
|
||||||
hash: string | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ProposalFields_party {
|
export interface ProposalFields_party {
|
||||||
__typename: "Party";
|
__typename: "Party";
|
||||||
/**
|
/**
|
||||||
@ -282,10 +259,6 @@ export interface ProposalFields {
|
|||||||
* Error details of the rejectionReason
|
* Error details of the rejectionReason
|
||||||
*/
|
*/
|
||||||
errorDetails: string | null;
|
errorDetails: string | null;
|
||||||
/**
|
|
||||||
* Rationale behind the proposal
|
|
||||||
*/
|
|
||||||
rationale: ProposalFields_rationale;
|
|
||||||
/**
|
/**
|
||||||
* Party that prepared the proposal
|
* Party that prepared the proposal
|
||||||
*/
|
*/
|
||||||
|
@ -8,11 +8,6 @@ export const PROPOSALS_FRAGMENT = gql`
|
|||||||
datetime
|
datetime
|
||||||
rejectionReason
|
rejectionReason
|
||||||
errorDetails
|
errorDetails
|
||||||
rationale {
|
|
||||||
url
|
|
||||||
description
|
|
||||||
hash
|
|
||||||
}
|
|
||||||
party {
|
party {
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
|
@ -9,29 +9,6 @@ import { ProposalState, ProposalRejectionReason, VoteValue } from "@vegaprotocol
|
|||||||
// GraphQL query operation: Proposal
|
// GraphQL query operation: Proposal
|
||||||
// ====================================================
|
// ====================================================
|
||||||
|
|
||||||
export interface Proposal_proposal_rationale {
|
|
||||||
__typename: "ProposalRationale";
|
|
||||||
/**
|
|
||||||
* Link to a text file describing the proposal in depth.
|
|
||||||
* Optional except for FreeFrom proposal where it's mandatory.
|
|
||||||
* If set, the `url` property must be set.
|
|
||||||
*/
|
|
||||||
url: string | null;
|
|
||||||
/**
|
|
||||||
* Description to show a short title / something in case the link goes offline.
|
|
||||||
* This is to be between 0 and 1024 unicode characters.
|
|
||||||
* This is mandatory for all proposal.
|
|
||||||
*/
|
|
||||||
description: string;
|
|
||||||
/**
|
|
||||||
* Cryptographically secure hash (SHA3-512) of the text pointed by the `url` property
|
|
||||||
* so that viewers can check that the text hasn't been changed over time.
|
|
||||||
* Optional except for FreeFrom proposal where it's mandatory.
|
|
||||||
* If set, the `url` property must be set.
|
|
||||||
*/
|
|
||||||
hash: string | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Proposal_proposal_party {
|
export interface Proposal_proposal_party {
|
||||||
__typename: "Party";
|
__typename: "Party";
|
||||||
/**
|
/**
|
||||||
@ -282,10 +259,6 @@ export interface Proposal_proposal {
|
|||||||
* Error details of the rejectionReason
|
* Error details of the rejectionReason
|
||||||
*/
|
*/
|
||||||
errorDetails: string | null;
|
errorDetails: string | null;
|
||||||
/**
|
|
||||||
* Rationale behind the proposal
|
|
||||||
*/
|
|
||||||
rationale: Proposal_proposal_rationale;
|
|
||||||
/**
|
/**
|
||||||
* Party that prepared the proposal
|
* Party that prepared the proposal
|
||||||
*/
|
*/
|
||||||
|
@ -9,29 +9,6 @@ import { ProposalState, ProposalRejectionReason, VoteValue } from "@vegaprotocol
|
|||||||
// GraphQL query operation: Proposals
|
// GraphQL query operation: Proposals
|
||||||
// ====================================================
|
// ====================================================
|
||||||
|
|
||||||
export interface Proposals_proposals_rationale {
|
|
||||||
__typename: "ProposalRationale";
|
|
||||||
/**
|
|
||||||
* Link to a text file describing the proposal in depth.
|
|
||||||
* Optional except for FreeFrom proposal where it's mandatory.
|
|
||||||
* If set, the `url` property must be set.
|
|
||||||
*/
|
|
||||||
url: string | null;
|
|
||||||
/**
|
|
||||||
* Description to show a short title / something in case the link goes offline.
|
|
||||||
* This is to be between 0 and 1024 unicode characters.
|
|
||||||
* This is mandatory for all proposal.
|
|
||||||
*/
|
|
||||||
description: string;
|
|
||||||
/**
|
|
||||||
* Cryptographically secure hash (SHA3-512) of the text pointed by the `url` property
|
|
||||||
* so that viewers can check that the text hasn't been changed over time.
|
|
||||||
* Optional except for FreeFrom proposal where it's mandatory.
|
|
||||||
* If set, the `url` property must be set.
|
|
||||||
*/
|
|
||||||
hash: string | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Proposals_proposals_party {
|
export interface Proposals_proposals_party {
|
||||||
__typename: "Party";
|
__typename: "Party";
|
||||||
/**
|
/**
|
||||||
@ -282,10 +259,6 @@ export interface Proposals_proposals {
|
|||||||
* Error details of the rejectionReason
|
* Error details of the rejectionReason
|
||||||
*/
|
*/
|
||||||
errorDetails: string | null;
|
errorDetails: string | null;
|
||||||
/**
|
|
||||||
* Rationale behind the proposal
|
|
||||||
*/
|
|
||||||
rationale: Proposals_proposals_rationale;
|
|
||||||
/**
|
/**
|
||||||
* Party that prepared the proposal
|
* Party that prepared the proposal
|
||||||
*/
|
*/
|
||||||
|
@ -24,12 +24,6 @@ export function generateProposal(
|
|||||||
__typename: 'Party',
|
__typename: 'Party',
|
||||||
id: faker.datatype.uuid(),
|
id: faker.datatype.uuid(),
|
||||||
},
|
},
|
||||||
rationale: {
|
|
||||||
__typename: 'ProposalRationale',
|
|
||||||
hash: faker.datatype.uuid(),
|
|
||||||
url: faker.internet.url(),
|
|
||||||
description: faker.lorem.words(),
|
|
||||||
},
|
|
||||||
terms: {
|
terms: {
|
||||||
__typename: 'ProposalTerms',
|
__typename: 'ProposalTerms',
|
||||||
closingDatetime:
|
closingDatetime:
|
||||||
|
Loading…
Reference in New Issue
Block a user