Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 3, 2025

Per BOLT11 spec, invoices with sub-satoshi amounts only populate millisatoshis field, not satoshis. The extension was previously unable to display amounts for these invoices.

Changes

  • Updated amount calculation to fallback to millisatoshis / 1000 when satoshis is undefined
  • Applied to both ConfirmPayment and ConfirmPaymentAsync screens
const amountSat = invoice.satoshis || Number(invoice.millisatoshis) / 1000 || 0;

This handles:

  • Whole satoshi amounts (via satoshis field)
  • Sub-satoshi amounts (via millisatoshis field)
  • Zero-amount invoices (fallback to 0)

Payment screen showing 1,825.23 sats correctly displayed


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Make requested changes to #3455 Handle sub-satoshi amounts in Lightning invoices Nov 3, 2025
Copilot AI requested a review from reneaaron November 3, 2025 13:51
Copilot finished work on behalf of reneaaron November 3, 2025 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants