fix: cast amount to float for LNbits create_invoice API
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 <noreply@anthropic.com>
This commit is contained in:
parent
904b3f1d61
commit
a703bb32d3
1 changed files with 2 additions and 2 deletions
|
|
@ -935,7 +935,7 @@ class LamassuTransactionProcessor:
|
||||||
}
|
}
|
||||||
new_payment = await create_invoice(
|
new_payment = await create_invoice(
|
||||||
wallet_id=target_wallet.id,
|
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
|
internal=True, # Internal transfer within LNBits
|
||||||
memo=memo,
|
memo=memo,
|
||||||
extra=extra
|
extra=extra
|
||||||
|
|
@ -1102,7 +1102,7 @@ class LamassuTransactionProcessor:
|
||||||
|
|
||||||
commission_payment = await create_invoice(
|
commission_payment = await create_invoice(
|
||||||
wallet_id=admin_config.commission_wallet_id,
|
wallet_id=admin_config.commission_wallet_id,
|
||||||
amount=commission_amount_sats,
|
amount=float(commission_amount_sats), # LNBits expects float
|
||||||
internal=True,
|
internal=True,
|
||||||
memo=commission_memo,
|
memo=commission_memo,
|
||||||
extra={
|
extra={
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue