Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Disable 'Create Invoice' button until an amount is entered #2833

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

AdarshRawat1
Copy link
Contributor

Describe the changes you have made in this PR

The button is now disabled until the user enters a value in the 'Amount' field. This ensures that the user cannot create an invoice without specifying the amount first.

This change helps to prevent invalid or incomplete invoice creation.

Link this PR to an issue [optional]

Fixes #2802

Type of change

  • feat: New feature (non-breaking change which adds functionality)

Screenshots of the changes [optional]

Current - ( Button is active by default )

2023-10-29.14-13-40.mp4

After PR -( Button is disabled by default and enabled when user enters a value )

2023-10-29.14-07-53.mp4

Checklist

  • Self-review of changed code
  • Manual testing
  • Added automated tests where applicable
  • Update Docs & Guides
  • For UI-related changes
  • Darkmode
  • Responsive layout

Fixes : getAlby#2802

The button is now disabled until the user enters a value in the 'Amount' field. This ensures that the user cannot create an invoice without specifying the amount first.

This change helps to prevent invalid or incomplete invoice creation.
@reneaaron reneaaron enabled auto-merge (squash) February 29, 2024 12:00
@reneaaron
Copy link
Contributor

So we make 0-amount invoices unusable for all connectors that support that currently for the sake of disabling a button?

I like the approach suggested here with the 0-amount invoice being shown by default on the receive screen (if there is no lightning address and the connector supports it) but until we have that I would prefer to keep this feature in there.

@reneaaron reneaaron marked this pull request as draft March 13, 2024 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Create invoice button should be disabled until user add a value in the amount field
5 participants