aboutsummaryrefslogtreecommitdiffstats
path: root/tools/amount-field-unit-test.js
Commit message (Collapse)AuthorAgeFilesLines
* A scanned bitcoin: request with an amount switches the form to BTC. "I ↵Adam Soltys14 days1-1/+14
| | | | | | | scanned a BIP21 on-chain Bitcoin payment request with an amount encoded in it, and it filled in the amount. I guess I had CAD, Canadian dollars, selected as my unit, so it filled it in as that. It should always switch over to BTC as the units if I'm scanning a BIP21 URL like that from a QR code" (Adam, 2026-11-22). The request's amount is written in BTC; the scan turned it into sats when the unit was sats and otherwise put the BTC figure in the box as it was, so with dollars selected 0.0005 BTC read as 0.0005 CAD. A bitcoin: request that carries an amount, scanned or handed over by the Android app, now sets the unit to BTC (kept, as a tap on the unit is; anything typed for other recipients is converted as that tap converts it) and fills the amount from the exact sats. A request with no amount leaves the unit alone. amount-field-unit-test scans a 0.0005 BTC request with CAD selected (unit becomes BTC, the box parses to 50,000 sats) and one with no amount (unit unchanged); features-smoke passes. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6Upic5L6MMJzkTn8zg
* Switching the unit with an amount typed into the send form converts it: the ↵Adam Soltys2026-10-231-1/+15
| | | | | | | same money in the new unit, round-tripping exactly Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01QjVvE4YAcK3AGwV7kZXeN4
* Max in fiat sends every sat: the figure a Max fill wrote is remembered with ↵Adam Soltys2026-10-081-2/+3
| | | | | | its exact sats, so the cent-rounded amount no longer parses back a few sats short and strands them. Anything typed parses as typed Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Max fills the amount in the unit the field shows: in fiat that's money ↵Adam Soltys2026-10-081-0/+50
floored to the cent (so it never parses back above the maximum), not a BTC figure under a CAD label. One ctx.amountField helper for the ark send/LN Max, the gift Max and fixed-amount zap/BOLT 12 fills Co-Authored-By: Claude Opus 5.5 <[email protected]>