mirror of
https://github.com/RoboSats/robosats.git
synced 2024-12-13 02:46:28 +00:00
Fix devfund fraction validation
This commit is contained in:
parent
14c291790c
commit
c22606023e
@ -104,7 +104,7 @@ def send_devfund_donation(order_id, proceeds, reason):
|
||||
|
||||
order = Order.objects.get(id=order_id)
|
||||
coordinator_alias = config("COORDINATOR_ALIAS", cast=str, default="NoAlias")
|
||||
donation_fraction = max(0.05, config("DEVFUND", cast=float, default=0.2))
|
||||
donation_fraction = min(1.0, max(0.00, config("DEVFUND", cast=float, default=0.2)))
|
||||
message = f"Devfund donation; {coordinator_alias}; {order}; {donation_fraction}; {reason};"
|
||||
num_satoshis = int(proceeds * donation_fraction)
|
||||
routing_budget_sats = int(max(5, num_satoshis * 0.000_1))
|
||||
|
Loading…
Reference in New Issue
Block a user