mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-18 20:21:35 +00:00
Fee flooring to rounding
This commit is contained in:
parent
b38f18d6d5
commit
f46e229213
@ -385,7 +385,7 @@ class Logics:
|
|||||||
fee_sats = order.last_satoshis * fee_fraction
|
fee_sats = order.last_satoshis * fee_fraction
|
||||||
|
|
||||||
if cls.is_buyer(order, user):
|
if cls.is_buyer(order, user):
|
||||||
invoice_amount = int(order.last_satoshis - fee_sats) # Trading fee to buyer is charged here.
|
invoice_amount = round(order.last_satoshis - fee_sats) # Trading fee to buyer is charged here.
|
||||||
|
|
||||||
return True, {"invoice_amount": invoice_amount}
|
return True, {"invoice_amount": invoice_amount}
|
||||||
|
|
||||||
@ -402,7 +402,7 @@ class Logics:
|
|||||||
fee_sats = order.last_satoshis * fee_fraction
|
fee_sats = order.last_satoshis * fee_fraction
|
||||||
|
|
||||||
if cls.is_seller(order, user):
|
if cls.is_seller(order, user):
|
||||||
escrow_amount = int(order.last_satoshis + fee_sats) # Trading fee to seller is charged here.
|
escrow_amount = round(order.last_satoshis + fee_sats) # Trading fee to seller is charged here.
|
||||||
|
|
||||||
return True, {"escrow_amount": escrow_amount}
|
return True, {"escrow_amount": escrow_amount}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user