From 0ae45f9fd282b37bf21a8ab9d7096d9f887d5d1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20P=C3=A9rez?= Date: Mon, 22 Aug 2022 15:50:38 -0500 Subject: [PATCH] Avoid another division by 0 - typo --- staking-api/src/queries.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/staking-api/src/queries.ts b/staking-api/src/queries.ts index 6fd8ad9c..762feb27 100644 --- a/staking-api/src/queries.ts +++ b/staking-api/src/queries.ts @@ -565,6 +565,8 @@ export const currentEpochPoolStatsQuery = ` fbp.protocol_fees = 0 OR ts.total_staked = 0 THEN + NULL + ELSE (cebs.zrx_delegated / ts.total_staked) / (fbp.protocol_fees / tf.total_protocol_fees) END AS approximate_stake_ratio