aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/zaps.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-08-03 09:22:55 -0700
committerAdam Soltys <[email protected]>2026-08-03 09:22:55 -0700
commitc7ba5d5f0c8e80da1133fc6f53cc37bfedc281f2 (patch)
treed2eea5b1a931226cc384c581677fa3fbcdf2eb1d /src/features/zaps.js
parentb5b38eef005dab031d75804d96c8de2c1694764a (diff)
downloadcoinosv3-c7ba5d5f0c8e80da1133fc6f53cc37bfedc281f2.tar.gz
coinosv3-c7ba5d5f0c8e80da1133fc6f53cc37bfedc281f2.zip
Pay screens: bigger recipient chip, no loading-screen flashes
Resolving a recipient (ark advert → BIP-353 → lightning) no longer takes over the screen twice on the way: both steps keep the send form in place and report progress as one inline line, so picking someone goes straight to something actionable. The recipient chip on the zap card gets a large variant — a 30px avatar and full-size name, since it's who the money is going to. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Wvj4aoeMZwA7VUGdJP9Swi
Diffstat (limited to 'src/features/zaps.js')
-rw-r--r--src/features/zaps.js15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/features/zaps.js b/src/features/zaps.js
index 2b93a30..3298eaf 100644
--- a/src/features/zaps.js
+++ b/src/features/zaps.js
@@ -90,15 +90,19 @@ export function zapsFeature(ctx) {
const z = ui.zap;
if (!z) return null;
const back = () => { ui.zap = null; ui.sendError = ''; ui.send = blankSend(); render(); };
- if (z.status === 'resolving' || z.status === 'invoicing') {
+ // Resolution is a background step, not a screen: the send form stays put
+ // and shows one inline line (resolvingNote below) until we can render
+ // something the user can act on.
+ if (z.status === 'resolving') return null;
+ if (z.status === 'invoicing') {
return h('div', { class: 'card col', style: 'align-items:center;gap:14px;padding:32px 14px' },
h('span', { class: 'spinner' }),
- h('p', { class: 'muted', style: 'margin:0' }, z.status === 'invoicing' ? t('lnZapRequesting') : t('lnZapResolving')));
+ h('p', { class: 'muted', style: 'margin:0' }, t('lnZapRequesting')));
}
if (z.status === 'error') {
return h('div', { class: 'card col', style: 'gap:12px' },
h('h3', {}, '⚡ ' + t('lnZapTitle')),
- (z.target && z.target.pk && hook('profileChip', z.target.pk)) || h('div', { class: 'small muted', style: 'word-break:break-all' }, z.name || ''),
+ (z.target && z.target.pk && hook('profileChip', z.target.pk, 'lg')) || h('div', { class: 'small muted', style: 'word-break:break-all' }, z.name || ''),
h('div', { class: 'notice err' }, z.error || t('lnZapFailed')),
h('button', { class: 'btn-ghost btn-block', onClick: back }, t('back')));
}
@@ -115,13 +119,13 @@ export function zapsFeature(ctx) {
if (broke) {
return h('div', { class: 'card col', style: 'gap:12px' },
h('h3', {}, '⚡ ' + t('lnZapTitle')),
- (z.target && z.target.pk && hook('profileChip', z.target.pk)) || h('div', { class: 'small muted', style: 'word-break:break-all' }, z.name || z.address || ''),
+ (z.target && z.target.pk && hook('profileChip', z.target.pk, 'lg')) || h('div', { class: 'small muted', style: 'word-break:break-all' }, z.name || z.address || ''),
h('div', { class: 'notice info' }, t('zapNoBalance')),
h('button', { class: 'btn-ghost btn-block', onClick: back }, t('back')));
}
return h('div', { class: 'card col', style: 'gap:12px' },
h('h3', {}, '⚡ ' + t('lnZapTitle')),
- (z.target && z.target.pk && hook('profileChip', z.target.pk)) || h('div', { class: 'small muted', style: 'word-break:break-all' }, z.name || z.address || ''),
+ (z.target && z.target.pk && hook('profileChip', z.target.pk, 'lg')) || h('div', { class: 'small muted', style: 'word-break:break-all' }, z.name || z.address || ''),
h('div', { class: 'col gap6' },
h('div', { class: 'input-group' },
h('input', { type: 'number', min: '0', inputmode: 'decimal', placeholder: t('lnPayAmount'), value: z.amount,
@@ -182,6 +186,7 @@ export function zapsFeature(ctx) {
// True when an npub can be zapped over Lightning from this build/wallet —
// ark's "no Ark address" screen checks this before offering the fallback.
canLnZap() { return canPay() && !!wallet.nostrProfile; },
+ resolvingNote() { return ui.zap && ui.zap.status === 'resolving' ? t('lnZapResolving') : null; },
// Ark's "no Ark address published" screen offers a Lightning fallback,
// which lands here with the recipient's pubkey.
lnZapNpub(pk, npub) {