mirror of
https://github.com/aljazceru/plugins.git
synced 2025-12-24 08:34:18 +01:00
rebalance: division by zero fix
this occurs if I don't have any transaction forward for a day
This commit is contained in:
committed by
Michael Schmoock
parent
0b400559f9
commit
88bb8beacf
@@ -705,7 +705,10 @@ def get_avg_forward_fees(plugin: Plugin, intervals):
|
||||
|
||||
# return average intermediate
|
||||
for idx, i in enumerate(res):
|
||||
res[idx] = fees[idx] / total[idx] * 10**6
|
||||
if int(total[idx]) > 0:
|
||||
res[idx] = fees[idx] / total[idx] * 10**6
|
||||
else:
|
||||
res[idx] = 0
|
||||
return res
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user