getAlby / getAlby/jim

Daily wallet limit check is inefficient

Open
#10 0 comments 0 reactions 0 assignees View on GitHub
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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.