Skip to content

Commit

Permalink
fix: empty amounts
Browse files Browse the repository at this point in the history
  • Loading branch information
danzipie committed Jan 24, 2025
1 parent 8b3fdb2 commit 990886a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dbt_subprojects/tokens/macros/transfers/transfers_enrich.sql
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ WITH base_transfers as (
, t.contract_address
, {{case_when_token_standard('evms_info.native_token_symbol', 'tokens_erc20.symbol', 'NULL')}} AS symbol
, t.amount_raw
, {{case_when_token_standard('t.amount_raw / power(10, 18)', 't.amount_raw / power(10, tokens_erc20.decimals)', 'cast(t.amount_raw as double)')}} AS amount
, {{case_when_token_standard('t.amount_raw / power(10, prices.decimals)', 't.amount_raw / power(10, prices.decimals)', 'cast(t.amount_raw as double)')}} AS amount
, prices.price AS price_usd
, {{case_when_token_standard('(t.amount_raw / power(10, 18)) * prices.price',
'(t.amount_raw / power(10, tokens_erc20.decimals)) * prices.price',
, {{case_when_token_standard('(t.amount_raw / power(10, prices.decimals)) * prices.price',
'(t.amount_raw / power(10, prices.decimals)) * prices.price',
'NULL')}} AS amount_usd
FROM
base_transfers as t
Expand Down

0 comments on commit 990886a

Please sign in to comment.