Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienmo committed Nov 14, 2018
1 parent 2eea8f7 commit 868ac29
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/neoscan_web/lib/neoscan_web/api.ex
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ defmodule NeoscanWeb.Api do
%{:address => Base58.encode(address_hash), :balance => balances}
end

@spec get_gas_generated(binary(), integer(), integer()) :: Decimal.t
@spec get_gas_generated(binary(), integer(), integer()) :: Decimal.t()
def get_gas_generated(address_hash, start_block, end_block) do
vouts = Transactions.get_vouts(address_hash, start_block, end_block)

Enum.reduce(vouts, Decimal.new("0.0"), fn vout, acc ->
value = Decimal.round(vout.value)
start_index = max(vout.start_block_index, start_block)
Expand Down

0 comments on commit 868ac29

Please sign in to comment.