aboutsummaryrefslogtreecommitdiffstats
path: root/src/features
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-08-18 00:06:05 -0700
committerAdam Soltys <[email protected]>2026-08-18 00:06:05 -0700
commitdfb37ac34f5b5aa567fd818784042b3d317e03f5 (patch)
treea68865b1ee94e2f2f2b545a99b6c3c3d8e34d1b6 /src/features
parent017fa4ea4484f9eee988f1f73ed982ec34519748 (diff)
downloadcoinosv3-dfb37ac34f5b5aa567fd818784042b3d317e03f5.tar.gz
coinosv3-dfb37ac34f5b5aa567fd818784042b3d317e03f5.zip
The ark send review joins the boarding party: an amount Spending can't cover swaps Send for the board door instead of walking into the insufficient-balance wall
Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JtaatFfAbx91Nh3xqKVqKz
Diffstat (limited to 'src/features')
-rw-r--r--src/features/ark.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/features/ark.js b/src/features/ark.js
index 11ebc5c..8ca63bd 100644
--- a/src/features/ark.js
+++ b/src/features/ark.js
@@ -429,11 +429,21 @@ export function arkFeature(ctx) {
row(t('arkPayTo'), shortAddr(a.address, 14)),
row(t('networkFee'), t('arkNoFee')),
ui.sendError ? h('div', { class: 'notice err' }, ui.sendError) : null,
+ // An amount Spending can't cover isn't a dead end while Savings can:
+ // the Send button becomes the door to the board panel, prefilled with
+ // what this payment needs — instead of letting the send run into an
+ // "insufficient ark balance" wall.
h('div', { class: 'row gap6' },
h('button', { class: 'btn-ghost', onClick: () => { ui.arkSend = null; ui.sendError = ''; render(); } }, t('back')),
ui.busy
? h('button', { class: 'btn-primary grow', disabled: true }, h('span', { class: 'spinner' }))
- : h('button', { class: 'btn-primary grow', onClick: doArkSend }, t('arkSendBtn'))
+ : a.amountSat > (arkBalance()?.spendableSat || 0) && wallet.spendable > 0 && !wallet.watchOnly
+ ? h('button', { class: 'btn-primary grow', onClick: () => {
+ const need = a.amountSat;
+ ui.arkSend = null; ui.sendError = '';
+ ctx.hook('arkOfferBoard', need);
+ } }, t('zapBoardBtn'))
+ : h('button', { class: 'btn-primary grow', onClick: doArkSend }, t('arkSendBtn'))
)
);
}