Skip to content

Commit

Permalink
fix sql script
Browse files Browse the repository at this point in the history
  • Loading branch information
teddyding committed Jan 8, 2025
1 parent c29878d commit f2754f1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ BEGIN
/* For backwards compatibility, handle the case where defaultFundingPpm is not present */
CASE
/* Convert defaultFundingPpm from parts-per-million to a rate */
WHEN event_data ? 'defaultFunding8hrPpm' THEN dydx_trim_scale(
WHEN (event_data->>'defaultFunding8hrPpm') IS NOT NULL THEN dydx_trim_scale(
power(10, PPM_EXPONENT) /
FUNDING_RATE_FROM_PROTOCOL_IN_HOURS *
(event_data->'defaultFunding8hrPpm')::numeric)
Expand Down

0 comments on commit f2754f1

Please sign in to comment.