From a056ea615498ee62e4180c1e09b3ce0a5a03de0f Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 28 Aug 2026 20:40:36 -0700 Subject: Max learns the ark rail: an ark address gets its own Max button filling the whole spendable Spending balance — free sends mean the maximum really is the balance MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_019eA8JRq9Wr7z2fRQk99HLi --- src/app.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/app.js') diff --git a/src/app.js b/src/app.js index a8cde9e..77f0c01 100644 --- a/src/app.js +++ b/src/app.js @@ -3857,7 +3857,15 @@ function recipientRow(s, r, i) { }, }), h('button', { type: 'button', title: t('switchUnit'), onClick: toggleUnit }, unitLabel()), - single && !featureHook('hideSendControls', r.address) && h('button', { type: 'button', class: s.max ? 'btn-primary' : '', onClick: () => { s.max = !s.max; render(); } }, t('max')) + single && !featureHook('hideSendControls', r.address) && h('button', { type: 'button', class: s.max ? 'btn-primary' : '', onClick: () => { s.max = !s.max; render(); } }, t('max')), + // features that hide the fee controls (ark) can still offer their own + // Max — it fills the amount with that rail's spendable balance + single && featureHook('hideSendControls', r.address) + ? (() => { + const v = featureHook('sendMaxFill', r.address); + return v != null ? h('button', { type: 'button', onClick: () => { r.amount = v; s.max = false; render(); } }, t('max')) : null; + })() + : null ) : null ); syncCheck(); -- cgit v1.2.3