Repository navigation
feat(payments): send amountSats to create_send for zero-amount BOLT11 invoices [AMB-3258] - #54
Merged
Merged
Conversation
bufo24
marked this pull request as ready for review
September 24, 2026 14:23
bufo24
force-pushed
the
feat/AMB-3258-amountless-bolt11
branch
from
September 24, 2026 14:27
6687571 to
2d097c6
Compare
… invoices Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
tapd forwards payment_request.amt to LND, which accepts it only for an invoice without an amount, so the invoice decides whether to send it. This covers send() and retryPayment(). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
retryPayment passed the persisted amount_sats as amt for every BTC retry, and LND rejects amt for an invoice that encodes an amount. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
bufo24
force-pushed
the
feat/AMB-3258-amountless-bolt11
branch
from
September 24, 2026 14:38
2d097c6 to
c15d929
Compare
wthrajat
approved these changes
Sep 25, 2026
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.
Problem
transactions.sendacceptsamountSatson abolt11destination but never sends it tocreate_send, so the API rejects zero-amount invoices. Taproot Asset wallets never receive the amount, andretryPaymentsends the amount even for invoices that already encode one, which the wallet rejects.Change
buildCreateSendInputsendsdestination.amountSatsasrequest.amountfor BOLT11 destinations.isAmountlessBolt11decodes the invoice withlight-bolt11-decoder(new dependency, MIT, the same decoder the dashboard uses). The amount goes to the wallet only for a zero-amount invoice, for BTC and Taproot Asset wallets, insend()andretryPayment().SendByRequest.amountis hand-added topackages/core/schema/rails.graphql; refresh the schema after AmbossTech/amboss-rails-api#612 deploys.SendDestinationdoc:amountSatsis in sats for every wallet; a Taproot Asset wallet pays it in the asset at the current exchange rate.Depends on AmbossTech/amboss-rails-api#612. Docs: AmbossTech/amboss-documentation#88. Dashboard: AmbossTech/amboss-rails#461.
Test plan
create_sendcarriesrequest.amount; the amount reaches the wallet only for a zero-amount invoice (send and retry, BTC and Taproot Asset);isAmountlessBolt11casespnpm build,pnpm typecheck,pnpm format:check,pnpm test(68 + 11 pass)pnpm --filter @ambosstech/core run refresh-schemashows no diff forSendByRequest🤖 Generated with Claude Code