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
|
||||
*/
|
||||
quantum: string;
|
||||
/**
|
||||
* The asset to update
|
||||
*/
|
||||
assetId: string;
|
||||
/**
|
||||
* The source of the updated asset
|
||||
*/
|
||||
|
@ -241,6 +241,7 @@ describe('Proposal header', () => {
|
||||
terms: {
|
||||
change: {
|
||||
__typename: 'UpdateAsset',
|
||||
assetId: 'foo',
|
||||
},
|
||||
},
|
||||
})
|
||||
@ -249,6 +250,7 @@ describe('Proposal header', () => {
|
||||
expect(screen.getByTestId('proposal-details')).toHaveTextContent(
|
||||
'Update asset'
|
||||
);
|
||||
expect(screen.getByText('foo')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("Renders unknown proposal if it's a different proposal type", () => {
|
||||
|
@ -77,7 +77,12 @@ export const ProposalHeader = ({ proposal }: { proposal: ProposalFields }) => {
|
||||
break;
|
||||
}
|
||||
case 'UpdateAsset': {
|
||||
details = `${t('Update asset')}`;
|
||||
details = (
|
||||
<>
|
||||
`${t('Update asset')}`;
|
||||
<Lozenge>{change.assetId}</Lozenge>
|
||||
</>
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -54,6 +54,7 @@ export const PROPOSAL_FRAGMENT = gql`
|
||||
}
|
||||
... on UpdateAsset {
|
||||
quantum
|
||||
assetId
|
||||
source {
|
||||
... on UpdateERC20 {
|
||||
lifetimeLimit
|
||||
|
@ -153,6 +153,10 @@ export interface Proposal_proposal_terms_change_UpdateAsset {
|
||||
* The minimum economically meaningful amount of this specific asset
|
||||
*/
|
||||
quantum: string;
|
||||
/**
|
||||
* The asset to update
|
||||
*/
|
||||
assetId: string;
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
quantum: string;
|
||||
/**
|
||||
* The asset to update
|
||||
*/
|
||||
assetId: string;
|
||||
/**
|
||||
* The source of the updated asset
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user