getAlby / getAlby/lightning-browser-extension
Delete payments when a publisher allowance is paid
- Dominant language
- TypeScript
- Stars
- 585
- Forks
- 228
- Avg merge
- 6d 7h
- Merged PRs (30d)
- 16
Description
### Describe the bug
Deleting a publisher (i.e. nakaphoto) does not delete related payments.
Currently we only delete the `allowance` entry not the payments.
### Screenshots
- Delete the nakaphoto entry
- Payment still visible

### To Reproduce
Steps to reproduce the behavior:
1. Visit 'Websites'
1. Delete an entry which has payments
1. Open the popup
1. Related (outgoing) transactions are still visible
### Expected behavior
After deleting a publisher the related payments should be gone as well.
### Additional context
- Allowance delete is happening here:
https://github.com/getAlby/lightning-browser-extension/blob/master/src/extension/background-script/actions/allowances/delete.ts
- In case of getting an allowance we're adding related payments here:
https://github.com/getAlby/lightning-browser-extension/blob/master/src/extension/background-script/actions/allowances/getById.ts#L32-L36
- Getting all related payments and delete them:
https://dexie.org/docs/Collection/Collection.delete()
This issue is related to #1505
Contributor guide
Research direction
Start in src/extension/background-script/actions/allowances/delete.ts, then inspect how related payments are added in getById.ts around lines 32-36. Use the linked Dexie collection deletion documentation to trace the related-payment records. Done means deleting a publisher removes its allowance and related payments, so the transactions no longer appear in the popup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- database
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100