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

fix: bail validation and refactor create button labels #500

Merged
merged 3 commits into from
Mar 19, 2024

Conversation

dni
Copy link
Contributor

@dni dni commented Mar 11, 2024

  • button label is now way easier to work with
  • validation only happens if there is a amount set at all

@dni dni requested a review from kilrau March 11, 2024 13:19
Copy link

vercel bot commented Mar 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
webapp ✅ Ready (Inspect) Visit Preview Mar 19, 2024 9:44pm
webapp-mainnet ✅ Ready (Inspect) Visit Preview Mar 19, 2024 9:44pm

Copy link
Member

@michael1011 michael1011 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no tests

src/components/CreateButton.tsx Show resolved Hide resolved
src/components/CreateButton.tsx Show resolved Hide resolved
@dni
Copy link
Contributor Author

dni commented Mar 13, 2024

closes #443

@dni
Copy link
Contributor Author

dni commented Mar 13, 2024

closes #353

Copy link
Member

@kilrau kilrau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#443 seems to be fixed, couldn't get web app to resolve my lightning address with invalid/empty amounts

#353 for empty amounts the "Please provide a valid LN invoice, LNAddress or LNURL" should be shown too if I enter sth invalid:
image
Same for Normal Swaps with empty amounts, it should show "Invalid BTC address"
image

Copy link
Member

@kilrau kilrau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor things left:

  • you are still showing red if the address input field is empty. Please show grey in case it's empty. Shouldn't have an error state if I'm just done punching in amounts
    image

Copy link
Member

@kilrau kilrau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

dni added 3 commits March 19, 2024 22:43
- button label is now way easier to work with
- validation only happens if there is a amount set at all

invalid invoice label
add invalid address label check
fixup issue with webln on 0 amount
remove sat amount from placeholder

prettier
@michael1011 michael1011 merged commit 9bef8c2 into main Mar 19, 2024
4 checks passed
@michael1011 michael1011 deleted the bail-validation branch March 19, 2024 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants