fix websocket subscriptions with token instances

pull/2767/head
Ayrat Badykov 5 years ago
parent 0a6aeec21b
commit 00529d922e
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 4
      apps/block_scout_web/lib/block_scout_web/templates/transaction/_tile.html.eex
  2. 2
      apps/block_scout_web/lib/block_scout_web/templates/transaction/_token_transfer.html.eex

@ -38,11 +38,11 @@
<div class="d-flex flex-column mt-2">
<% [first_token_transfer | remaining_token_transfers] = @transaction.token_transfers %>
<%= render "_token_transfer.html", address: assigns[:current_address], token_transfer: first_token_transfer, conn: @conn %>
<%= render "_token_transfer.html", address: assigns[:current_address], token_transfer: first_token_transfer %>
<div class="collapse token-transfer-toggle" id="transaction-<%= @transaction.hash %>">
<%= for token_transfer <- remaining_token_transfers do %>
<%= render "_token_transfer.html", address: assigns[:current_address], token_transfer: token_transfer, conn: @conn %>
<%= render "_token_transfer.html", address: assigns[:current_address], token_transfer: token_transfer %>
<% end %>
</div>
</div>

@ -22,7 +22,7 @@
<span class="col-xs-12 col-lg-4 ml-3 ml-sm-0 text-truncate">
<%= case token_transfer_amount(@token_transfer) do %>
<% {:ok, :erc721_instance} -> %>
<%= "TokenID ["%><%= link(@token_transfer.token_id, to: token_instance_path(@conn, :show, @token_transfer.token.contract_address_hash, to_string(@token_transfer.token_id))) %><%= "] " %>
<%= "TokenID ["%><%= link(@token_transfer.token_id, to: token_instance_path(BlockScoutWeb.Endpoint, :show, @token_transfer.token.contract_address_hash, to_string(@token_transfer.token_id))) %><%= "] " %>
<% {:ok, value} -> %>
<%= "#{value} " %>
<% end %>

Loading…
Cancel
Save