diff options
| author | Adam Soltys <[email protected]> | 2026-11-23 09:22:47 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-11-23 09:22:47 -0700 |
| commit | 2cd42f811d33a74c3ca28094176c009c0388da9b (patch) | |
| tree | b2b4127f00cbd7fef990596e7f92511dbf308380 /src/features/names.js | |
| parent | 7711115f1e2a7f8cd73017d548274d4fab9f3d86 (diff) | |
| download | coinosv3-2cd42f811d33a74c3ca28094176c009c0388da9b.tar.gz coinosv3-2cd42f811d33a74c3ca28094176c009c0388da9b.zip | |
A coinos name has a public pay page: v3.coinos.io/<name>/receive. "The old Coinos I could point this link onto my website give people the ability to Donate/Pay in Bitcoin and Lighting - https://coinos.io/JuryImagePro/receive - I'm not seeing an option to do this thru V3, am I missing something?" (JuryImagePro, relayed by Adam 2026-11-23). v3 had no page a visitor could pay a name from: tapping pay on a profile asks a visitor to sign in. /<name>/receive and /<name>/pay now open a small page of their own (dist/pay/index.html from src/pay-page.js, 39 KB, not the app): the name's face, a LNURL QR any Lightning wallet can pay with an amount picked there, the address to copy, and a form for a set amount and a note that makes an invoice (QR, copy, open in wallet). When coinos' node minted the invoice the page says Paid once it settles (LUD-21 verify, coinosv3-server e40c5eb); when the recipient's own wallet minted it, the page says to pay it from the wallet. ?amount= fills in the amount. Lightning only: a v3 name publishes no on-chain address. Receive → More options → Payment page shows the link with Copy and Open page. nginx on cs routes the two paths to the page; the service worker leaves them alone. New pay-page-test (set amount + note, Paid, no-verify invoice, minimum, unknown name) and names-pay-page-link-test pass; names-invoice-expiry, features-smoke and feature-registry-check pass.HEADmaster
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VMan6Upic5L6MMJzkTn8zg
Diffstat (limited to 'src/features/names.js')
| -rw-r--r-- | src/features/names.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/features/names.js b/src/features/names.js index e1f23ce..701b474 100644 --- a/src/features/names.js +++ b/src/features/names.js @@ -889,6 +889,23 @@ export function namesFeature(ctx) { h('p', { class: 'small muted', style: 'margin:0' }, t('namesZapCodeHow'))); } + // The public pay page (v3.coinos.io/<name>/receive, src/pay-page.js): the + // link a website puts behind its Donate button, as coinos.io/<name>/receive + // was on the old coinos. coinos.io names only: the page pays those. + function payPagePane() { + const st = load(); + const domain = st.domain || DOMAIN(); + if (!st.name || (domain !== 'coinos.io' && domain !== 'staging.coinos.io')) return h('div', { class: 'small muted' }, t('namesNeedArk')); + const host = domain === 'staging.coinos.io' ? location.origin : 'https://v3.coinos.io'; + const link = `${host}/${st.name}/receive`; + return h('div', { class: 'col', style: 'gap:10px;width:100%;align-items:center' }, + h('div', { class: 'addr-box break', style: 'width:100%' }, link), + h('div', { class: 'row gap6' }, + copyBtn(link, t('copy')), + h('button', { class: 'btn-ghost btn-sm', onClick: () => window.open(link, '_blank', 'noopener') }, t('namesPageOpen'))), + h('p', { class: 'small muted', style: 'margin:0' }, t('namesPageHow'))); + } + // ---- more options ------------------------------------------------------- // The address covers almost everyone; behind one link live the other codes // a payer might insist on. @@ -901,6 +918,7 @@ export function namesFeature(ctx) { h('strong', { class: 'small' }, label), h('span', { class: 'small muted' }, how)); return h('div', { class: 'list', style: 'width:100%' }, + opt('page', t('namesMorePage'), t('namesMorePageHow')), opt('bolt11', t('namesMoreBolt11'), t('namesMoreBolt11How')), opt('bolt12', t('namesMoreBolt12'), t('namesMoreBolt12How'), loadOffers), opt('ark', t('namesMoreArk'), t('namesMoreArkHow')), @@ -927,12 +945,14 @@ export function namesFeature(ctx) { ark: t('namesMoreArk'), clink: t('namesMoreClink'), ownnode: t('namesOwnNode'), + page: t('namesMorePage'), }; const body = ui.namesMore === 'bolt11' ? invoicePane() : ui.namesMore === 'bolt12' ? offerPane() : ui.namesMore === 'ark' ? arkPane() : ui.namesMore === 'clink' ? clinkPane() : ui.namesMore === 'ownnode' ? ownNodeSection() + : ui.namesMore === 'page' ? payPagePane() : menuPane(); return h('div', { class: 'col', style: 'gap:10px;width:100%' }, h('div', { class: 'row between', style: 'align-items:baseline' }, |
