Add Paging_params for Token

pull/3224/head
Victor Baranov 4 years ago
parent 4d2ae670cc
commit 1fcb141ed5
  1. 5
      apps/block_scout_web/lib/block_scout_web/chain.ex

@ -24,6 +24,7 @@ defmodule BlockScoutWeb.Chain do
Block, Block,
InternalTransaction, InternalTransaction,
Log, Log,
Token,
TokenTransfer, TokenTransfer,
Transaction, Transaction,
Wei Wei
@ -205,6 +206,10 @@ defmodule BlockScoutWeb.Chain do
%{"hash" => hash, "fetched_coin_balance" => Decimal.to_string(fetched_coin_balance.value)} %{"hash" => hash, "fetched_coin_balance" => Decimal.to_string(fetched_coin_balance.value)}
end end
defp paging_params({%Token{contract_address_hash: contract_address_hash}, _}) do
%{"contract_address_hash" => contract_address_hash}
end
defp paging_params({%Reward{block: %{number: number}}, _}) do defp paging_params({%Reward{block: %{number: number}}, _}) do
%{"block_number" => number, "index" => 0} %{"block_number" => number, "index" => 0}
end end

Loading…
Cancel
Save