Skip to content

Commit

Permalink
fix: add missing floor() sql function
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmcgary committed Dec 13, 2024
1 parent 708177d commit 0539fa7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/rewards/7_goldActiveODRewards.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ active_rewards_final AS (
ar.*,
CASE
-- If the operator was not registered for any snapshots, just get regular tokens per day to refund the AVS
WHEN ar.num_registered_snapshots = 0 THEN ar.amount_decimal / (duration / 86400)
ELSE ar.amount_decimal / ar.num_registered_snapshots
WHEN ar.num_registered_snapshots = 0 THEN floor(ar.amount_decimal / (duration / 86400))
ELSE floor(ar.amount_decimal / ar.num_registered_snapshots)
END AS tokens_per_registered_snapshot_decimal
FROM active_rewards_with_registered_snapshots ar
)
Expand Down

0 comments on commit 0539fa7

Please sign in to comment.