Maybe, you needs …
def conversions(nil), do: nil
def conversions(market_data) do
Enum.map(market_data, fn map ->
if map.priced_in != "8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS" do
%{
asset: map.asset,
price: map.last_price,
priced_in: map.priced_in,
asset_to_btc_rate: asset_to_btc_rate(map.priced_in),
btc_price: map.last_price * asset_to_btc_rate(map.priced_in)
}
else
%{
asset: map.asset,
btc_price: map.last_price
}
end
end)
end






















