diff --git a/src/components/ProposalForm.tsx b/src/components/ProposalForm.tsx index bac09f6..b0599e4 100644 --- a/src/components/ProposalForm.tsx +++ b/src/components/ProposalForm.tsx @@ -32,7 +32,12 @@ export type SelectorReturnType = ReturnType< export type ProposalDetail = | { msgType: "textProposal" } | { msgType: "coreEvalProposal"; evals: CoreEval[] } - | { msgType: "parameterChangeProposal"; changes: ParamChange[] }; + | { msgType: "parameterChangeProposal"; changes: ParamChange[] } + | { + msgType: "communityPoolSpendProposal"; + recipient: string; + amount: string; + }; interface ProposalFormProps { title: string; @@ -84,6 +89,10 @@ const ProposalForm = forwardRef( const changes = paramChangeRef.current?.getChanges(); if (!Array.isArray(changes)) throw new Error("No changes"); return handleSubmit({ ...args, msgType, changes }); + } else if (msgType === "communityPoolSpendProposal") { + const recipient = (formData.get("recipient") as string) || ""; + const amount = (formData.get("amount") as string) || ""; + return handleSubmit({ ...args, msgType, recipient, amount }); } } } @@ -113,7 +122,35 @@ const ProposalForm = forwardRef( + {msgType === "communityPoolSpendProposal" ? ( +
+ + + + +
+ ) : null} {msgType === "coreEvalProposal" ? (