Take the fee of a transfer on top of what is sent

This commit is contained in:
ai-bot committed 2026-11-15 10:39:45 +00:00
1 parent 53a516f5aa
commit 72bea053aa
1 file changed
+7 -6
+7 -6
View File
@@ -17,11 +17,9 @@ import rates
SATS_PER_BTC = rates.SATS_PER_BTC
LOT_METHODS = ("FIFO", "LIFO", "HIFO")
# Types that take sats out of an account. A sats fee is added to the amount
# consumed only where docs/spec.md section 3.2 says it increases the sats used:
# a sale and a spend. For a transfer the fee reduces what arrives instead, and
# for a loss and a gift given it is only recorded. admin_cost is not here at
# all: it stands on its own and changes no holdings (section 3.10).
# Types that take sats out of an account. For a loss and a gift given a fee is
# only recorded. admin_cost is not here at all: it stands on its own and changes
# no holdings (section 3.10).
CONSUMING_TYPES = (
"trade",
"spend",
@@ -29,7 +27,10 @@ CONSUMING_TYPES = (
"transfer_out",
"gift_given",
)
FEE_ADDS_TO_CONSUMPTION = ("trade", "spend")
# A sats fee is taken on top of the amount consumed for these types. A transfer
# takes it on top of what is sent, so the sats that are sent are exactly the sats
# that arrive (docs/spec.md sections 3.2 and 3.3).
FEE_ADDS_TO_CONSUMPTION = ("trade", "spend", "transfer_out")
class LedgerError(Exception):