From a703bb32d3065d2f2536f5e966300b743892c963 Mon Sep 17 00:00:00 2001 From: padreug Date: Sun, 11 Jan 2026 15:17:07 +0100 Subject: [PATCH] fix: cast amount to float for LNbits create_invoice API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit LNbits create_invoice expects `amount: float` but we were passing int. While Python's duck typing handles this, explicit casting ensures type correctness and matches the API contract. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- transaction_processor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transaction_processor.py b/transaction_processor.py index 1f511df..deaac47 100644 --- a/transaction_processor.py +++ b/transaction_processor.py @@ -935,7 +935,7 @@ class LamassuTransactionProcessor: } new_payment = await create_invoice( wallet_id=target_wallet.id, - amount=amount_sats, # LNBits create_invoice expects sats + amount=float(amount_sats), # LNBits expects float for amount internal=True, # Internal transfer within LNBits memo=memo, extra=extra @@ -1102,7 +1102,7 @@ class LamassuTransactionProcessor: commission_payment = await create_invoice( wallet_id=admin_config.commission_wallet_id, - amount=commission_amount_sats, + amount=float(commission_amount_sats), # LNBits expects float internal=True, memo=commission_memo, extra={