diff --git a/CHANGELOG.md b/CHANGELOG.md index f482d10073..02da3ead56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ ## Current +### Features + + +### Fixes +- [#3329](https://github.com/poanetwork/blockscout/pull/3329) - Fix pagination for bridged tokens list page + +### Chore + + ## 3.3.3-beta diff --git a/apps/block_scout_web/lib/block_scout_web/chain.ex b/apps/block_scout_web/lib/block_scout_web/chain.ex index 23efee7c7a..be2b1762ac 100644 --- a/apps/block_scout_web/lib/block_scout_web/chain.ex +++ b/apps/block_scout_web/lib/block_scout_web/chain.ex @@ -220,6 +220,10 @@ defmodule BlockScoutWeb.Chain do %{"contract_address_hash" => contract_address_hash, "holder_count" => holder_count} end + defp paging_params([%Token{contract_address_hash: contract_address_hash, holder_count: holder_count}, _]) do + %{"contract_address_hash" => contract_address_hash, "holder_count" => holder_count} + end + defp paging_params({%Reward{block: %{number: number}}, _}) do %{"block_number" => number, "index" => 0} end diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/tokens/bridged_tokens_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/tokens/bridged_tokens_controller.ex index 3aeea6602f..460268f7f5 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/tokens/bridged_tokens_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/tokens/bridged_tokens_controller.ex @@ -21,7 +21,7 @@ defmodule BlockScoutWeb.BridgedTokensController do nil next_page_params -> - tokens_path( + bridged_tokens_path( conn, :index, Map.delete(next_page_params, "type") diff --git a/apps/block_scout_web/lib/block_scout_web/templates/bridged_tokens/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/bridged_tokens/index.html.eex index 6277ab16cd..cd125f6538 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/bridged_tokens/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/bridged_tokens/index.html.eex @@ -32,7 +32,7 @@ -
+ <%= render BlockScoutWeb.CommonComponentsView, "_table-loader.html", total_supply: @total_supply %>