lightning-browser-extension
lightning-browser-extension copied to clipboard
Delete payments when a publisher allowance is paid
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:
- Visit 'Websites'
- Delete an entry which has payments
- Open the popup
- 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