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', () => {
|
||||
const name = getProposalName({
|
||||
...proposal,
|
||||
rationale: {
|
||||
...proposal.rationale,
|
||||
hash: '0x0',
|
||||
},
|
||||
id: 'test-id',
|
||||
terms: {
|
||||
...proposal.terms,
|
||||
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", () => {
|
||||
|
@ -12,7 +12,7 @@ export function getProposalName(proposal: Proposals_proposals) {
|
||||
} else if (change.__typename === 'UpdateNetworkParameter') {
|
||||
return `Update Network: ${change.networkParameter.key}`;
|
||||
} else if (change.__typename === 'NewFreeform') {
|
||||
return `Freeform: ${proposal.rationale.hash}`;
|
||||
return `Freeform: ${proposal.id}`;
|
||||
}
|
||||
|
||||
return 'Unknown Proposal';
|
||||
|
@ -9,29 +9,6 @@ import { ProposalState, ProposalRejectionReason, VoteValue } from "@vegaprotocol
|
||||
// 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 {
|
||||
__typename: "Party";
|
||||
/**
|
||||
@ -282,10 +259,6 @@ export interface ProposalFields {
|
||||
* Error details of the rejectionReason
|
||||
*/
|
||||
errorDetails: string | null;
|
||||
/**
|
||||
* Rationale behind the proposal
|
||||
*/
|
||||
rationale: ProposalFields_rationale;
|
||||
/**
|
||||
* Party that prepared the proposal
|
||||
*/
|
||||
|
@ -8,11 +8,6 @@ export const PROPOSALS_FRAGMENT = gql`
|
||||
datetime
|
||||
rejectionReason
|
||||
errorDetails
|
||||
rationale {
|
||||
url
|
||||
description
|
||||
hash
|
||||
}
|
||||
party {
|
||||
id
|
||||
}
|
||||
|
@ -9,29 +9,6 @@ import { ProposalState, ProposalRejectionReason, VoteValue } from "@vegaprotocol
|
||||
// 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 {
|
||||
__typename: "Party";
|
||||
/**
|
||||
@ -282,10 +259,6 @@ export interface Proposal_proposal {
|
||||
* Error details of the rejectionReason
|
||||
*/
|
||||
errorDetails: string | null;
|
||||
/**
|
||||
* Rationale behind the proposal
|
||||
*/
|
||||
rationale: Proposal_proposal_rationale;
|
||||
/**
|
||||
* Party that prepared the proposal
|
||||
*/
|
||||
|
@ -9,29 +9,6 @@ import { ProposalState, ProposalRejectionReason, VoteValue } from "@vegaprotocol
|
||||
// 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 {
|
||||
__typename: "Party";
|
||||
/**
|
||||
@ -282,10 +259,6 @@ export interface Proposals_proposals {
|
||||
* Error details of the rejectionReason
|
||||
*/
|
||||
errorDetails: string | null;
|
||||
/**
|
||||
* Rationale behind the proposal
|
||||
*/
|
||||
rationale: Proposals_proposals_rationale;
|
||||
/**
|
||||
* Party that prepared the proposal
|
||||
*/
|
||||
|
@ -24,12 +24,6 @@ export function generateProposal(
|
||||
__typename: 'Party',
|
||||
id: faker.datatype.uuid(),
|
||||
},
|
||||
rationale: {
|
||||
__typename: 'ProposalRationale',
|
||||
hash: faker.datatype.uuid(),
|
||||
url: faker.internet.url(),
|
||||
description: faker.lorem.words(),
|
||||
},
|
||||
terms: {
|
||||
__typename: 'ProposalTerms',
|
||||
closingDatetime:
|
||||
|
Loading…
Reference in New Issue
Block a user