lightning-browser-extension
lightning-browser-extension copied to clipboard
Namespace and type extension "utils" calls
Is your feature request related to a problem?
We currently use normal string to call actions within the extension i.e.:
await utils.call("editAccount", {
name,
id,
});
- https://github.com/getAlby/lightning-browser-extension/blob/master/src/app/screens/Accounts/index.tsx#L43
- https://github.com/getAlby/lightning-browser-extension/blob/master/src/common/lib/utils.ts#L13
- https://github.com/getAlby/lightning-browser-extension/blob/master/src/types.ts#L102
Describe the solution you'd like
- Instead of just use strings try to use types
- Instead of just writing
editAccountnamespace these types, i.e.account/add
Describe alternatives you've considered
none
Additional context
We should do this for all bigger action-groups
- [ ] account
- [ ] allowance
- [ ] blocklist
- [ ] think about ho to namespace non-groped actions if needed
Are you working on this?
No