aboutsummaryrefslogtreecommitdiffstats
path: root/src/app.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-07-03 17:55:46 -0700
committerAdam Soltys <[email protected]>2026-07-03 17:55:46 -0700
commitea2c4683e71da6c050430fd0ea122821902282e0 (patch)
treedee90d01a2e0d2091f9b7d7868691bf76660c6ae /src/app.js
parent190c13a338462a7a76ee65e9486e42c0165a65f4 (diff)
downloadcoinosv3-ea2c4683e71da6c050430fd0ea122821902282e0.tar.gz
coinosv3-ea2c4683e71da6c050430fd0ea122821902282e0.zip
Ark: 'Payment received!' celebration for Ark receives
Same card and tap-to-acknowledge flow as on-chain receives; the ack persists in the ark state (shows exactly once) and a 2h recency guard keeps old payments from celebrating when a wallet is opened later. 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.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/app.js b/src/app.js
index 013ae4a..e4519e5 100644
--- a/src/app.js
+++ b/src/app.js
@@ -2779,6 +2779,25 @@ function hasRecentIncoming() {
// ---------------------------------------------------------------- Receive
function receiveTab() {
+ // An Ark payment landed — same celebration as an on-chain receive, dismissed
+ // with a tap (the ack persists in the ark state so it shows exactly once).
+ const arkUnseen = ark && ark.state ? ark.unseenReceives() : [];
+ if (arkUnseen.length) {
+ const amt = arkUnseen.reduce((n, m) => n + m.amountSat, 0);
+ return h(
+ 'div',
+ {
+ class: 'card col',
+ style: 'align-items:center;text-align:center;gap:14px;cursor:pointer;padding:48px 20px',
+ onClick: () => { ark.ackReceives(); render(); },
+ },
+ h('div', { class: 'check-badge' }, '✓'),
+ h('h2', { style: 'margin:0' }, t('paymentReceived')),
+ amt ? h('div', { class: 'amount-pos', style: 'font-size:18px' }, '+' + fmtAmount(amt) + ' ' + unitLabel()) : null,
+ h('div', { class: 'small muted' }, t('tapToProceed'))
+ );
+ }
+
// A payment landed on the shown address (the fresh index advanced past what
// the user last saw) — celebrate, and wait for a tap before showing the next.
// Until receiveSeenIndex has been baselined (post-scan, in enterWallet) it