diff --git a/packages/ui/src/app/pages/Proposals/ProposalPreview.stories.tsx b/packages/ui/src/app/pages/Proposals/ProposalPreview.stories.tsx index 1e9bf67846..088e7f98ab 100644 --- a/packages/ui/src/app/pages/Proposals/ProposalPreview.stories.tsx +++ b/packages/ui/src/app/pages/Proposals/ProposalPreview.stories.tsx @@ -153,7 +153,10 @@ export default { title: PROPOSAL_DATA.title, description: PROPOSAL_DATA.description, status, - type: args.type, + type: + args.type === 'FundingRequestMultipleRecipientsProposalDetails' + ? 'FundingRequestProposalDetails' + : args.type, creator: args.isProposer ? alice : bob, discussionThread: { @@ -228,6 +231,9 @@ export const FillWorkingGroupLeadOpening: Story = { export const FundingRequest: Story = { args: { type: 'FundingRequestProposalDetails' }, } +export const FundingRequestMultipleRecipients: Story = { + args: { type: 'FundingRequestMultipleRecipientsProposalDetails' }, +} export const RuntimeUpgrade: Story = { args: { type: 'RuntimeUpgradeProposalDetails', constitutionality: 2 }, parameters: { diff --git a/packages/ui/src/mocks/data/proposals.ts b/packages/ui/src/mocks/data/proposals.ts index 9c5bdd8f3e..f693b749e0 100644 --- a/packages/ui/src/mocks/data/proposals.ts +++ b/packages/ui/src/mocks/data/proposals.ts @@ -56,6 +56,17 @@ const proposalDetails = { destinations: [{ __typename: 'FundingRequestDestination', amount: joy(200), account: membership.rootAccount }], }, }, + FundingRequestMultipleRecipientsProposalDetails: { + destinationsList: { + __typename: 'FundingRequestDestinationsList', + destinations: [ + { __typename: 'FundingRequestDestination', amount: joy(200), account: membership.rootAccount }, + { __typename: 'FundingRequestDestination', amount: joy(20), account: member('alice').rootAccount }, + { __typename: 'FundingRequestDestination', amount: joy(1), account: member('bob').rootAccount }, + { __typename: 'FundingRequestDestination', amount: joy(500), account: member('charlie').rootAccount }, + ], + }, + }, RuntimeUpgradeProposalDetails: { newRuntimeBytecode: { __typename: 'RuntimeWasmBytecode', id: '0' } }, SetCouncilBudgetIncrementProposalDetails: { newAmount: joy(200) }, SetCouncilorRewardProposalDetails: { newRewardPerBlock: joy(200) }, diff --git a/packages/ui/src/mocks/helpers/proposalDetailsToConstantKey.ts b/packages/ui/src/mocks/helpers/proposalDetailsToConstantKey.ts index efbb50a7d7..18a24e6ecc 100644 --- a/packages/ui/src/mocks/helpers/proposalDetailsToConstantKey.ts +++ b/packages/ui/src/mocks/helpers/proposalDetailsToConstantKey.ts @@ -1,7 +1,9 @@ import { Api } from '@/api' import { ProposalFieldsFragment } from '@/proposals/queries' -export type ProposalDetailsType = ProposalFieldsFragment['details']['__typename'] +export type ProposalDetailsType = + | ProposalFieldsFragment['details']['__typename'] + | 'FundingRequestMultipleRecipientsProposalDetails' export const proposalDetailsToConstantKey = (details: ProposalDetailsType) => proposalDetailsToConstantKeyMap.get(details) as string @@ -13,6 +15,7 @@ const proposalDetailsToConstantKeyMap = new Map