summaryrefslogtreecommitdiffstats
path: root/src/wallet.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-06-25 17:02:08 -0700
committerAdam Soltys <[email protected]>2026-06-25 17:02:08 -0700
commit6a94730d92b069344ded846acd8caad6689c2eb5 (patch)
tree2f5e8b01bcbc0c32917ed43c4fb70aa7af2b733f /src/wallet.js
parent181b1b8c680346e2be6dfa833dac3f23704b8d5e (diff)
downloadcoinosv3-6a94730d92b069344ded846acd8caad6689c2eb5.tar.gz
coinosv3-6a94730d92b069344ded846acd8caad6689c2eb5.zip
Celebrate a received payment once; don't re-show after refresh/reopen
Persist the receive-ack the moment the 'Payment received!' screen is shown (not only on tap), so refreshing or navigating away without tapping won't bring it back. It still stays visible in the current session until dismissed. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Diffstat (limited to 'src/wallet.js')
-rw-r--r--src/wallet.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wallet.js b/src/wallet.js
index 4e6a0d5..fb9e49e 100644
--- a/src/wallet.js
+++ b/src/wallet.js
@@ -1490,9 +1490,9 @@ export class Wallet {
return 'btc-wallet-cache:' + hex.encode(sha256(bytes)).slice(0, 32);
}
- // The fresh receive index the user has acknowledged (tapped past the
- // "payment received" screen for). Persisted so a received payment keeps
- // showing the celebration until acknowledged, even across refreshes.
+ // The fresh receive index the "payment received" screen has been shown for.
+ // Persisted (and advanced as soon as the celebration appears) so a payment
+ // celebrates once and never reappears on a refresh or reopen.
getReceiveAck() {
try {
const v = localStorage.getItem(this._cacheKey() + ':ack');