From e35764950b59bde6e36bdfad1ca671eef564a6d1 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 8 Oct 2026 16:34:06 -0700 Subject: Max fills the amount in the unit the field shows: in fiat that's money 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 --- src/features/gifts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/features/gifts.js') diff --git a/src/features/gifts.js b/src/features/gifts.js index 052a107..4d68a50 100644 --- a/src/features/gifts.js +++ b/src/features/gifts.js @@ -675,7 +675,7 @@ export function giftsFeature(ctx) { return h('div', { class: 'input-group' }, h('input', { type: 'number', step: getUnit() === 'sats' ? '1' : '0.00000001', min: '0', inputmode: 'decimal', placeholder: t('giftAmountLabel'), disabled: ui.giftMax, - value: ui.giftMax ? (getUnit() === 'sats' ? String(maxVal) : fmtBtc(maxVal)) : ui.giftAmount, + value: ui.giftMax ? ctx.amountField(maxVal) : ui.giftAmount, onInput: (e) => (ui.giftAmount = e.target.value) }), h('button', { type: 'button', class: ui.giftMax ? 'btn-primary' : '', onClick: () => { ui.giftMax = !ui.giftMax; ui.giftError = ''; render(); } }, t('max')), h('div', { style: 'display:flex;align-items:center' }, unitTag()) -- cgit v1.2.3