Merge pull request #3329 from poanetwork/vb-fix-pagination-for-bridged_tokens

Fix pagination for bridged tokens list page
pull/3335/head
Victor Baranov 4 years ago committed by GitHub
commit f04fe57690
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      CHANGELOG.md
  2. 4
      apps/block_scout_web/lib/block_scout_web/chain.ex
  3. 2
      apps/block_scout_web/lib/block_scout_web/controllers/tokens/bridged_tokens_controller.ex
  4. 2
      apps/block_scout_web/lib/block_scout_web/templates/bridged_tokens/index.html.eex

@ -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

@ -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

@ -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")

@ -32,7 +32,7 @@
</th>
</tr>
</thead>
<tbody data-items data-selector="top-tokens-list">
<tbody data-items data-selector="top-bridged-tokens-list">
<%= render BlockScoutWeb.CommonComponentsView, "_table-loader.html", total_supply: @total_supply %>
</tbody>
</table>

Loading…
Cancel
Save