Skip to content

Commit e6054a8

Browse files
committed
Fixing calculation of match_amount in Subscription (#9859)
1 parent 6b17f0c commit e6054a8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/grants/models/subscription.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,10 @@ def match_amount(self):
238238
y_lower = clr_prediction_curve[4]
239239
y_upper = clr_prediction_curve[5]
240240

241-
# use lerp to discover the predicted match_amount
242-
return y_lower + (((y_upper - y_lower) * (float(amount) - x_lower)) / (x_upper - x_lower))
241+
# use lerp to discover the predicted match_amount
242+
predicted_clr = y_lower + (((y_upper - y_lower) * (float(amount) - x_lower)) / (x_upper - x_lower))
243+
244+
return predicted_clr
243245

244246
@property
245247
def match_amount_token(self):

0 commit comments

Comments
 (0)