Repository navigation
test(payments): add unit tests for the zebedee, opennode, nodeless and lnurl processors - #917
Open
Priyanshubhartistm wants to merge 2 commits into
Open
Priyanshubhartistm wants to merge 2 commits into
Priyanshubhartistm wants to merge 2 commits into
Conversation
…d lnurl processors Signed-off-by: Priyanshubhartistm <bhartipriyanshustm@gmail.com>
🦋 Changeset detectedLatest commit: e361ae7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
[Low impact] The PR appears safe to merge; the previous finding is fixed and no new actionable issues remain.
|
Collaborator
Coverage Report for CI Build 39466675129Coverage increased (+0.5%) to 74.327%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
Signed-off-by: Priyanshubhartistm <bhartipriyanshustm@gmail.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds unit specs for the four payment processors that had none, next to the existing lnbits and nwc ones (
test/unit/payments-processors/). No production code changes.For each processor:
createInvoice: the request sent to the provider (url, body, amount unit, callback url / metadata, ttl) and the mapping of the response to anInvoice; msats are converted to whole sats where the provider takes sats; provider outages and responses without data are not swallowed.getInvoice: the request, every provider status mapped toInvoiceStatus(a status the provider adds later is never read as paid), confirmation dates, and error propagation.lightning_invoice/lightningfallback andamount/pricefallback; Nodeless's 15 minute fallback expiry; LNURL's generated invoice id and verify-url polling.Related Issue
Closes #903
Motivation and Context
These are the money-moving code paths for four providers. A misread status or a wrong amount unit is a funds bug, and nothing covered them.
How Has This Been Tested?
transform.tsor changing OpenNode's ttl makes the matching spec fail.pnpm lint,pnpm check:deps,pnpm run build:check,pnpm run test:unit.Screenshots (if appropriate):
Types of changes
Checklist: