From d39aa82e0e97f1f3373980cb28f04e0415965723 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 4 Jul 2026 07:08:42 -0700 Subject: Ark: hide fee-rate, coin control, Max, and add-recipient for Ark sends An arkoor send has no mining fee and no coin selection, so pasting an Ark address now shows just the amount field plus a hint line; the irrelevant on-chain controls stay hidden. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01QFAcD4V284DvYZZHP7Rxxy --- src/app.js | 10 ++++++---- src/i18n.js | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/app.js b/src/app.js index 2e54284..5115c9a 100644 --- a/src/app.js +++ b/src/app.js @@ -3378,7 +3378,7 @@ function recipientRow(s, r, i) { }, }), h('button', { type: 'button', title: t('switchUnit'), onClick: toggleUnit }, unitLabel()), - single && h('button', { type: 'button', class: s.max ? 'btn-primary' : '', onClick: () => { s.max = !s.max; render(); } }, t('max')) + single && !isArkAddress(r.address) && h('button', { type: 'button', class: s.max ? 'btn-primary' : '', onClick: () => { s.max = !s.max; render(); } }, t('max')) ) : null ); syncCheck(); @@ -3390,6 +3390,7 @@ function sendForm() { // Progressive disclosure: until the destination is a valid on-chain/SP address, // show only the destination input (a Lightning invoice auto-advances instead). const ready = destReady((s.recipients[0] || {}).address); + const arkDest = s.recipients.length === 1 && isArkAddress((s.recipients[0] || {}).address); const feeOpts = [ ['economyFee', t('feeEconomy')], ['halfHourFee', t('feeNormal')], @@ -3406,13 +3407,14 @@ function sendForm() { h('div', { class: 'col', style: 'gap:14px' }, s.recipients.map((r, i) => recipientRow(s, r, i)) ), - ready && s.recipients.length < 10 && + ready && !arkDest && s.recipients.length < 10 && h('button', { type: 'button', class: 'linklike small mt8', onClick: () => { s.recipients.push({ address: '', amount: '' }); s.max = false; render(); }, }, t('addRecipient')) ), - ready && h( + ready && arkDest && h('div', { class: 'small faint' }, t('arkSendHint')), + ready && !arkDest && h( 'div', { class: 'field' }, h('span', { class: 'lab' }, t('feeRate')), @@ -3440,7 +3442,7 @@ function sendForm() { s.feeChoice !== 'custom' && h('div', { class: 'small faint mt8' }, t('selectedRate', { n: currentFeeRate() })) ), - ready ? coinControl() : null, + ready && !arkDest ? coinControl() : null, ui.sendError && h('div', { class: 'notice err' }, ui.sendError), ready && h('button', { class: 'btn-primary btn-block', onClick: reviewSend }, t('reviewTx')), h('button', { class: 'linklike small', style: 'align-self:center;margin-top:2px', onClick: () => { ui.giftMode = true; ui.sendError = ''; render(); } }, '🎁 ' + t('giftLink')) diff --git a/src/i18n.js b/src/i18n.js index 7380661..5371e5c 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -371,6 +371,7 @@ const STR = { arkRefreshBtn: 'Refresh / consolidate {n} coin(s)', arkRefreshStarted: 'Refresh submitted — completes with the next round.', arkSendTitle: 'Send over Ark', + arkSendHint: 'Ark address — sent instantly off-chain, no mining fee.', arkPayTo: 'To', arkNoFee: 'none — instant off-chain send', arkSendBtn: 'Send', -- cgit v1.2.3