diff options
| author | Adam Soltys <[email protected]> | 2026-07-04 07:08:42 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-07-04 07:08:42 -0700 |
| commit | d39aa82e0e97f1f3373980cb28f04e0415965723 (patch) | |
| tree | 1c9fc1d30b6c19530c47e0153c6fc90b16518487 /src/app.js | |
| parent | 035e81375784b766027b403e4f2685105c4b2150 (diff) | |
| download | coinosv3-d39aa82e0e97f1f3373980cb28f04e0415965723.tar.gz coinosv3-d39aa82e0e97f1f3373980cb28f04e0415965723.zip | |
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 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QFAcD4V284DvYZZHP7Rxxy
Diffstat (limited to 'src/app.js')
| -rw-r--r-- | src/app.js | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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')) |
