diff options
| author | Adam Soltys <[email protected]> | 2026-09-02 08:49:40 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-09-02 08:49:40 -0700 |
| commit | 363b7ea56e408bcf81f233f0693f47be52b68de9 (patch) | |
| tree | 37949cf01f4d906efb39101cf631f8dcf05c7f97 /src/features/zaps.js | |
| parent | acd6ca748f1fc4b31648fb999e2f9342cbf5c8a1 (diff) | |
| download | coinosv3-363b7ea56e408bcf81f233f0693f47be52b68de9.tar.gz coinosv3-363b7ea56e408bcf81f233f0693f47be52b68de9.zip | |
Max reaches every Lightning amount form: amountless bolt11s, ark zaps, and lightning-address zaps all fill spendable-minus-estimated-fees (sum over the 24-input cap, schedule fee plus the routing reserve, real quote confirms at pay time) — emptying Spending over Lightning stops being arithmetic homework
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MrkLsNScXe9b6BviUSdmMr
Diffstat (limited to 'src/features/zaps.js')
| -rw-r--r-- | src/features/zaps.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/features/zaps.js b/src/features/zaps.js index 0938d3d..29f2aa8 100644 --- a/src/features/zaps.js +++ b/src/features/zaps.js @@ -264,6 +264,13 @@ export function zapsFeature(ctx) { h('input', { type: 'number', min: '0', inputmode: 'decimal', placeholder: t('lnPayAmount'), value: z.amount, disabled: !!p.fixedSat, onInput: (e) => { z.amount = e.target.value; render(); } }), + !p.fixedSat && (hook('lnMaxSendSat') || 0) > 0 + ? h('button', { type: 'button', onClick: () => { + const sat = hook('lnMaxSendSat'); + z.amount = getUnit() === 'sats' ? String(sat) : (sat / 1e8).toFixed(8); + render(); + } }, t('max')) + : null, h('div', { style: 'display:flex;align-items:center' }, unitTag())), broke ? h('div', { class: 'notice info' }, t('zapNoBalance')) |
