Description
Users must mentally convert between XLM and USDC when entering payment amounts because the creation form only accepts a single denomination input with no switching mechanism. An inline denomination toggle on the amount input field should allow entry in either unit with real-time conversion.
Technical Context
src/components/invoice/AmountInput.tsx (new or refactored) renders a <input type="number"> paired with a toggle button that cycles between XLM and USDC. src/hooks/useFiatRate.ts supplies the XLM/USDC exchange rate. On toggle, the displayed value is converted and the underlying form state in src/hooks/useInvoiceForm.ts always stores the canonical amount in stroops. react-hook-form Controller wraps the component for validation integration.
Acceptance Criteria
Description
Users must mentally convert between XLM and USDC when entering payment amounts because the creation form only accepts a single denomination input with no switching mechanism. An inline denomination toggle on the amount input field should allow entry in either unit with real-time conversion.
Technical Context
src/components/invoice/AmountInput.tsx(new or refactored) renders a<input type="number">paired with a toggle button that cycles between XLM and USDC.src/hooks/useFiatRate.tssupplies the XLM/USDC exchange rate. On toggle, the displayed value is converted and the underlying form state insrc/hooks/useInvoiceForm.tsalways stores the canonical amount in stroops.react-hook-formControllerwraps the component for validation integration.Acceptance Criteria
aria-label