fix: prevent split payment failures from blocking remaining targets#40
Open
hexdaemon wants to merge 1 commit intolnbits:mainfrom
Open
fix: prevent split payment failures from blocking remaining targets#40hexdaemon wants to merge 1 commit intolnbits:mainfrom
hexdaemon wants to merge 1 commit intolnbits:mainfrom
Conversation
Multiple bugs could cause split payments to silently stop going out: - An exception processing any single target would abort all remaining targets in the loop. Each target is now wrapped in try/except so failures are logged and the loop continues. - Lowercase LNURL bech32 strings (the canonical form) were not recognized, causing them to be rejected at the API or misrouted as wallet IDs at payment time. Checks are now case-insensitive. - Sub-1-sat split amounts produced 0-amount invoices that failed invoice creation. A minimum amount guard now skips these with a warning. - HTTPException validation errors (invalid wallet, self-split, bad percent) were caught by a blanket `except Exception` and re-raised as a generic 500, masking the actual problem from users. - Migration m003 read a non-existent `tag` column from the m002 table, causing a KeyError when migrating with existing data. - The done_callback logged `None` as a success message on payment failure. Replaced with a helper that only logs actual results. - Frontend `isTargetComplete` referenced a removed `tag` field, making the dirty-check always pass regardless of percent value. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
lnurl1...(the canonical bech32 form) was rejected at the API or misrouted as a wallet ID at payment timecreate_invoice, which then triggered the above cascading failurefee_reserve, the amount could go negative/zeroHTTPExceptionbefore generic handler inapi_targets_set— validation errors (invalid wallet, self-split, bad percent, over-100%) were being swallowed by a blanketexcept Exceptionand returned as a generic 500 "Cannot set targets"row["tag"]read from a table that has notagcolumn, causingKeyErrorwhen migrating existing datadone_callback— replacedlambda fut: logger.success(fut.result())which loggedsuccess(None)on failure with a proper helperisTargetComplete— removed reference to deletedtagfield that made dirty-checking always passTest plan
lnurl1...) and verify it is accepted and paid🤖 Generated with Claude Code