Closed Toheeb-Ojuolape closed 1 month ago
Hi @rolznz this is the new PR for the issue where I made a commit using the --no-verify flag which did not result in a change in the yarn.lock. I also implemented your error code corrections and I hope you find this acceptable. Thank you.
Thanks @Toheeb-Ojuolape it looks great!
Any chance you would be able to write a test too? if not, that's fine.
Thanks @Toheeb-Ojuolape it looks great!
Any chance you would be able to write a test too? if not, that's fine.
Hi @rolznz , sorry I won't be able to write a test for it as that would require me to mock both verifyPayment and the network errors which is out of the scope of this current issue. I can add test suites later on if there is an issue created related to unit tests for verifyPayment, validatePreimage and all the other async functions in invoice.ts.
I hope you find this acceptable ๐
Hi @rolznz just following up on this. Once this PR has been merged, I'll create a new issue for writing tests for async functions like verifyPayment, isPaid and validatePreimage in the invoice.ts and assign the task to myself.
I look forward to your feedback.
Hi @rolznz, my PR is still here for your approval ๐ฅบ. Any chance this Friday is a good time to approve?
I have already created a new issue for tests in invoice.ts which I plan to address once I have closed out on this: https://github.com/getAlby/js-lightning-tools/issues/155
@Toheeb-Ojuolape I added some tests. Thanks!
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 https://github.com/getAlby/js-lightning-tools/issues/125
Closes https://github.com/getAlby/js-lightning-tools/issues/155