Feat/1478 better proposal title (#1544)
* chore: generate types * feat: add asset id to title * test: add test for new functionality
This commit is contained in:
parent
eb7b261ec4
commit
0a5a87f432
@ -153,6 +153,10 @@ export interface ProposalFields_terms_change_UpdateAsset {
|
|||||||
* The minimum economically meaningful amount of this specific asset
|
* The minimum economically meaningful amount of this specific asset
|
||||||
*/
|
*/
|
||||||
quantum: string;
|
quantum: string;
|
||||||
|
/**
|
||||||
|
* The asset to update
|
||||||
|
*/
|
||||||
|
assetId: string;
|
||||||
/**
|
/**
|
||||||
* The source of the updated asset
|
* The source of the updated asset
|
||||||
*/
|
*/
|
||||||
|
@ -241,6 +241,7 @@ describe('Proposal header', () => {
|
|||||||
terms: {
|
terms: {
|
||||||
change: {
|
change: {
|
||||||
__typename: 'UpdateAsset',
|
__typename: 'UpdateAsset',
|
||||||
|
assetId: 'foo',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@ -249,6 +250,7 @@ describe('Proposal header', () => {
|
|||||||
expect(screen.getByTestId('proposal-details')).toHaveTextContent(
|
expect(screen.getByTestId('proposal-details')).toHaveTextContent(
|
||||||
'Update asset'
|
'Update asset'
|
||||||
);
|
);
|
||||||
|
expect(screen.getByText('foo')).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Renders unknown proposal if it's a different proposal type", () => {
|
it("Renders unknown proposal if it's a different proposal type", () => {
|
||||||
|
@ -77,7 +77,12 @@ export const ProposalHeader = ({ proposal }: { proposal: ProposalFields }) => {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'UpdateAsset': {
|
case 'UpdateAsset': {
|
||||||
details = `${t('Update asset')}`;
|
details = (
|
||||||
|
<>
|
||||||
|
`${t('Update asset')}`;
|
||||||
|
<Lozenge>{change.assetId}</Lozenge>
|
||||||
|
</>
|
||||||
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -54,6 +54,7 @@ export const PROPOSAL_FRAGMENT = gql`
|
|||||||
}
|
}
|
||||||
... on UpdateAsset {
|
... on UpdateAsset {
|
||||||
quantum
|
quantum
|
||||||
|
assetId
|
||||||
source {
|
source {
|
||||||
... on UpdateERC20 {
|
... on UpdateERC20 {
|
||||||
lifetimeLimit
|
lifetimeLimit
|
||||||
|
@ -153,6 +153,10 @@ export interface Proposal_proposal_terms_change_UpdateAsset {
|
|||||||
* The minimum economically meaningful amount of this specific asset
|
* The minimum economically meaningful amount of this specific asset
|
||||||
*/
|
*/
|
||||||
quantum: string;
|
quantum: string;
|
||||||
|
/**
|
||||||
|
* The asset to update
|
||||||
|
*/
|
||||||
|
assetId: string;
|
||||||
/**
|
/**
|
||||||
* The source of the updated asset
|
* The source of the updated asset
|
||||||
*/
|
*/
|
||||||
|
@ -153,6 +153,10 @@ export interface Proposals_proposalsConnection_edges_node_terms_change_UpdateAss
|
|||||||
* The minimum economically meaningful amount of this specific asset
|
* The minimum economically meaningful amount of this specific asset
|
||||||
*/
|
*/
|
||||||
quantum: string;
|
quantum: string;
|
||||||
|
/**
|
||||||
|
* The asset to update
|
||||||
|
*/
|
||||||
|
assetId: string;
|
||||||
/**
|
/**
|
||||||
* The source of the updated asset
|
* The source of the updated asset
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user