-
Notifications
You must be signed in to change notification settings - Fork 14
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: implemented network error handling for verify payment #153
Conversation
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@babel/[email protected], npm/@babel/[email protected], npm/@babel/[email protected], npm/@babel/[email protected], npm/@babel/[email protected], npm/@babel/[email protected], npm/[email protected] |
src/invoice.ts
Outdated
|
||
return json.settled; | ||
} catch (error) { | ||
console.error("A network error occurred"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.error("A network error occurred"); | |
console.error("failed to check LNURL-verify", error); |
This doesn't swallow the error (which is not necessarily a network error)
@Toheeb-Ojuolape thanks for the PR! Can you please undo the changes to the lock files, they should not be in here. |
Hi @rolznz . This is done! Thank you so much for reviewing my PR |
Hi @rolznz I think I see the issue. When I committed the first time, a commit linter ran which updated yarn.lock. Since my update isn't really a big change, I'll squash this PR and create a new one and use the --no-verify flag to ensure the yarn.lock file or no other file is updated. Thank you @rolznz . |
What type of PR is this? (check all applicable)
Description
This PR implements a try-and-catch block for the verifyPayment method in invoice.ts and returns false if a network error occurs
Related Tickets & Documents
Resolves #125