-
Notifications
You must be signed in to change notification settings - Fork 13
show an error if ln invoice has no amount #137
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
Conversation
WalkthroughA validation was added to the recipient input logic in the Send form to check for the presence of a non-zero amount in pasted Lightning invoices. If the invoice lacks a defined amount or specifies zero, an error message is set and further processing is halted, preventing the user from continuing. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant SendForm
participant InvoiceParser
User->>SendForm: Paste Lightning invoice
SendForm->>InvoiceParser: Parse invoice
InvoiceParser-->>SendForm: Return satoshis amount
alt Amount undefined or zero
SendForm->>User: Display error "Invoice must have amount defined"
SendForm-->>User: Prevent continue
else Amount valid
SendForm->>User: Allow continue
end
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changesNo out-of-scope changes found. Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (3)📚 Learning: in src/lib/bolt11.ts, the code is copied from the original bitcoinjs/bolt11 library (https://github....Applied to files:
📚 Learning: in src/lib/asp.ts, only the collaborativeexit function should accept both iwallet and serviceworkerw...Applied to files:
📚 Learning: in src/screens/init/restore.tsx, the input component for private key restoration intentionally omits...Applied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (1)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Deploying wallet-for-riga with
|
| Latest commit: |
abfc20e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://eacf9c8f.wallet-23u.pages.dev |
| Branch Preview URL: | https://invoice-no-amount.wallet-23u.pages.dev |
Deploying arkade-wallet with
|
| Latest commit: |
abfc20e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c2be1115.arkade-wallet.pages.dev |
| Branch Preview URL: | https://invoice-no-amount.arkade-wallet.pages.dev |
closes #135
Summary by CodeRabbit