From 71b4523ac74f61f572ab6890001297b84ec4cd73 Mon Sep 17 00:00:00 2001 From: SebMelendez01 <78228475+SebMelendez01@users.noreply.github.com> Date: Tue, 20 Aug 2024 15:44:21 -0400 Subject: [PATCH] Stablecoin DQ Issue: Celo (#423) --- macros/stablecoins/agg_chain_stablecoin_transfers.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/macros/stablecoins/agg_chain_stablecoin_transfers.sql b/macros/stablecoins/agg_chain_stablecoin_transfers.sql index ef37e343..540590f0 100644 --- a/macros/stablecoins/agg_chain_stablecoin_transfers.sql +++ b/macros/stablecoins/agg_chain_stablecoin_transfers.sql @@ -220,12 +220,12 @@ from {{ ref("fact_"~chain~"_stablecoin_premint_addresses") }} ) as is_burn, - amount, + amount / pow(10, num_decimals) as amount, case - when is_mint then amount when is_burn then -1 * amount else 0 + when is_mint then amount / pow(10, num_decimals) when is_burn then -1 * amount / pow(10, num_decimals) else 0 end as inflow, case - when not is_mint and not is_burn then amount else 0 + when not is_mint and not is_burn then amount / pow(10, num_decimals) else 0 end as transfer_volume, t1.contract_address, contracts.symbol