aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/gifts.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-08 16:34:06 -0700
committerAdam Soltys <[email protected]>2026-10-08 16:34:06 -0700
commite35764950b59bde6e36bdfad1ca671eef564a6d1 (patch)
treea72a950e6e8ffd21312b6e2610ee7c73092026bc /src/features/gifts.js
parentd3a0af140dabdd6b53c1be0532b37f28254633be (diff)
downloadcoinosv3-e35764950b59bde6e36bdfad1ca671eef564a6d1.tar.gz
coinosv3-e35764950b59bde6e36bdfad1ca671eef564a6d1.zip
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 <[email protected]>
Diffstat (limited to 'src/features/gifts.js')
-rw-r--r--src/features/gifts.js2
1 files changed, 1 insertions, 1 deletions
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())