Fix claim rewards

This commit is contained in:
Reckless_Satoshi 2022-11-28 08:23:37 -08:00
parent 12cab13814
commit 53dd8777cb
No known key found for this signature in database
GPG Key ID: 9C4585B561315571

View File

@ -1608,7 +1608,16 @@ class Logics:
num_satoshis = user.profile.earned_rewards
reward_payout = LNNode.validate_ln_invoice(invoice, num_satoshis)
routing_budget = int(
max(
num_satoshis * float(config("PROPORTIONAL_ROUTING_FEE_LIMIT")),
float(config("MIN_FLAT_ROUTING_FEE_LIMIT_REWARD")),
)
) # 1000 ppm or 10 sats
reward_payout = LNNode.validate_ln_invoice(
invoice, num_satoshis, routing_budget
)
if not reward_payout["valid"]:
return False, reward_payout["context"]