getAlby / getAlby/ZapPlanner

Automatically set a budget when configuring connection

Open
#60 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
18
Forks
9
PR merge metrics
No merged PRs in 30d

Description

Based on the interval a user picks, pass budget info to NWC when creating the connection. That way, the user does not need to set it up. Use the delay in milliseconds to figure out which interval makes sense (daily, weekly, monthly, yearly) and set the correct amount of sats to be exactly needed.

Also, make it impossible to create subscriptions with an interval more than 1 year (there is no point in this).

The change needs to be made here: https://github.com/getAlby/ZapPlanner/blob/main/app/confirm/components/ConfirmSubscriptionForm.tsx#L60

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at app/confirm/components/ConfirmSubscriptionForm.tsx around line 60 and trace how the connection is created and how the selected delay is represented. Determine the daily, weekly, monthly, and yearly budget values in sats, pass the matching budget to NWC, and reject intervals longer than one year; verify both behaviors with the project's existing checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, payments
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 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.