Skip to content

Retry pending Lightning mint quotes during swaps - #421

Merged
a1denvalu3 merged 2 commits into
mainfrom
fix/411-swap-mint-retry
Oct 27, 2026
Merged

a1denvalu3 merged 2 commits into
mainfrom
fix/411-swap-mint-retry

Conversation

@a1denvalu3

@a1denvalu3 a1denvalu3 commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

After a successful unknown-mint melt, the receiving Lightning mint may still report its quote as UNPAID or PENDING. Check the same quote up to five times, one second apart, before using the existing failure path. PAID and ISSUED proceed immediately, and coroutine cancellation stops the wait.

Quote-check errors and retry exhaustion retain the existing failure behavior.

Each retry test uses its own coroutine scheduler so timing assertions remain independent of other test classes.

Addresses #411.

Validation:

  • ./gradlew testDebugUnitTest --tests "com.electricdreams.numo.payment.SwapToLightningMintManagerTest" — all 10 tests pass, covering delayed payment confirmation, issued quotes, retry exhaustion, errors, and cancellation.
  • Running LightningMintHandlerTest and SwapToLightningMintManagerTest together — all 19 tests pass, verifying the retry tests remain isolated from a previously advanced main scheduler.
  • ./gradlew jacocoTestReport assembleDebug --no-daemon --console=plain — the full unit suite, coverage report, and debug build pass.
  • git diff --check — passes.

@codecov

codecov Bot commented Oct 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 63.15789% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.68%. Comparing base (e0c89c0) to head (8bb5a64).

Files with missing lines Patch % Lines
...cdreams/numo/payment/SwapToLightningMintManager.kt 63.15% 7 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #421      +/-   ##
============================================
+ Coverage     37.66%   37.68%   +0.02%     
- Complexity     2230     2233       +3     
============================================
  Files           241      241              
  Lines         26432    26450      +18     
  Branches       3753     3755       +2     
============================================
+ Hits           9955     9968      +13     
- Misses        15197    15201       +4     
- Partials       1280     1281       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@a1denvalu3
a1denvalu3 merged commit a3d3cba into main Oct 27, 2026
8 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Numo Oct 27, 2026
@a1denvalu3
a1denvalu3 deleted the fix/411-swap-mint-retry branch October 27, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant