Daily wallet limit check is inefficient
- Dominant language
- TypeScript
- Stars
- 8
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
The daily wallet limit check does an API request to fetch ALL the apps to figure out if it has hit the limit for the number of wallets that can be created per day.
https://github.com/getAlby/jim/blob/master/app/actions.ts#L41-L62
This could be instead changed to use the local DB instead. In the schema sadly it's not storing dates for each connection secret https://github.com/getAlby/jim/blob/master/prisma/schema.prisma
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in app/actions.ts around lines 41-62 to understand the current daily wallet limit check, then inspect prisma/schema.prisma for the connection-secret data model. Determine how the local database can support the daily count, including the missing date information. Done means the limit check no longer fetches all apps through the API and still enforces the daily wallet limit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend, database
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100