IntersectMBO / IntersectMBO/govtool

💡 Update Treasury Proposal Amount Field to Accept ADA Instead of Lovelace

Open
#4,000 0 comments 0 reactions 1 assignee Claimed by @MihajlovicMilos1995 View on GitHub
💡 Feature idea 📜 Proposal Pillar
Dominant language
HTML
Stars
21
Forks
29
Avg merge
2d 22h
Merged PRs (30d)
7

Description

### Area

Proposal Pillar

### Is there new design needed?

No

### What?

Adjust the "Amount" input field for Treasury-type proposals in the Proposal Discussion Forum so that it accepts values in **ADA**, not **Lovelace**.

### Why?

Currently, the placeholder suggests users should input values in ADA (e.g., "2000 ada"), but the backend processes the input directly as Lovelace. This leads to incorrect submission data where users intend to request thousands of ada, but actually submit requests for only a few ada.

### How?

- **Label Change**:
Update the field label from `Amount` to `Amount (in ada)` to remove ambiguity.

- **Placeholder Text**:
Keep or clarify the placeholder (e.g., `e.g. 2000`) to reinforce that the unit is ada.

- **Logic Adjustment**:
Update backend processing logic to interpret user input as ada and convert it to Lovelace by multiplying by 1,000,000 prior to submission/storage.

- **Validation**:
Add validation to prevent decimal precision beyond 6 digits (since Lovelace is the smallest unit).

### (Optional) User Story with acceptance criteria

- [ ] Users input amount in ada.
- [ ] Value is correctly converted to Lovelace before submission.
- [ ] Label and placeholder reflect ada input.
- [ ] Validation prevents submission of malformed or ambiguous values.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.