Merge pull request #2173 from poanetwork/ab-empty-transactions

handle correctly empty transactions for Callisto
pull/2199/head
Victor Baranov 6 years ago committed by GitHub
commit 619bc14d7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 2
      apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/block.ex
  3. 6
      apps/ethereum_jsonrpc/test/ethereum_jsonrpc/block_test.exs

@ -32,6 +32,7 @@
- [#2130](https://github.com/poanetwork/blockscout/pull/2130) - fix navigation
- [#2147](https://github.com/poanetwork/blockscout/pull/2147) - add rsk format of checksum
- [#2149](https://github.com/poanetwork/blockscout/pull/2149) - remove pending transaction count
- [#2173](https://github.com/poanetwork/blockscout/pull/2173) - handle correctly empty transactions
- [#2174](https://github.com/poanetwork/blockscout/pull/2174) - fix reward channel joining
- [#2186](https://github.com/poanetwork/blockscout/pull/2186) - fix net version test

@ -319,6 +319,8 @@ defmodule EthereumJSONRPC.Block do
@spec elixir_to_transactions(elixir) :: Transactions.elixir()
def elixir_to_transactions(%{"transactions" => transactions}), do: transactions
def elixir_to_transactions(_), do: []
@doc """
Get `t:EthereumJSONRPC.Uncles.elixir/0` from `t:elixir/0`.

@ -56,4 +56,10 @@ defmodule EthereumJSONRPC.BlockTest do
}
end
end
describe "elixir_to_transactions/1" do
test "converts to empty list if there is not transaction key" do
assert Block.elixir_to_transactions(%{}) == []
end
end
end

Loading…
Cancel
Save