aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-08-17 23:33:40 -0700
committerAdam Soltys <[email protected]>2026-08-17 23:33:40 -0700
commit25092528c9df614db749b6d8403561fc348c8a7f (patch)
treebb703dc1acab1260e2f9f361a342753f9ac1b47a /src
parent8dc9498eb83f503edb6bdc18f7f640b80ad80153 (diff)
downloadcoinosv3-25092528c9df614db749b6d8403561fc348c8a7f.tar.gz
coinosv3-25092528c9df614db749b6d8403561fc348c8a7f.zip
Old money stops surprising: a payment confirmed more than fifteen minutes ago is news, not an event — the celebration is reserved for arrivals you could actually be waiting on
Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JtaatFfAbx91Nh3xqKVqKz
Diffstat (limited to 'src')
-rw-r--r--src/app.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/app.js b/src/app.js
index 577f7b2..063da05 100644
--- a/src/app.js
+++ b/src/app.js
@@ -3223,8 +3223,13 @@ function tabContent() {
// within the last couple hours. This is a hard guard so an old payment can never
// trigger the celebration on import, regardless of receive-index bookkeeping.
function hasRecentIncoming() {
+ // "Recent" means "plausibly the payment you're watching for right now".
+ // The open-time baseline can't cover a payment the socket only DISCOVERS
+ // seconds after it was taken — with a 2h window, money that landed a while
+ // ago celebrated on open as if it had just arrived. A payment confirmed
+ // more than 15 minutes ago is news, not an event.
const now = Date.now() / 1000;
- return wallet.txs.some((tx) => tx.net > 0 && (!tx.confirmed || (tx.blockTime && now - tx.blockTime < 2 * 3600)));
+ return wallet.txs.some((tx) => tx.net > 0 && (!tx.confirmed || (tx.blockTime && now - tx.blockTime < 900)));
}
// ---------------------------------------------------------------- Receive