mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-12 09:13:23 +00:00
Two parallel gaps to the cashu work, surfaced once the cashu side was wired correctly: 1. The orange bolt highlight on the reaction row never lit up for onchain zaps. Note.isZappedBy checked LN zaps, NWC payments, and (since Phase 1) nutzaps — but never onchainZaps. And the fast-path gate in ObserveZapIconState shared the same blind spot. Add isOnchainZappedBy parallel to isNutzappedBy (same shape: any onchainZaps entry whose source.author matches the user and whose source event is newer than afterTimeInSeconds), and extend the gate with onchainZaps?.isNotEmpty(). 2. The reaction-row counter included CONFIRMED onchain amounts via updateZapTotal (verifiedSats only, per NIP-BC) but not the signed-in user's OWN pending/unverified outgoing zaps. That created a UX mismatch: the gallery shows the user's own UNVERIFIED entry with its claimed sat amount immediately (the user knows what they sent), but the counter stays at 0 until the chain catches up. Add Note.extraOwnPendingOnchainSats(loggedInPubKey) that sums claimedSats from non-CONFIRMED onchainZaps whose source.author matches the logged-in pubkey, and add it on top of zapsAmount in both AccountViewModel.calculateZapAmount paths and ObserveZapAmountText's no-zapPayments fast path. Other senders' non-confirmed entries still contribute 0, preserving the anti-spoof posture for incoming zaps.