From f46e22921373cc2633f06fa7a5aabd19489fd693 Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi Date: Thu, 3 Mar 2022 16:43:54 -0800 Subject: [PATCH] Fee flooring to rounding --- api/logics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/logics.py b/api/logics.py index 9d917fad..532675f4 100644 --- a/api/logics.py +++ b/api/logics.py @@ -385,7 +385,7 @@ class Logics: fee_sats = order.last_satoshis * fee_fraction 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} @@ -402,7 +402,7 @@ class Logics: fee_sats = order.last_satoshis * fee_fraction 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}