Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@BenGWeeks
Copy link
Contributor

Summary

Fixes #3432 - Adds a configurable threshold (in sats) for the "Balance Delta Changed" notification, so it only alerts when the balance delta changes by more than the specified amount.

Changes

  • Backend: Replace boolean notification_balance_delta_changed with integer notification_balance_delta_threshold_sats setting (default: 1)
  • Logic: Update check_balance_delta_changed() to check if delta change is >= threshold using absolute value
  • UI: Replace toggle with numeric input field (matches style of other notification thresholds)
  • Translations: Update description to explain threshold functionality and fix typo ("diference" → "difference")
  • Frontend: Rebuild bundle with updated translations

Benefits

  • Routing node operators can filter out notifications for small balance changes
  • Backwards compatible - default value of 1 maintains current behavior
  • Setting to 0 disables notifications entirely
  • Follows existing pattern used by other notification thresholds (Server Status, Incoming/Outgoing Payments)

Testing

  • All linters passed (make format)
  • Frontend bundle rebuilt (npm run bundle)
  • Container runs successfully
  • Manual testing with FakeWallet (draft status - needs real-world testing)

Screenshots

The Balance Delta notification now has a numeric input instead of a toggle, allowing users to specify the minimum change threshold in sats.

Notes

This is a draft PR pending manual testing with notifications configured. The implementation is complete and all automated checks pass.

🤖 Generated with Claude Code

BenGWeeks and others added 2 commits October 18, 2025 23:47
…ts#3432)

Replaces boolean toggle with numeric threshold input, allowing users to set a minimum change amount (in sats) before receiving balance delta notifications.

- Add notification_balance_delta_threshold_sats setting (default: 1 sat)
- Update check_balance_delta_changed() to use threshold comparison
- Replace toggle with numeric input in admin UI
- Update translations to reflect threshold behavior
- Fix typo: "diference" → "difference"

Benefits:
- Routing node operators can filter out small balance changes
- Setting to 0 disables notifications
- Default of 1 maintains backward compatibility

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@codecov
Copy link

codecov bot commented Oct 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.83%. Comparing base (55c5ab3) to head (e229002).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #3433      +/-   ##
==========================================
+ Coverage   55.81%   55.83%   +0.01%     
==========================================
  Files         116      116              
  Lines       15304    15305       +1     
==========================================
+ Hits         8542     8545       +3     
+ Misses       6762     6760       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature request] Add configurable threshold for balance delta notification

1 participant