diff options
| author | Adam Soltys <[email protected]> | 2026-09-03 21:01:31 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-09-03 21:01:31 -0700 |
| commit | 560f0d954db17d10fe291e3b353085eaece4f07d (patch) | |
| tree | 8ed83f31132de96660f78fb5c7f8d66943eb02b5 /src | |
| parent | 642804dedf7c9d0e5bd7c1635fb23d2bac3cbb14 (diff) | |
| download | coinosv3-560f0d954db17d10fe291e3b353085eaece4f07d.tar.gz coinosv3-560f0d954db17d10fe291e3b353085eaece4f07d.zip | |
The rail glyph tells the truth on-chain: board, offboard (Moved to Savings) and exit each settle as a real bitcoin tx — txid, bc1q address, block explorer — so they wear the Bitcoin mark in the history row and detail header instead of the Ark logo; pure off-chain hops (receive/send/renew) keep the Ark mark, Lightning keeps its bolt
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MrkLsNScXe9b6BviUSdmMr
Diffstat (limited to 'src')
| -rw-r--r-- | src/features/ark.js | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/src/features/ark.js b/src/features/ark.js index e3b42e1..58af61c 100644 --- a/src/features/ark.js +++ b/src/features/ark.js @@ -19,11 +19,16 @@ import { import { t } from '../i18n.js'; import { resolveBip353, parsePaymentName, parseBip21 as parseBip21Uri } from '../bip353.js'; import { parseZapTarget, fetchPayParams, requestInvoice } from '../lnurl.js'; -import { shortAddr, shortTxid, timeAgo, ARK_ICON, ARK_MARK } from '../format.js'; +import { shortAddr, shortTxid, timeAgo, ARK_ICON, ARK_MARK, BITCOIN_ICON } from '../format.js'; // t?ark1… bech32m — an Ark address for this or another ASP. export function isArkAddress(a) { return /^t?ark1[a-z0-9]{20,}$/i.test((a || '').trim()); } +// Ark movement types that actually touch the chain — each is a real bitcoin +// tx with a txid, so it wears the Bitcoin mark, not the Ark one: board pulls +// coins in from on-chain, offboard and exit push them back out. +const ONCHAIN_ARK = new Set(['board', 'offboard', 'exit']); + // Wallet storage/key helpers for this feature, installed onto the core // wallet instance so a build without the feature ships none of it. export function installArkWallet(wallet) { @@ -1016,11 +1021,16 @@ export function arkFeature(ctx) { return h( 'div', { class: 'item', style: 'cursor:pointer', onClick: () => { ui.arkMoveDetail = m.id; render(); } }, - // Ark mark in the (direction-colored) circle carries the rail; the label - // + signed amount carry direction, so no redundant "Ark" text chip. + // The circle's glyph names the RAIL the money actually rode: ⚡ for + // Lightning, the Bitcoin mark for the on-chain movements (board pulls + // coins in from chain; offboard/exit push them back out — each is a + // real tx with a txid), and the Ark mark for pure off-chain hops. + // Direction is carried by the tint + signed amount, no text chip. m.type.startsWith('ln-') ? h('div', { class: `ico ${incoming ? 'in' : 'out'}` }, '⚡') - : h('div', { class: `ico ${incoming ? 'in' : 'out'}`, html: ARK_MARK(15) }), + : ONCHAIN_ARK.has(m.type) + ? h('div', { class: `ico ${incoming ? 'in' : 'out'}`, html: BITCOIN_ICON(20) }) + : h('div', { class: `ico ${incoming ? 'in' : 'out'}`, html: ARK_MARK(15) }), h('div', { class: 'grow' }, h('div', { class: 'row gap6', style: 'align-items:center' }, (() => { @@ -1131,8 +1141,11 @@ export function arkFeature(ctx) { { class: 'card col', style: 'gap:10px' }, h('div', { class: 'row gap6', style: 'align-items:center' }, // the rail the user chose is the one to show: a payment SENT over - // Lightning stays Lightning here, however it settled underneath - m.type.startsWith('ln-') ? h('span', { style: 'font-size:18px' }, '⚡') : h('span', { html: ARK_ICON(18) }), + // Lightning stays Lightning here, however it settled underneath; an + // on-chain move (board/offboard/exit) wears the Bitcoin mark + m.type.startsWith('ln-') ? h('span', { style: 'font-size:18px' }, '⚡') + : ONCHAIN_ARK.has(m.type) ? h('span', { html: BITCOIN_ICON(18) }) + : h('span', { html: ARK_ICON(18) }), h('h3', { style: 'margin:0' }, label), m.status !== 'complete' ? h('span', { class: 'tag pending' }, m.status) : null), m.type === 'refresh' |
